You can change the default SSH port for your Linux server as an added security measure.
To Change the SSH Port for Your Linux Server
Warning: Make sure the new SSH port does not conflict with any known or blocked ports.
To Change the SSH Port for Your Linux Server
- Connect to your server via SSH
- Switch to the root user
- Run the following command:
Bash:nano /etc/ssh/sshd_config
- Locate the following line:
Bash:#Port 22
- Remove # and change 22 to your desired port number.
- Restart the sshd service by running the following command:
Bash:service sshd restart