I restricted the root login to no in the /etc/ssh/sshd_config file but my task has been failed. Attached my screenshot
@pkmisma, Lines starting with # are ignored. So your modification to PermitRootLogin was ignored by sshd. You need to restart the service too.