admin/ July 9, 2016/ Linux/ 0 comments

How to use rsync with pem key ?


Here i am going to tell how to rsync using pem key.
Make sure the .pem file is indeed where you think.

rsync -avh -e "ssh -i <key.pem>" <source address> <destination address>

For Example-:

rsync -avh -e "ssh -i ec2-key.pem" [email protected]:/var/www/html/ /opt/backup/
rsync -avh -e "ssh -i /home/ubuntu/Downloads/ec2-key.pem" [email protected]:/var/www/html/ /opt/backup/
Gotechnies Sysadmin Blog


Rating: 4.9
Votes: 375
Reviews: 330

Leave a Reply