Posted under Uncategorized
By permitting the root user to login directly is a major security issue.
We will show you how to disable it. So that you can login as root but not directly, reducing the security issue.
This forces the hacker to guess 2 seperate passwords to gain root access.
First of you will need to login as your admin user in SSH, then after that switch to the super user with the su command to get root.
We will be forcing the use of SSH protocol 2, which is a newer, more secure SSH protocol
There are some more ways to help your server stay safe from the Hackers. If you are using cPanel be sure that you add your admin user to the ‘wheel’ group so that you will be able to ’su -’ to root, otherwise you may lock yourself out of root.
1] SSH into your server as ‘admin’ and get root access by su
2] Copy and paste this line to edit the file for SSH logins
pico -w /etc/ssh/sshd_config
3] Find the line
Protocol 2, 1
4] Uncomment it and change it to look like
Protocol 2
5] Next, find the line
PermitRootLogin yes
6] Uncomment it and make it look like Permit Root Login no
7] Save the file Ctrl+X then Y then enter
8] Now you can restart SSH
/etc/rc.d/init.d/sshd restart
Now, no one will be able to login to root with out first loggin in as admin and ’su -’ to root, and you will be forcing the use of a more secure protocol. Be sure that you remember both the passwords.
