Post

Day 3 of 100 Days of Devops

Disabling Root Login on SSH

Day 3 of 100 Days of Devops

Day 3

So the requirement is to disble root login via ssh on all 3 app servers.

in order to change the ssh config in linux, there is a file called /etc/ssh/sshd_config which may need to access via root

So we edit that file

sudo vi /etc/ssh/sshd_config

the search for PermitRootLogin yes

change it PermitRootLogin no

Save it (using :wq)

Verification

Then restart the ssh server since it is managed by systemd

sudo systemctl restart sshd.service

just in case if you make some mistake in sshd_config you may check your service status using

sudo systemctl status sshd.service

Thats all of today ! Thx Bye

This post is licensed under CC BY 4.0 by the author.