Archive for December 21st, 2012

Techy: rSync and scp over different ports

December 21st, 2012

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).

gamy-dance
%d bloggers like this: