My ssh keys are oldMany times I had the Idea to replace them and cleanup. Put the approach feels old not intuitive and i’m affraid of problems.

How do you manage keys and get sure they do ot get to old.

  • solrize@lemmy.ml
    link
    fedilink
    English
    arrow-up
    12
    ·
    14 hours ago

    Do you think they are compromised? Generally you have to invalidate the public keys in any .ssh_hosts file that accepts them, and create new ones instead. I generally install .ssh_hosts on remote machines using an ansible playbook. I don’t have any automation to cycle them but I guess I would also do that with ansible if I thought it were needed.

    Ansible may be old school by now, but it works for me. Maybe the cool kids are using something newer now. I want to look into nix or guix one of these days.

    • ratatouille@feddit.orgOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      6 hours ago

      Not compromised. But my key is around 20 years old. I’m a family admin and support my family since then with Linux and some selfhostung services.

      Meanwhile I need an identity provider or something else and in any case ssh feels like a more of a pain to manage.

      • solrize@lemmy.ml
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        5 hours ago

        Are you running a planet-wide server farm from your 20 year old key or what? Just a few machines? If you want to regenerate your key and fix the knownhosts files and it’s not too much hassle, then go ahead and do it. Do something else later if you want something fancier. Yes there are some hardware key encaapsulation approaches possible, some people like to use jump hosts as gateways (the remote hosts firewall block access to anything but the jump host) etc. Also people rely in part on virtual LAN security in their data centers or ISP’s.

        If it’s just a few personal machines you’re probably overthinking this. I just don’t store secret keys on any remote machines, but use ssh-keygen on my laptop and ssh -A from there.

    • 4am@lemmy.zip
      link
      fedilink
      English
      arrow-up
      3
      ·
      12 hours ago

      nix for local machine config, Terraform for VM wrangling, and Ansible to orchestrate it all