• SavvyWolf@pawb.social
    link
    fedilink
    English
    arrow-up
    39
    arrow-down
    1
    ·
    2 days ago

    To just make this absolutely clear, this means that the private keys are vulnerable to be exiltrated by malicious code scanning my disk.

    If you have malicious code capable of scanning your disk it’s basically game over anyway. They can intercept your passwords and ssh connection no matter what you do.

    What’s the security model here? An app that gets user account access but gives it up if it can’t find exactly ssh keys?

    • cow@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      23 hours ago

      What’s the security model here? An app that gets user account access but gives it up if it can’t find exactly ssh keys?

      My guess is that a malicious package is scanning your home directory for stuff like SSH keys, GPG keys, AWS keys, etc. It would have filesystem access permission already in the MacOS sandbox due to running inside a common interpreter like node or python, but it might be restricted from stuff like attaching to other processes memory, where it could just get the keys out of bitwarden.

      Could also just be obscurity as most infostealers are programmed to grab keys from common locations and not many developers use bitwarden for keys.

      If you want something resistant to a fully compromised system you need to use something hardware backed, whether an external key or an internal secure enclave.

    • femtek@lemmy.blahaj.zone
      link
      fedilink
      English
      arrow-up
      3
      ·
      2 days ago

      I get it when you have multiple servers, a few of the recent attacks admins had tokens and ssh keys that had access to other things. But for a homelab with one server that has admin to everything anyway. Not much use.

    • taco_shale032@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      10
      arrow-down
      1
      ·
      edit-2
      2 days ago

      You can self host Bitwarden, which is what I assumed most people in this community do.

      I’m not entirely sure why this got downvoted, it’s not a terrible idea to put your keys in your password manager rather than leave them on disk in plain text.

      • i_am_not_a_robot@discuss.tchncs.de
        link
        fedilink
        English
        arrow-up
        13
        ·
        2 days ago

        Normally if people are worried they store their keys encrypted on disk and use ssh-agent. Putting them in Bitwarden is a little less secure because you’re distributing the encrypted files to more places and likely decrypting them on multiple devices. But it is convenient.

      • silenium_dev@feddit.org
        link
        fedilink
        English
        arrow-up
        1
        ·
        10 hours ago

        Oh shit, totally forgot about that. Yeah, then that’s definitely the worst solution ever, and we must write an article, no, multiple articles about how insecure SSH keys are!!!1!1!1!1!!

  • Kethal@lemmy.world
    link
    fedilink
    English
    arrow-up
    22
    ·
    2 days ago

    This doesn’t seem any different from encrypting them and using an ssh agent.

    • taco_shale032@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      4
      arrow-down
      6
      ·
      2 days ago

      I think that’s exactly what a password manager would do essentially, just in a user friendlier way.

  • Reannlegge@lemmy.ca
    link
    fedilink
    English
    arrow-up
    4
    ·
    2 days ago

    All of the things I ssh into have keys, there is no way I am trusting anything without keys. There is no way I am remembering a 256 bit RSA encrypted key or sharing it with any one who does not need it. I change the ssh port when I am first setting something new up on my network, typically before I do anything else.

    There are only two things on my network with port 22 open, the first one sounds kinda wrong but it is my firewall, but it is open so that things can get to a vLAN that has a pi zero 2 on it acting as a honey pot.

  • Venia Silente@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    10
    ·
    2 days ago

    Using something like Bitwarden? Why not just pass?

    Also a good note on the “panic”, sometimes when I read these articles they read like this:

    You can’t keep your SSH keys on disk! It’s unsafe! Give them to Huang, or the competition will!