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

  • lordnikon@lemmy.world
    link
    fedilink
    English
    arrow-up
    17
    arrow-down
    1
    ·
    1 year ago

    Yes it’s always better to login with a user and sudo so your commands are logged also having disable passwords for ssh but still using passwords for sudo gives you the best protection

    • Lemmchen@feddit.org
      link
      fedilink
      English
      arrow-up
      4
      ·
      1 year ago

      Sudo also allows for granular permissions of which commands are allowed and which aren’t.

    • grrgyle@slrpnk.net
      link
      fedilink
      arrow-up
      3
      ·
      edit-2
      1 year ago

      Also double check that sudo is the right command, by doing which sudo. Something I just learned to be paranoid of in this thread.

      Unless which is also compromised, my god…