Errors with scp


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

And what did I get?

ssh: connect to host port 22: no route to host

Why was it ignoring my hypothetically impossible port 99999? Oh, wait.

scp -P 99999 file.img.xz

Coffee hasn’t sunk in yet.

Author bio and support


Ruben Schade is a technical writer and infrastructure architect in Sydney, Australia who refers to himself in the third person in bios. Hi!

The site is powered by Hugo, FreeBSD, and OpenZFS on OrionVM, everyone’s favourite bespoke cloud infrastructure provider.

If you found this post helpful or entertaining, you can shout me a coffee or send a comment. Thanks ☺️.