How to use a different SSH port with rsync
April 18, 2017
I'm forever forgetting how to use a different ssh port with rsync, so here's how to do it.
rsync -avrn --rsh='ssh -p2222' dir1 [email protected]:path/to/dir1/
There. I now have somewhere to refer to the next time I forget.