Enable root login via SSH on Debian 9.0 Server

In some cases this method is not recommended and even it is advisable to disable root login via SSH to enhance the security of our server. But, in case you need full root access via SSH on a Debian 9.0 Server, we can do some little trick.

debian 9 screenfetch.png

How to enable root login via SSH on Debian 9.0 Stretch

To give root access via SSH, we need to edit sshd_config file. I use nano to edit the file.

nano /etc/ssh/sshd_config

Now add the following line to the file

PermitRootLogin yes

Close and save the file and then restart sshd service

systemctl restart sshd

That’s it. Now you can try login from other computer using root accoung. Should be working by now. But again, this method is not recommended.

Thank you.

4 Comments

Leave a Reply

Your email address will not be published.


*