rsync using a different port

Specify a different ssh port when using rsync.

rsync --rsh="ssh -p 2222" /path/to/src/ user@host:/path/to/dest/

An example with more options added.

time rsync \
    --compress \
    --progress \
    --recursive \
    --rsh="ssh -p 2222 -i ~/.ssh/path/to/id_rsa" \
    --verbose \
    --partial \
    /path/to/src/ \
    user@host:/path/to/dest/
View this page on GitHub.
Posted .

Comments

Leave a Reply