How do I tell rsync to use a different port for SSH ?
# rsync -av -e "ssh -p [port_number]" user@ip:/path/to/source/ /path/to/destination/
Example, i will copy data from email@example.com:/root/backup/ to /home/lifelinux/backup/ with source server has ssh port is 2222. Type the following command
# rsync -av -e "ssh -p 2222" firstname.lastname@example.org:/root/backup/ /home/lifelinux/backup/