Rsync with a non-standard ssh port

After some searching, the man page of rsync finally offered a solution:

# rsync -avz -e “ssh -p $portNumber” user@remoteip:/path/to/files/ /local/path/


# rsync -avz -e “ssh -p $portNumber” /local/folder user@remoteip:/path/to/files

Passing the port parameter to ssh with the -e option worked like a charm. 

This is why Unix rocks.

This entry was posted in General, Tips and Tricks. Bookmark the permalink.

Leave a Reply