Log In | Register | January 30, 2023


Linux - October 17, 2011

Enable or Disable Direct Root SSH Login GNU / Linux

Disabling direct root ssh access to your GNU/Linux Box is great for security, but sometimes you just want to be able to directly login via root without that restriction.

You can disable or enable it by doing the following:

First open your /etc/ssh/sshd_config in a editor.

vi /etc/ssh/sshd_config

Next you will find a line that has permitrootlogin and it is either set to yes or no.

To enable direct root access set the value to yes like this:

permitrootlogin yes

To disable direct root access set the value to no like this:

permitrootlogin no

After you save the file, you will be able to login or not login via root depending on the value you set.

Post By: | FavoriteLoadingAdd to favorites


Leave a Comment

Need Help? Ask a Question

Ask anything you want from how to questions to debug. We're here to help.

You Must Be Logged In To Post A Question.

Log In or Register