Rsync With A Non-Standard SSH Port

by lifeLinux on August 23, 2011

How do I tell rsync to use a different port for SSH ?

# rsync -av -e "ssh -p [port_number]" [email protected]:/path/to/source/ /path/to/destination/

Example, i will copy data from [email protected]:/root/backup/ to /home/lifelinux/backup/ with source server has ssh port is 2222. Type the following command

# rsync -av -e "ssh -p 2222" [email protected]:/root/backup/ /home/lifelinux/backup/

Related Posts:

Previous post:

Next post: