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 firstname.lastname@example.org
- -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 /tmpTwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!
- 30 Cool Open Source Software I Discovered in 2013
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012
- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop