Techy: rSync and scp over different ports

December 21st, 2012 by Richy B. Leave a reply »

If you want to copy a file over scp using a different port number than usual, the syntax is:

Assume 1234 is the port number
scp -P 1234 user@remotehost:/folder/file.txt .

And if you want to do the same in rsync over SSH, then the syntax is:
rsync -av --progress -e "ssh -p 1234" user@remotehost:/folder/file.txt .

Note the different capitalisation of the port specifier (“p” is rsync’s ssh connection and “P” in scp).

This post is over 6 months old.

This means that, despite my best intentions, it may no longer be accurate.

This blog holds over 12 years of archived content - during that time, I may have changed my opinion of something, technology will have advanced (and old "best standards" may no longer be the case), my technology "know how" has improved etc etc - it would probably take me a considerable amount of time to update all the archival entries: and defeat the point of keeping them anyway.

Please take these posts for what they are: a brief look into my past, my history, my journey and "caveat emptor".

Leave a Reply

%d bloggers like this: