Rsync with a non-standard ssh port

December 8, 2007 — 32 Comments

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" user@remoteip:/path/to/files/ /local/path/

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

This is why Unix rocks.

Related Posts

Mike Hostetler

Posts Twitter Facebook Google+

Husband, Entrepreneur & Polyglot Technologist. Founder & CEO of @appendto. Passionate about Virtual Working, HTML5, JavaScript, Entrepreneurship & Freedom