Enable ssh root login

For security purposes, most preinstalled operating systems disable SSH login for the root user by default. However, if you still need to execute commands with root-level permissions, you can simply use sudo, su -, or a combination sudo su - commands after logging in with your normal user credentials via SSH.

If you find it necessary to enable SSH login as root, please follow the steps below, but do keep in mind that this is generally not recommended as it can potentially weaken the security of your VPS or dedicated server:

Open your terminal and log in to your server via SSH with your regular user account.

Open the SSH configuration file by typing

sudo nano /etc/ssh/sshd_config.

Look for the line that says PermitRootLogin no. Change this line to PermitRootLogin yes. This modification permits the root user to login via SSH.

Save your changes and exit the editor (on nano, press Ctrl + X, then Y + Enter to confirm)

For these changes to take effect, you need to restart the SSH server. Run the command

sudo systemctl restart sshd.

Enabling root login weakens the security of your VPS or dedicated Server and is therefore not recommended.

  • ssh, VPS, root, login
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Remove disc from sources.list

Want to update Debian but just recive this error?: Media change: please insert the disc...

Root user on Ubuntu / Debian

On standard Ubuntu and Debian does not offer a root user via ssh (unless you activate him), you...

Long password

For security reasons we always recommend to set strong and long passwords.But we also advise to...


Step-by-step guide sudo apt-get install python-pip sudo pip install speedtest-cli...

VPS Upgrade options/prices

 + 2GB RAM upgrade  = 4 eur/month (maximum RAM allocation 6GB) + 1 CPU-core upgrade = 5 eur/month...