If you have a Linux server, or a computer who can be accessed from the internet by using secure shell, it is good practice to disable SSH root login, this is because most brute force attack try to login to your computer remotely by using the root username, and trying many different passwords until they match yours. Of course, it is also good practice to have a strong and long password too. In order to disable root login from SSH, you need to edit the file “/etc/ssh/sshd_config” and change “PermitRootLogin” to “no”:
# nano /etc/ssh/sshd_config
Find “PermitRootLogin” and change to “no”:
Then you need to restart the SSH daemon with systemctl:
# systemctl restart sshd
After performing this procedure, you will only be able to login with your normal user, root user will be locked up. Of course, you can use your account to run commands as root with sudo still. This will protect your machine from bruteforce attacks.
For more information on protecting Linux machines, you can check the article in the Arch Linux wiki which talks about protecting SSH by clicking here.
Note: This post was posted on my old website on April of 2015, to view the original post, click this link.