Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Someone told me to disable SSH login with root for security reasons. Might I ask, why is this necessary, exactly? Wouldn't setting a very long (20+ chars long), full-printable-ASCII range, random password be as safe? That would take billions of years to brute force using supercomputers.

share|improve this question

closed as not constructive by Ye Lin Aung, TFM, wizlog, Mokubai, Journeyman Geek Mar 3 '13 at 14:34

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

    
This question is being voted to close as non-constructive - it is requesting opinion - see the faq. However, a reason for preventing root logins over ssh is because you are relying on the security of the remote system to be robust. A simple keylogger can defeat any strong password. –  Paul Mar 3 '13 at 5:20
1  
@Paul but if someone is keylogging me he'll be able to access the server and invoke "sudo password" just as I did. I still don't get it. –  Dokkat Mar 3 '13 at 5:23

1 Answer 1

It is always good practice to disable root access to a publicly accessible server. Use SSH keys instead as the only way to access your server via root. Root should only be used in an emergency anyway.

You never know if in the future an exploit may be found for the login of your server. My friend's server was hacked as he had root access via the web and his Linux system had a security flaw if a certain character was entered as the password.

Rather than making a better door lock, don't give them a door.

share|improve this answer
    
+1 QOTW for "Rather than making a better door lock, don't give them a door." –  Celada Mar 3 '13 at 3:08
    
I still don't get it. If someone exploited a security flaw to get the root password, he would be still able to use root by calling sudo from any user, so disabling root doesn't do anything on this case. –  Dokkat Mar 3 '13 at 5:24

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