We are aware of a potentially service impacting issue. Learn more

How do I change my SSH port? Print

  • SSH, Port, Change, Change SSH, 22
  • 2

In order to help minimize the number of port scans/brute forcing on your SSH service, its a good idea to change the SSH port to something other than 22. Use a port high up, e.g. 8000-9000 is a good range to use.

1. SSH into your server

2. Open your SSH configuration file using "nano /etc/ssh/sshd_config"

3. Change "#Port 22" to "Port XXXX" replacing your chosen port in there obviously. Save the file

NOTE: Before this next step, ensure your Disable any Firewall you are using, or update it to include your new port.

4. Now run "service sshd restart"

Done!


Was this answer helpful?

« Back

Powered by WHMCompleteSolution