ssh, sftp, scp, tftp port fun

Software

To start an SSH session on a specific port:

$ ssh -p 22222 host

To download a file over SCP on a unique port:

$ scp -P 22222 host:file .

To start an SFTP session on a specific port:

$ sftp -oPort=22222 host

To start an tftp session on a specific port:

$ tftp host 22222

Hashtag Linux userland! Time to break out some port of another nature.

UPDATE: I wrote about SFTP ports seven years ago. I guess my memory is worse than I thought, though at least it hasn’t affected my memory.

Author bio and support

Me!

Ruben Schade is a technical writer and IaaS engineer in Sydney, Australia who refers to himself in the third person in bios. Wait, not BIOS… my brain should be EFI by now.

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

You can leave me a comment by contacting me, and I might publish your thoughts. Please read the FAQs first though.

If you found this post helpful or entertaining, you can shout me a coffee or buy some silly merch. Thanks!