The Guru College

rsync over SSH on a non-standard port

A small tip for anyone using rsync, and trying to sync files from a server running SSH over a non-standard port (ie, something other than 22):

rsync -ac -e 'ssh -p24' username@remotehostname:/remote/path /local/path

In essence, you can run any command that gets a remote shell with the -e option, and if you use single quotes, you can pass as many arguments as you like. Handy.

Back | Home | Delays