Task Failed - Disable Root Login

Hello KodeKloud Team - I have run all the steps correct for the above task. However, I still got my task failed. Please find the attached screenshots and kindly fix the issue. Thank you.

Task Failed - Disable Root Login After doing some security audits of servers, xFusionCorp Industries security team has implemented some new security policies. One of them is to disable direct root login through SSH. Disable direct SSH root login on all app servers in Stratos Datacenter.

Hi jsripad,

After making any changes to the sshd configuration file, you need to restart sshd service to make the changes effective.

$ systemctl restart sshd.service

Thanks,
Ram

Hello Ramashish - Thank you for your response. I did ran the same steps on all three app servers. However, it ran successfully on App2 and App3 but on App1. I have gone through a lot of threads after the task failure and I found that this happened to others as well. Please advise.

If that is the case, we need to check what exactly are the steps done by you on app server 1, for which you need to tag “@Inderpreet or @rahul456 or @kodekloud support” so that they can verify your activity logs and give you an update as what was missing for this task and it marked a failure.

Thank you Ramashish.
@Inderpreet @KodeKloud could you please verify my activity on appserver1 and advise ? Thanks in advance.

@rahul456, @KodeKloud can someone please help me fixing this task ? Thanks in advance.

@jsripad Just checked your answer, although you update PermitRootLogin no but you left it commented so this change will never be considered by the config. Also you haven’t restarted the service after making the changes.
Your task not only failed for app01 but it was supposed to fail for all apps but since usually validation checks app01 first and if it fails it gets interrupted.