2
1
I need to sync my local files through a gateway to an Amazon EC2 instance that requires specifying my .pem key. I can do this as a three step like so (assuming no typos):
rsync -avzh -e ssh /my_site/ user@XX.XX.XX.XX:/temp_destination/
- ssh to the gateway
rsync -avzh -e "ssh - My_Key.pem" temp_destination/ user@XX.XX.XX.XXX:/var/www
I'd like to get this into one single command, but I'm wrestling through the flags and options and can't seem to get anything to work that lets me specify my .pem
key.
Thoughts?
Can't answer my own question for another 7 hours, so in case I forget, I found the answer:
rsync -avzh --stats --progress -e "ssh user@gatway.host ssh -i MY_KEY.pem" ~/Sites/my_site/ user@remote.server:/var/www/
– Jack McDade – 2013-09-13T19:53:35.357