On a server I have a public key auth only for root account. Is there any point of logging in with a different account?

  • rtxn@lemmy.world
    link
    fedilink
    arrow-up
    15
    ·
    edit-2
    4 days ago

    It’s another slice of Swiss cheese. If the user has a strong enough password or other authentication method through PAM, it might stop or hinder an attacker who might only have a compromised private key, for example. If multiple users have access to the same server and one of them is compromised, the account can be disabled without completely crippling the system.

    Using sudo can also help you avoid mistakes (like accidentally rebooting a production server) by restricting which commands are available to the user.