SSH Port Change Print

  • 308

To change the SSH port number login as root and edit /etc/ssh/sshd_config

You may use nano or vim to edit this.

Find the line that says Port 22 and change 22 to any number between 1024->65535 and save the file.

Once done restart the SSH server:

/etc/init.d/sshd restart

 

Now start a new SSH session (do not close your existing one) just to make sure that you can get in. If you can now login on that port you are succeded.


Was this answer helpful?

« Back