Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
    
possible duplicate of Disable ssh password authentication by user –  quanta Oct 31 '11 at 4:44
1  
This isn't exactly a duplicate, since there is a root-specific alternative. –  Ignacio Vazquez-Abrams Oct 31 '11 at 4:47
add comment

1 Answer

up vote 11 down vote accepted

From the sshd_config(5) man page:

PermitRootLogin
          ...

        If this option is set to “without-password”, password authentica-
        tion is disabled for root.
share|improve this answer
    
Thank you! I usually read the manual before asking, but this seemed sufficiently complicated enough not to be in the manual. I was expecting some kind of iptables solutions, but this is better, obviously! –  Soviero Oct 31 '11 at 4:51
1  
I would be kind of wary of putting PermitRootLogin without-password into my sshd configuration! –  Michael Kjörling Oct 31 '11 at 10:10
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.