How to Disable root SSH login on Linux


How to Disable root SSH login on Linux

This post will help with How to Disable root SSH login on Linux.

If you are interested in learning, Request you to go through the below recommended tutorial.

Providing direct login access to root via SSH is not a good practice. Administrators should use sudo to switch to root after logged in as themselves. this will helpful in auditing in terms of security.

Here is the step by step procedure to disable/deny direct root login via SSH

How to Disable root SSH login on Linux

Login to the server as Root, Edit the file /etc/ssh/sshd_config and search for the line,
PermitRootLogin=Yes
and then change the value of it to,
PermitRootLogin=No
Restart the sshd service
service sshd restart
or
systemctl reload sshd

Hope the post helped you to disable root SSH login on Linux.
Keep practicing and have fun. Leave your comments if any.

Support Us: Share with your friends and groups.

Stay connected with us on social networking sites, Thank you.

Post a Comment

0 Comments