How to change SSH Port

By default your SSH port is 22 but you can change it to another port for added security.

1. Connect to your server via SSH using root and your password.

2. Run the following command:(use vi if you do not use nano)
# nano /etc/ssh/sshd_config

3. Locate the following line:
# Port 22

4. Remove the # and change 22 to your desired port number.(Ctrl+O Enter, then ctrl+X Enter)

5. Restart the sshd service by running the following command:
# service sshd restart

Was this answer helpful? 1 Users Found This Useful (1 Votes)

Powered by WHMCompleteSolution