Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

share|improve this question

2 Answers 2

up vote 2 down vote accepted

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.

share|improve this answer
    
Yes root user is in wheel group. How can I check sshd_config if I cannot connect using SSH? Sorry I am not very familiar with Linux. –  Ali Apr 26 '12 at 10:34
    
@Ali You create a cPanel user that has SSH access rights (jailed access) and then su to root. –  Wesley Apr 26 '12 at 10:41

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

share|improve this answer
    
How can I check all this if I cannot connect using SSH? Sorry I am not very familiar with Linux. –  Ali Apr 26 '12 at 10:34
    
haha, see WesleyDavid he seems to be running in parallel to my thinking... –  Tom H Apr 26 '12 at 11:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.