I have WHM root access but unable to connect using SSH
I have root WHM password for a domain and I am able to login using following URL
http://domain_name/whm
But when I use the same root password to connect to server using SSH I get access denied message. How can I solve this issue? I want to login using root through SSH.
I am using Putty to connect.
Thanks
Solution 1:
Two Possibilities:
First, when you log into WHM's web interface, go to Security >> MAnage Wheel Group Users. Make sure that root is in the wheel group.
Second, check /etc/ssh/sshd_config by running cat /etc/ssh/sshd_config | grep PermitRootLogin
- If it says yes
then that's not your trouble. If it says no
or it says yes
but is commented out then... that's your trouble. Edit the text file with your editor of choice.
You might also consider leaving root SSH login disabled and create a regular SSH user and allow it then su -
to root from there. That's a wee bit more secure.
Solution 2:
You should check whether root is permitted to login remotely using SSH, this is configured in the /etc/ssh/sshd_config
file. You can either use the cpanel File Manager to open the file and edit the directives, or login to SSH as a local user and then change to the root
user with the su -
command.
From the console the commands to check is;
# grep -i Root /etc/ssh/sshd_config
#PermitRootLogin yes
# the setting of "PermitRootLogin without-password".
PermitRootLogin yes
If you need to Change PermitRootLogin yes
then you will also have to restart the sshd service.
Also, it is not clear that the users for WHM and local user accounts are using the same password database. According to the cpanel docs it looks like the root
user to login to WHM is also the system root
user - http://docs.cpanel.net/twiki/bin/view/AllDocumentation/CpanelDocs/Glossary#QqR
So it would seem that the problem use due to PermitRootLogin no