How to access WHM panel with Disabled root user

Operating System & Version
AlmaLinux 8
cPanel & WHM Version
110.0.5

udayasl

Member
Jan 11, 2022
7
0
1
Sri Lanka
cPanel Access Level
Website Owner
1. First I created a new user and added it to the wheel group

2. I disabled SSH access for the root user by editing /etc/ssh/sshd_config and set PermitRootLogin no, then I restarted SSH service.

3. Then I tried to log into the WHM panel using root user, it failed, then tried with the user added to the wheel group, it also failed.

4. Then I revert the configuration through the user using the terminal and now everything is back to normal.

But my question is, is there a way to block root SSH access and then log into WHM panel?

Also I need to know by disabling root SSH access, will it affect functionality of Cpanel/WHM?
 

quietFinn

Well-Known Member
Feb 4, 2006
2,024
542
493
Finland
cPanel Access Level
Root Administrator
root SSH access is disabled in all our servers, and I believe it's a common practise.
It does not affect functionality of cPanel/WHM in any way.
 
  • Like
Reactions: cPRex

cPanelWilliam

Administrator
Staff member
Mar 13, 2018
221
41
153
Houston
cPanel Access Level
Root Administrator
Hello,

Disabling direct root logins would not negatively affect the functionality of cPanel/WHM. We even recommend doing this in our documentation on securing SSH. Disabling direct root logins will not disable your ability to log in to WHM directly as root, as this would only impact SSH.

It does seem strange that your login as the wheel user failed. It's possible that the firewall or cPHulk blocked your IP address. With that said, we have a support article that provides a step-by-step guide on disabling direct root logins:

What to do if you want to disable direct root logins
 
  • Like
Reactions: cPRex

udayasl

Member
Jan 11, 2022
7
0
1
Sri Lanka
cPanel Access Level
Website Owner
I tried to log into WHM panel: example.com:2087 using the new username (Not root username) but it failed.

But I was able to access SSH using the newly created user.

But the new user was created using useradd command and it's not a Cpanel account.
 

cPanelWilliam

Administrator
Staff member
Mar 13, 2018
221
41
153
Houston
cPanel Access Level
Root Administrator
Hello,

@quietFinn is correct, a Linux user added via the useradd command would not have access to WHM. Logging in to WHM with a wheel user shouldn't be necessary since disabling direct root logins would only impact SSH. To clarify, the root user can still log into WHM when you disable direct root logins for SSH.
 
  • Like
Reactions: udayasl and cPRex