forcing root login using keys instead of password
Hi guys,
I want to force SSH to limit root login to keys and disable password, while keep the other users' login through passwords. Could you please recommend a way to do that? Thanks :) |
In your /etc/ssh/sshd_config file make sure that PublicKeyAuthentication is "yes" and PasswordAuthentication and UsePAM are set to "no". There might be another directive or two that I'm not remembering off the top of my head. Try it and if it let's you in without a key, then there is another directive to disable.
|
Ignore that last post. I obviously didn't read the question very carefully.
There might be a way to do what you're asking but I think a better solution would be to disable root login and give sudo access to specific users who need admin access. |
I consider remote root login a risk (with or without keys). Rather create a user that knows the root password, let him/her login with his/her credentials and use 'su -' to gain root privileges.
|
Quote:
Code:
PermitRootLogin without-password |
Thank you guys, great help!!
|
All times are GMT -5. The time now is 06:34 AM. |