How to change the SSH port in Linux

For security reason is recommendable to change the default ssh port (22) in order to do that you need to follow.

  1. Login to your server using your favorite ssh client like putty
  2. With your favorite editor open /etc/ssh/sshd_config (ex. # nano /etc/ssh/sshd_config)
  3. Look for #Port 22, if its commented, then uncomment it and change 22 for whatever you want, please be careful and use and not used port.
  4. Save the changes, and exit your editor.
  5. Restart your sshd service and thats all.
  • 110 Users Found This Useful
Was this answer helpful?

Related Articles


*MPlayer (MPlayer-1.0rc1.tar.bz2) *Codecs (essential-20061022.tar.bz2) *Flvtool...

How do I change my Webmin password if I can't login?

Included with the Webmin distribution is a program called to solve erecisely this...

How to Install Wget

Ever logged into your server via ssh and needed to download a file, then wget is what you...

How to install Zend for Linux

1. Download Zend in the server you want to install. Linux 32b -...

Debian Lenny Apt-get List

In order to use the officials debian sources paste this into your sources.list #nano...