1. Home
  2. How to permit root login in centos/ubuntu
  1. Home
  2. How to permit root login in centos/ubuntu

How to permit root login in centos/ubuntu

First you need to open ssh config file one of the following commands:

nano /etc/ssh/sshd_config    or  vim /etc/ssh/sshd_config  or  vi /etc/ssh/sshd_config

After that you need to add this line on Authentication section.

PermitRootLogin yes 

Save and exit from sshd_config file.

Last you need to restart ssh service with this command:

service sshd restart

Now You can connect to the server with root user.

Updated on March 10, 2020

Was this article helpful?