By default OpenSSH (SSH Remote Login Protocol) server runs on tcp port 22. This is useful for a single system connected to DSL/ADSL or home internet equipments. Others cannot guess your port easily (until and unless they perform port scan). If port scan is blocked, then no one can figure it out your ssh port (again some one need to write a script to try connection at every port). This make your servers just a little more difficult to access.
Open /etc/ssh/sshd_config file and look for line Port 22 and change line to Port 2222. Restart sshd server.
Sshd is running on a non-standard port, connection attempts to the system will fail. You need to connect using following command:
$ ssh -p 2222 user@your-ip
$ ssh -p 2222 email@example.com
- -p: Port to connect to on the remote host.
Scp also supports same option with capital letter P.
$ scp -P 2222 user@your-ip:/home/rocky/mp3/abc.mp3 /tmpTweet itFacebook itGoogle+ itPDF itFound an error/typo on this page?