This post originally appeared on the Annexe.
If you want to run scp on a non-standard port, you use the
-P flag. So I did this:
scp file.img.xz -P 99999 firstname.lastname@example.org:/dest/path/
And what did I get?
ssh: connect to host example.com port 22: no route to host
Why was it ignoring my hypothetically impossible port 99999? Oh, wait.
scp -P 99999 file.img.xz email@example.com:/dest/path/
Coffee hasn’t sunk in yet.