How do you guys quickly sync your settings (especially bash aliases and ssh keys) across your machines?

Ideally i want a simple script to run on every new server I work with. Any suggestions?

  • Baron Von J@lemmy.world
    link
    fedilink
    arrow-up
    44
    ·
    9 months ago

    I suggest you don’t sync SSH keys. That’s just increasing the blast radius of any one of those machines being compromised.

    • RegalPotoo@lemmy.world
      link
      fedilink
      English
      arrow-up
      10
      ·
      9 months ago

      Exactly this. Don’t move private keys between machines. Generate them where you need them, it’s not like they cost anything

      • Baron Von J@lemmy.world
        link
        fedilink
        arrow-up
        4
        ·
        9 months ago

        Fair point, but I would equate that with syncing the authorized_keys file rather than thinking about how to sync the keys.

    • wmassingham@lemmy.world
      link
      fedilink
      arrow-up
      3
      arrow-down
      1
      ·
      9 months ago

      Right. Use some kind of centralized authentication like freeipa.

      For bash aliases, I just pull down a .bashrc from github gists.