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
ssh -p 33432 [email protected]
Yes, ssh uses a lower case p command line argument. Just wait until we get to scp.
sftp
sftp -o "Port 33432" [email protected]
Of course sftp uses a plain English option parameter of “Port XXXX”
scp
scp -P 33432 /home/user/file.txt [email protected]:/home/user
And naturally scp uses a capital P
Gotta love consistency!
Please remember to subscribe to the newsletter to stay up to date!You or someone you know looking to buy or sell?
Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I don't link to anything I don't use myself. You would think this should be self evident these days, but apparently not...