SSH Password Authorization Tweak

Bashed

Well-Known Member
Dec 18, 2013
145
4
68
cPanel Access Level
Root Administrator
Ok, if I disable password auth in whm and use ssh key for root, I am not able to log in unless I enable direct root login access in sshd config. Is this normal or is there another workaround?

I use Secure CRT ssh client. I already generated a 2048 DSA pub key and imported it, authorized it. But, because direct root is disabled, it doesn't work.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,227
463
New Ok, if I disable password auth in whm and use ssh key for root, I am not able to log in unless I enable direct root login access in sshd config. Is this normal or is there another workaround?
Hello :)

This is only the case if "PermitRootLogin" is set to "No" in the /etc/ssh/sshd_config file. You can set this entry to "Yes" and restart the SSHd service if you want to allow access to the "root" user (you can still disable password authentication). There's actually a full guide on securing SSH on the following thread if it's something you are interested in:

SSH Hardening

Thank you.