dracoblue.net

Different ssh port with rsync

If you want to to backup from/to an ssh server and this server does not run on 22 as port, you can use this workaround:

rsync -r [strong]-e 'ssh -p 4321'[/strong] [email protected]:/home/user/test backup -v

This will sync from the host

[email protected] (by using ssh and port 4321) the folder /home/user/test to the folder backup on your local harddisk.

In bash by
@ 16 Sep 2010, Comments at Reddit & Hackernews