Use Rsync with Non-standard SSH Port
Rsync is a useful utility for keep synchronized directories between two systems. It uses SSH protocol to connect a remote server. By default it used port 22 (SSH Standard Port) to connect remote server. But in case ssh service on remote server is running on some different port, we need to define port in rsync command like below.
Use -e option to pass ssh port in rsync command.
$ rsync -avz -e "ssh -p 2222" [email protected]:/remote/files/ /local/dir
Above example is using port 2222. It means SSH is running on port 2222 on remote server. Change this as per your remote server settings.