Issue
I have been attempting the following command:
rsync -rvz --progress --remove-sent-files ./dir user@host:2222/path
SSH is running on port 2222, but rsync still tries to use port 22 and then complains about not finding the path, cause of course it does not exist.
I would like to know if it is possible to rsync to a remote host on a non-standard ssh port.
Solution
Another option, in the host you run rsync from, set the port in the ssh config file, ie:
cat ~/.ssh/config
Host host
Port 2222
Then rsync over ssh will talk to port 2222:
rsync -rvz --progress --remove-sent-files ./dir user@host:/path
Answered By - Joao Costa