Copy to a remote host over SSH on a custom port
Transfers files to a remote machine through an SSH server listening on a non-default port.
rsync -a -e 'ssh -p 2222' source user@host:destinationEdit the highlighted values, then copy. They are inserted as typed, without shell escaping.
Report an issue (opens in a new tab) wrong command, wrong danger level, typo… (on GitHub)
Adapted from tldr-pages (common/rsync.md), licensed under CC BY 4.0.