Why can't i see the "permitrootlogin" section in my /etc/ssh/sshd_config file inside my ubuntu droplet

August 31, 2016 163 views
Getting Started Ubuntu

Please i am a new user and very new to cloud server management. i added ssh key to my root user, now i want to disable root login password. i loged in again as root user, typed nano /etc/ssh/sshd_config. the file opened in nano but i can't find the line / section from where i can change the "permitrootlogin" settings. any help will be appreciated plz.

1 comment
  • Hello!

    Have you modified /etc/ssh/sshd_config in any way since spinning up your Droplet? What's the output of the following command (which searches for any occurrences of root in /etc/ssh/sshd_config)?

    sudo grep -i root /etc/ssh/sshd_config
2 Answers

Really? That's pretty strange. It should be under # Logging section.

# Authentication:
LoginGraceTime 120
PermitRootLogin no

Be ware that there is a very similar looking file /etc/ssh/ssh_config (note there's no d).
You could potentially be looking in the wrong file.

Have another answer? Share your knowledge.