Watch all our Tutorials and Training Videos for Free on our Youtube Channel, Get Online Web Tools for Free on swebtools.com

Search Suggest

How to Disable root SSH login on Linux

disable root login, disable root login linux, disable ssh root login, disable root user from ssh login, disable root user ssh linux, ssh root login

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.