How to change your SSH port for security

Changing your SSH port on your Linux system is a simple way to help increase security. It is a simple process which can be reversed at any time.

  1. Log onto your Linux system using SSH
  2. Go to the ssh config folder using the command #cd /etc/ssh
  3. Edit the sshd_config file using the command #vi sshd_config
  4. Add the line PORT 999 where 999 is the number for the port you want to use
  5. Save the file
  6. Restart SSH using service sshd restart
  7. Amend any firewalls you have setup to allow connection through your new port
  8. Log off SSH and then log back on now using the command:ssh username@111.111.111.111 -p 999 - again 999 being the new SSH port
  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

How to install NCFTP on CentOS

To install NcFTP on Linuxs' CentOS platform, simply enter the following commands in sequence: #...