rsync SSH non standard port

Let’s assume that the ssh daemon from one of your remote servers is running on a non standard port, and you need to perform a rsync between your server (you are using the default port right?) and this machine. After some searching, the man page of rsync finally offered the magic solution to specify the SSH port, by using the -e parameter:

rsync -vrtz -e “ssh -p 22022” root@fedorovici.com:/path/to/my/files/ /other/similar/path/

-v = increase verbosity
-r = recursive
-t = preserve times
-z = compress file data during the transfer

Evrika!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.