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.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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.
PermitRootLogin yes
when i write this “nano /etc/ssh/sshd_config” command then I get a warning [ Directory ‘etc/ssh’ does not exist ]
Really? That’s pretty strange. It should be under # Logging section.
# Authentication:
LoginGraceTime 120
PermitRootLogin no
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.