Cart Control panel
Article overview

Help article

Why can't I login via SSH as root on a VPS with cPanel / WHM?

With our installations of web control panels such as DirectAdmin, cPanel or Plesk, SSH-access for the 'root'-account is disabled by default. This is due to security precautions (on average more than 80% of all brute force attacks on port 22 use 'root' as a user). If you try to log in via SSH as 'root', you will therefore always get a "Permission denied" output.

So how do I login via SSH on my VPS?
add user to wheelgroup in WHM
To do so you will need to have or create a regular (SSH) user in WHM. This user has to be added the wheelgroup, otherwise it will not have sufficient permissions. You can verify this by navigating to the 'Manage Wheel Group Users' option in WHM. Check if your 'user' is listed in the upper table. If not, add it to the group.

enable normal shell for user in WHM
Also check if you have Normal Shell* access listed in the 'Manage Shell Access' option of WHM. If not, please change this (change the option will be automatically saved).

switch to root
You can now login as this regular user via SSH. When logged in you can use the command ''su root' to switch to the root user. After that you can perform all desired operations as root.

The alternative is enabling root access in the configuration of your SSH server, but we do not recommend that. If you really want this changed, you can open the file /etc/ssh/sshd_config with your favorite editor and set the option 'PermitRootLogin' on "yes". Save these changes and reboot the SSH server to have these changes take effect.

Do you have a good idea?

Give us your idea! If it's popular we'll add it to the wishlist!

Has this article been helpful?

Create an account or log in to leave a rating.


Create an account or log in to be able to leave a comment.

Are you stuck?

Ask one of our specialists to assist you

Contact us