In this post/article i will describe how to increase your security to prevent hacking attacks from the SSH server. You should apply some configurations and tweaks on the SSH server to ensure the maximum security of your server.
Follow the below instructions:
- Login to your server through SSH with root access.
Change SSH Port:
The first step of this tutorial is to change the default port of the SSH server. This is most usable way to protect your server from SSH attacks.
# nano /etc/ssh/sshd_config
- Find the line in that page:
What ports, IP and Protocols we listen forPort 22
- Change the Port 22 to any integer you like e.g:
Port 2011
- and save the configurations. Restart the SSH server:
# service sshd restart
Note: You should not use the port number that is already being used by another services