Enable SSH root login on Ubuntu/CentOS

By default the root’s ssh remote shell access is denied by default.

Any attempt to remote login as root will result inĀ Permission denied message:

root@'s password: 
Permission denied, please try again.

The following config will guide you through the process of enabling SSH root login on Ubuntu/CentOS

Step 1: Open config file

vi /etc/ssh/sshd_config

Step 2: Change line:

PermitRootLogin prohibit-password
PermitRootLogin yes

Step 3: Restart service

systemctl restart sshd

After you restart sshd daemon you will be able to remotely login as a root user

Leave a Reply

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