Open Menu
AllLocalCommunitiesFeedsAbout
FBXL Lotide
AllLocalCommunitiesFeedsAbout
Login

You can't afford to keep your SSH keys on disk

⁨18⁩ ⁨likes⁩

Submitted ⁨⁨13⁩ ⁨hours⁩ ago⁩ by ⁨taco_shale032@lemmy.ml@lemmy.ml⁩ to ⁨selfhosted@lemmy.world⁩

https://jola.dev/posts/you-cant-afford-ssh-keys-disk

cross-posted from: lemmy.bestiver.se/post/1462999

Comments

original

Comments

Sort:hotnewtop
  • silenium_dev@feddit.org ⁨1⁩ ⁨hour⁩ ago

    Just use a password-protected private key?

    original
  • savvywolf@pawb.social ⁨2⁩ ⁨hours⁩ 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?

    original
    • femtek@lemmy.blahaj.zone ⁨1⁩ ⁨hour⁩ 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.

      original
  • Reannlegge@lemmy.ca ⁨51⁩ ⁨minutes⁩ 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.

    original
  • Mordikan@kbin.earth ⁨13⁩ ⁨hours⁩ ago

    So, instead of hosting your own SSH keys, you have a 3rd party host your SSH keys?

    original
    • KairuByte@lemmy.dbzer0.com ⁨12⁩ ⁨hours⁩ ago

      No, memorize them and type them in by hand every time you need them.

      original
      • Reannlegge@lemmy.ca ⁨1⁩ ⁨hour⁩ ago

        A 256 RSA key eh? Sure no problem.

        original
      • SpatchyIsOnline@lemmy.world ⁨11⁩ ⁨hours⁩ ago

        Hmm… Almost like some kind of… password? 🤔

        original
      • Zwuzelmaus@feddit.org ⁨10⁩ ⁨hours⁩ ago

        This is the way.

        original
    • bhhaskin@lemmy.bitsofsimplicity.com ⁨12⁩ ⁨hours⁩ ago

      Yeah if you are really concerned then use a yubikey or smart card.

      original
      • i_am_not_a_robot@discuss.tchncs.de ⁨11⁩ ⁨hours⁩ ago

        I’ve never tried it, but another option is ssh-tpm-agent or tpm2-pkcs11. Basically they use the TPM as a non-removable smart card, which is free and potentially more secure than a regular smart card because a smart card can’t normally verify the integrity of the OS that is talking to it. If you’re connecting from a Mac, Apple’s system is called Secure Enclave.

        original
    • taco_shale032@lemmy.ml@lemmy.ml ⁨12⁩ ⁨hours⁩ ago

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

      original
      • i_am_not_a_robot@discuss.tchncs.de ⁨11⁩ ⁨hours⁩ 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.

        original
  • Kethal@lemmy.world ⁨12⁩ ⁨hours⁩ ago

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

    original
    • taco_shale032@lemmy.ml@lemmy.ml ⁨12⁩ ⁨hours⁩ ago

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

      original
  • veniasilente@lemmy.dbzer0.com ⁨11⁩ ⁨hours⁩ 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!

    original