Rsync with a non-standard ssh port

gorilla-chimp

While doing some work on migrating accounts to a new server, 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  offered a solution:

rsync -avz -e "ssh -p $portNumber" /localpath user@remoteip:/remotepath