Advance

Enable Root Login Via SSH In Debian 10

Enable Root Login Via SSH In Debian 10
4.3
(7)

Secure Shel allows you to handle your network service to control any unsecured situations. On Linux and Unix like Operating Systems, the root user act as a superuser who can do many things that an ordinary user cannot. To connect to your system remotely and do the administrative tasks you need to log in as a root user. In this article, you will learn How to Enable Root Login Via SSH In Debian 10. If you are preparing to buy your own Linux VPS, visit the available packages of Eldernode to purchase the best.

To let this tutorial work better, please consider the below Prerequisites:

A non-root user with sudo privileges.

To set up, follow our Initial Setup with Debian 10.

Tutorial Enable Root Login Via SSH In Debian 10 | Debian 9

Debian Linux does not allow to log in to the server as a root user via the SSH protocol and has been disabled from the main ssh configuration file by default. So, you will receive an error message (Due to security reasons) while you are trying to log in as a root user. The error message is ”Permission denied, please try again’. Join us with this article to review the process of enabling root login via ssh.

Recommended Article: Enable Root Login Via SSH In Debian 10

Loggin as root

When you log in with the root account, you are a special user with administrative rights. However, you must be ensured of your knowledge about commands you run since any careless or malformed command will make the entire operating system unusable. That’s why security reasons do not allow you to log in as root and you need to enable it. On Debian, it is originally enabled as a security precaution which means that you cannot directly log in as a root user over SSH.

Allow SSH root login on Debian

Since the PermitRootLogin parameter controls the ssh root permission, you must change its values. The parameter is /etc/ssh/sshd_config and the value of the PermitRootLogin is ”without-password”. So, you need to ser PermitRootLogin to yes to Permit root login.

How to Enable root login over SSH 

In the following, you can review the required simple steps of this guide. In this way, you can change the disabled default mode to enable and log in via SSH.

Open the ssh configuration file and use your favorite text editor.

nano /etc/ssh/sshd_config

Then, Search for PermitRootLogin and change its value to “Yes”. If the line exists and is commented out with a ”#”, remove the ”#”.

PermitRootLogin yes

Now, you can save the updated /etc/ssh/sshd_config file and restart the SSH server. Use the command below to do this:

systemctl restart sshd

that’s that, if you do not see any new error, you should be able to access your Debian server using the root user account via SSH protocol.

Conclusion

In this article, you learned How to Enable Root Login Via SSH In Debian 10. As you know, by default SSH root login is disabling in Debian since it is not recommending to use the root password via ssh. So, you can ssh to the server as a regular Linux user and then use the su command to login as the root user. In case you are interested in reading more, find our related articles on Install SSH Server on Linux and allow root user login.

How useful was this post?

Click on a star to rate it!

Average rating 4.3 / 5. Vote count: 7

No votes so far! Be the first to rate this post.

View More Posts
Marilyn Bisson
Content Writer
Eldernode Writer
We Are Waiting for your valuable comments and you can be sure that it will be answered in the shortest possible time.

6 thoughts on “Enable Root Login Via SSH In Debian 10

  1. Don’t forget to add ssh key to your root user, and to deny shell in your .ssh/authorized_keys

  2. How the hell I can save this file if i’m NOT root, guess why I am trying to enable ROOT in first place? This linux shit is killing me.

    1. Debian does not allow to log in to the server as a root user via the SSH protocol and has been disabled from the main ssh configuration file by default.

Leave a Reply

Your email address will not be published. Required fields are marked *

We are by your side every step of the way

Think about developing your online business; We will protect it compassionately

We are by your side every step of the way

+8595670151

7 days a week, 24 hours a day