Thursday, February 19, 2026

Enable or Disable root from SSH

The following steps worked for me in Ubuntu 24.04 LTS. 

*Open up command line

*User vi or nano to open this file /etc/ssh/sshd_config 

In this file, search for the line “PermitRootLogin” and update the line to look like in the below file excerpt. On some Linux distributions, the “PermitRootLogin” line is preceded by the hashtag sign (#) meaning that the line is commented. In this case uncomment the line by removing the hashtag sign and set the line to no or yes as needed.

*PermitRootLogin no / yes

If using VI type ESC and :wq to save changes

After changes made in the terminal type systemctl restart sshd

 

From <https://www.tecmint.com/disable-ssh-root-login-in-linux/> 


 

 

No comments:

Post a Comment

Introduction

Introduction

I've worked in IT for many years at this point. I thought I would share some of the things I had learned. When I went to review my note...