I installed Rocky Linux 9.1 minimal version; I can’t use ssh with root user… Can someone help me?
Tank you
By default, ssh on root user requires an SSH key to be uploaded to /root/.ssh/authorized_keys
, or put:
PermitRootLogin yes
in /etc/ssh/sshd_config
Hi @josep68 ,
There was a spot in the install where you could turn root
access on, but in RL 9.x, ssh is turned off for the root user by default. You can turn it back on again by editing the file /etc/ssh/sshd_config
then find the “Authentication” section and add in:
PermitRootLogin yes
Having root logins via ssh turned off, is considered a security feature. You should use your user account to ssh in, and then su root
after you get in, but it is possible to turn root logins back on using the above.
Hope this helps!
Steve
And that choice creates a *.conf -file in directory /etc/ssh/sshd_config.d/
that contains the PermitRootLogin yes
Files in that directory override the content of /etc/ssh/sshd_config
Hence, it is better to add a file there than edit the /etc/ssh/sshd_config
.
Even better is to not allow ssh password authentication for root. Use keys.