Article overview

Help article

Why can't I login via SSH as root on a VPS with DirectAdmin?

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?
directadmin ssh package setting
To do so you will need to have or create a regular (SSH) user. This user has to use a package in which SSH Access has to be enabled as displayed in the above image. If that is not yet the case, you can enable it on 'Reseller Level' ('Manage User Packages'). Select the relevant package and check if 'SSH Access' is active. If not, do so and press Save to activate this change.

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.

Comments

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