You can Watch all our Tutorials and Training Videos on our YouTube Channel for Free! Subscribe Now! & Free Web Tools available on

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,
and then change the value of it to,
Restart the sshd service
service sshd restart
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

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.