Disable SSH Root Login with Webmin
Today, I am going to disable SSH root log in of the Linux web server. Here’s what I am going to do now:
- Force the use of SSH protocol 2, a newer and more secure SSH protocol.
- Disable root direct log in.
1. Log in Webmin as root. The following screen will appear.
2. Click the Others icon from the top menu, the window will be shown as the diagram below.
3. Click the File Manager icon, the window will be shown as the diagram below.
4. Find the sshd_config file at the following path:
5. Click the Edit button from the menu bar, the following window will pop up.
6. Find the following line:
Add the the following line to force using SSH Protocol 2:
This is shown in the diagram below:
7. Scroll down and find the following line:
Add the following line not permit direct root login:
This is shown in the diagram below:
8. Click on the “Save and Close” button to save the file.
9. Now, log in SSH as root and execute the following command to RESTART the SSH server:
This is shown in the diagram below:
10. Finished!
Now nobody can log in the Linux server as root. Anybody must first log in the server as admin and then switch to root by using the command ‘su –‘ if necessary.
It’s an remarkable paragraph in favor of all the web users; they will take benefit from it I am sure.