Created
March 24, 2016 14:29
-
-
Save peterdalle/466597a449a6a87648be to your computer and use it in GitHub Desktop.
Automatically download files via SSH without password
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
# Download CSV files from Linux server (iny my case, Raspberry Pi and Ubuntu) | |
# over SSH without the need to supply password. Note that Cygwin have to be | |
# used with this file since Git Bash uses other keyfiles. | |
# | |
# 1.Upload keyfiles: | |
# scp /home/username/.ssh/id_rsa.pub [email protected]:~/.ssh/authorized_keys2 | |
# 2. Don't forget to make file executable: | |
# chmod +x download.sh | |
echo "Downloading from Raspberry Pi..." | |
scp [email protected]:/home/pi/*.csv /local-dir |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment