SSH, SFTP, and SCP on non-standard ports

One common suggestion for securing a secure shell connection on Linux is to change the port that ssh runs on.  But how exactly do you connect to a server on one of these non-standard ports?

Naturally, the syntax is different for each so here goes:


ssh -p 33432

Yes, ssh uses a lower case p command line argument. Just wait until we get to scp.


sftp -o "Port 33432"

Of course sftp uses a plain English option parameter of “Port XXXX”


scp -P 33432 /home/user/file.txt

And naturally scp uses a capital P

Gotta love consistency!

Like this? Consider joining my mailing list, or at least using my affiliate link when buying from Amazon 🙂

You or someone you know looking to buy or sell?

Leave a Reply