Specify a SSH Key for rsync

If you use rsync with the -rsh=ssh option it looks for a private key called id_rsa in the ~/.ssh folder. If (for whatever reason) you want to specify a different private key from the default then you can do it with:

-e ‘ssh -i /some/path/some_key’

This can be useful if want a key per host. Or, if like me, you idiotically created the keys with a different name than the default.

This entry was posted in linux on by .

About markn

Mark is the owner and founder of Timesheets MTS Software, an mISV that develops and markets employee timesheet and time clock software. He's also a mechanical engineer, father of four, and a lifelong lover of gadgets.