While using rsync to synchronize files between two servers uses default ssh port 22. But many of hostmaster change the default ssh port for the security purpose, in that situation you also need to specify port to connect remote server.
For example below command connect to example.com server though ssh on port 2222 and sync all files from /files/ directory on example.com to /local/files localhost directory
$ rsync -ravz
-e "ssh -p 2222"[email protected]:/files/ /local/files/