Hello,
I could do ssh login with any other user except root.
root@W.X.Y.Z's password:
Access denied
root@W.X.Y.Z's password:
Access denied
root@W.X.Y.Z's password:
Please, help.
@Mawuena You are about to learn something very important and exciting with this issue. Before that happens, I would like you to ponder over few things and think as a Linux administrator whose one of the job is to also maintain best practices and ensure security of the linux server so that it is not susceptible to brute force attacks :
If you start thinking over these points I think you can understand many things as to why this is happening, how to check the cause , then to troubleshoot and implement alternative solutions. These points not only covers ssh concept but encompasses several other concepts that is part of daily job of Linux admins.
Thanks a lot @Chetan_Tiwary_ . I have learned more.
You are perfectly right. Especially, for cybersecurity requirements, ssh with root must not be allowed, and may even lead to a major non-conformity in audit.
I am working in a testing environment for now before porting or migrating to live production.
I am just very curious in trying to understand why "PermitRootLogin yes" is not giving ssh root acces, and what further to do to finally give ssh root access.
sudo vi /etc/ssh/sshd_config
PermitRootLogin Yes
#Make sure the above line is available. ou can also add extra security by only allowing root login from specific trusted IP
Don't forget to restart sshd.
sudo systemctl restart sshd
@ShepherdZW Thanks.
As you can see from the copy of the screen below, I followed the step, but still access is denied for ssh root@192.168.14.135.
[root@node1 berag]#
[root@node1 berag]# tail -n 5 /etc/ssh/ssh_config
# update-crypto-policies(8) and ssh_config(5).
Include /etc/ssh/ssh_config.d/*.conf
PermitRootLogin yes
AllowUsers root@192.168.14.134
[root@node1 berag]#
@Mawuena Root access over ssh is denied in RHEL 9 by default.
Where are you editing the setting ? Did you restart the service post that ?
how about creating a drop-in file under /etc/ssh/sshd_config.d/file.conf and mention the settings there ?
did you try generating ssh keys and copying it over to the client ?
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.