Thursday, January 28, 2016

ssh - Allow password access for all users except root?



I want to leave the root user enabled on my servers for convenience, and the only reason people are against the idea (that I know of) is brute-force attacks on SSH.



So, is there is a way in SSH to enable password access for all users except root, but allow ssh-key access for root?



OS: Ubuntu Server Edition 10.04 x86



SSH Version: OpenSSH_5.3p1 Debian-3ubuntu7, OpenSSL 0.9.8k 25 Mar 2009


Answer




From the sshd_config(5) man page:




PermitRootLogin
...

If this option is set to “without-password”, password authentica-
tion is disabled for root.



No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...