xyzio

rsync a file using a ssh .pem public key

leave a comment »

Using a public SSH key with rsync to transfer a single file. The key is the -e option which modifies the SSH command used by rsync.


rsync -a ./localfile.jpg user@hostname.com:/home/user/localfile.jpg -e 'ssh -i keypath.pem'

Written by M Kapoor

May 9, 2022 at 2:28 am

Posted in Programming

Tagged with , ,

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 )

Facebook photo

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

Connecting to %s

%d bloggers like this: