Author Topic: How to change SSH (Secure SHell) port in CentOS  (Read 715 times)

saroop

  • Green Belt
  • *****
  • Posts: 352
  • Karma: +0/-0
How to change SSH (Secure SHell) port in CentOS
« on: September 01, 2013, 07:15:20 AM »
Hi,


Let me tell you how to change ssh port in CentOS..

everybody know 22 is the default port for ssh.

Lets say i need to change it to 22000.

1. Login to CentOS

2. use vi editor to edit the ssh configuration file
                vi /etc/ssh/sshd_config

    or you can use nano editor
                 nano /etc/ssh/sshd_config

3. Edit "Port 22" to any unused port you want. here 22000
    Port 22000
    Do not forget to remove # from that line because # makes it a comment.

4. Restart ssh
              /etc/init.d/sshd restart

5. Done. You are good to go.



Regards
Saroop Datasoft

hostmanmash

  • White Belt
  • *
  • Posts: 3
  • Karma: +0/-0
Re: How to change SSH (Secure SHell) port in CentOS
« Reply #1 on: September 13, 2013, 05:10:45 PM »
thanks for the info :)