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!