RSync with a non-standard SSH Port
Posted on December 8, 2007
While doing some work on the JQuery Plugins site today, I needed to use rsync over ssh. The ssh daemon on the remote server runs on a non-standard port, and all the port related options to rsync only change settings if you’re running the rsync-daemon.
After some searching, the man page of rsync finally offered a solution:
rsync -avz -e "ssh -p $portNumber" [email protected]:/path/to/files/ /local/path/
Passing the port parameter to ssh with the -e option worked like a charm. 🙂
This is why Unix rocks.