Ralph

Rsync to AWS EC2 Using .PEM key

Introduction

user

Ralph

Ralph is a car enthusiast, blogger, author and teacher. In addition to being the founder of this website, Ralph is also a Linux Systems Administrator with 9 years+ experience who is also available for freelance or full-time work.


LATEST POSTS

The whole system that we live in drills into us… 23rd September, 2018

Canvas LMS: Install QTI Migration Tool 08th August, 2017

General

Rsync to AWS EC2 Using .PEM key

Posted on .

How to use Rsync with standard Amazon Web Services instances that utilise a .pem key file instead of traditional username/password authentication or conventional SSH key pairs:

The standard AWS EC2 instances support using a .PEM key to log in, instead of a more common SSH username/password combination. If you want to use Rsync to transfer data from your local machine to an AWS EC2 instance you will need to change the Rsync command to be something like this:

 rsync -rave "ssh -i /path/to/pemkeyfile.pem" /path/to/local/files/* ec2-user@ec2_ip:/path/to/remote/files

Beyond this it’s just like regular Rsync, so just follow the on-screen commands and you get secured file transfer between your local machine and your remote AWS EC2 instance.

For additional flags that can be passed along with rsync, see: http://linuxcommand.org/man_pages/rsync1.html

Ref: http://www.anthonychambers.co.uk/blog/rsync-to-aws-ec2-using-.pem-key/9

profile

Ralph

Ralph is a car enthusiast, blogger, author and teacher. In addition to being the founder of this website, Ralph is also a Linux Systems Administrator with 9 years+ experience who is also available for freelance or full-time work.

Navigation