Disable root login task - not able to validate ssh, please help

Hi @Goldenor @Tej-Singh-Rana @peterwhite @Inderpreet or anyone , I am unable to validate this Disable root login task.I have set PermitRootLogin no in /etc/ssh/sshd_config file and restarted sshd in all app servers.I can still ssh from jumphost to all app servers.Why is that?What I am doing wrong here?Please take a look at the attached screenshot.Any input is appreciated.Thanks.

Kind Regards

Hello nidhincn
You have to write “yes” instead of “no” and make sure after the changes, restart the ssh service.

Thanks buddy for your reply, much appreciated.Let me try that way.

How can i connect ?
Everytime it is asking for root or sudo password.

Hello riteshmishra01,
You can find in a below documentation for a particular server User and Password.

PermitRootLogin no : to disable direct access with root
PermitRootLogin yes : to enable it

Just uncomment the line on all app servers and restart sshd, it’s all

Thanks Goldenor for your response.I have completed the task successfully.I figured out that, I had to use ssh [email protected], instead I used ssh [email protected] for validation.silly mistake from my side.Much appreciated your reply.Thanks.

1 Like

haha yeah i was going to say youre logging in as tony so permitrootlogin has no effect :smiley: glad you figured it out! have a great day!

1 Like