Last active
September 13, 2016 06:54
-
-
Save algotrader-dotcom/6b05df9bce361ce66013 to your computer and use it in GitHub Desktop.
rsync with ssh key
This file contains 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
## This will sync directory from remote machine to local | |
sudo rsync -arvz -e "ssh -i your-key.pem" ec2-user@ip-address:/path/to/dir/ temp/ | |
## scp with key | |
scp -i mykey.pem somefile.txt [email protected]:/ | |
## This will sync from local to remote | |
sudo rsync -arvz -e "ssh -i your-key.pem" temp/ ec2-user@ip-address:/path/to/dir/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment