Using a custom ssh port for rsync

Rsync is a handy tool for syncing data between servers.

By default it connects on port 22. But sometimes the ssh server is configured to accept connections on a different port. You can still use rsync like this:

rsync -Hav -e "ssh -p 2222" someserver.com:/remote/server/path /local/server/path