Everybody seems to agree that granting SSH login to the root user is a Bad Idea (tm). But does this mean I should create an account for myself on every machine that I administer? One with sudo privileges? Do you usually create one generic account, or do you create one account for every mammal that's supposed to access that machine?

  • 1
    >> Everybody seems to agree that granting SSH login to the root user is a Bad Idea (tm). << Why? Using public key authentication exclusively and restricting access to my network(s) this is quite sane. – joschi Aug 23 '10 at 10:19
  • Certainly disabling root ssh access is good practice, but then only allowing root execution via 'sudo' is very restrictive and potentially dangerous - I'd recommend allowing 'su' (with root password). – symcbean Aug 23 '10 at 12:21

If you have a large number of users, or a large number of machines, consider using pam authentication and an ldap server. That way you have all your network authentication in one location.

That said, a generic user account with sudo rights may be helpful if network connectivity is lost.


It all depends. I agree with joschi that with public key authentication you are quite OK in terms of security. However, another reason why this may not be what you want is that you cannot easily trace who actually made what change. If people have to log in with their personal credentials and then use su or sudo, it's much easier to trace changes back to the originator.

We have a mixed environment, and we use MS Active Directory for user authentication everywhere, including all Linux servers. The IT folks (and we are only 5) also have key based access to the root accounts, in case we need it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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