rsync to AWS EC2 Using PEM Key

I ran into a situation today where I needed to have a master EC2 instance sync its files to an array of other EC2 instances. Using SSH and rsync makes this trivial except for one thing, how to connect using the PEM file instead of a username / password combo.

The trick is to pass the PEM file to SSH using the rave parameter:

Other than everything works the same as typical rsync.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s