The rsync man page notes that the “-e” or “–rsh” flag lets you “specify the remote shell to use”. This can be used to specify transfer over a non-standard SSH port using the “-p” flag to the ssh binary:
SSH_PORT=... rsync [OPTION...] -e "ssh -p $SSH_PORT" [USER@]HOST:SRC... [DEST]
Post a Comment