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

  • ShortN0te@lemmy.ml
    link
    fedilink
    arrow-up
    6
    arrow-down
    22
    ·
    9 days ago

    Nope, not really. The only reason ppl recommend it is, because “you have then to guess the username too”. Which is just not relevant if you use strong authentication method like keys or only strong passwords.

      • ShortN0te@lemmy.ml
        link
        fedilink
        arrow-up
        5
        arrow-down
        5
        ·
        9 days ago

        Most comments here suggest 3 things

        1. least privilege: Which is ok, but on a Server any modification you do requires root anyway, there is usually very little benefit
        2. Additional protection through required sudo password: This is for example easily circumvented by modifying the bashrc or similar with an sudo alias to get the password
        3. Multiuser & audittrails: yes this is a valid point, on a system that is modified or administered by multiple ppl there are various reasons lime access logging and UAC for that

        An actual person from the pen testing world: https://youtu.be/fKuqYQdqRIs

    • 4am@lemm.ee
      link
      fedilink
      arrow-up
      2
      arrow-down
      3
      ·
      edit-2
      8 days ago

      That is absolutely not the reason ANYONE recommends it, unless you are a complete noob and entirely unfamiliar with computer security at all, and are just pulling assumptions out of your ass. Don’t fucking do that, don’t post with confidence when you’re just making shit up because you think you know better. Because you don’t.

      If there is a vulnerability in SSH (and it’s happened before), attackers could use that to get into root directly, quickly, and easily. It’s an instant own.

      If root login is disabled, it’s way less likely that whatever bug it is ALSO allows them to bypass root login being disabled. Now they have to yeah, find a user account, compromise that, try to key log or session hijack or whatever they set up, be successful, and elevate to root. That’s WAY more work, way more time to detect, to install patches.

      If the effort is higher, then this kind of attack isn’t going to be used to own small fry servers; it’s only be worth it for bigger targets, even if they’re more well protected.

      If you leave root enabled, you’re already burnt. You’re already a bot in the DDoS network.

      And why? You couldn’t be bothered to type one extra command in your terminal? One extra word at the start of each command?

      Sorry bitch, eat your fucking vegetables