14 lines
356 B
Bash
14 lines
356 B
Bash
#!/bin/bash
|
|
|
|
# Configuration
|
|
PI_USER="hmi"
|
|
PI_HOST="192.168.1.46"
|
|
REMOTE_FOLDER="/home/hmi/Desktop/HMI/recordings"
|
|
LOCAL_FOLDER="/recordings"
|
|
|
|
# Prompt for password silently
|
|
read -s -p "Enter SSH password for $PI_USER@$PI_HOST: " PASSWORD
|
|
echo ""
|
|
|
|
# Run rsync with password
|
|
sshpass -p "$PASSWORD" scp -r "$PI_USER@$PI_HOST:$REMOTE_FOLDER" "$LOCAL_FOLDER" |