4 ms·
How am I supposed to automatically rotate keys given that: (1) Disabling password auth (which this appears to rely on) is literally the second thing I do on a
by JonathonW 11y ago
How am I supposed to automatically rotate keys given that:
(1) Disabling password auth (which this appears to rely on) is literally the second thing I do on a new machine (the first being to add the relevant pubkey(s), so I don't get locked out), and
(2) My SSH private keys all have a passphrase set (they may or may not be stored in ssh-agent at any given time, but that's irrelevant if I'm trying to automate this). So, using the old keys to log in and rotate to the new keys is also out.
I don't see how I manage key rotation without manual intervention at some point, which means I'll either forget to do it sometime, or I'll manage to mess it up and lock myself out of machines.
- darkr 11y agoManage them using a configuration management tool (e.g puppet/chef/ansible). Also, it's far better to have the pubkeys stored in a filesystem location (I.e not in the users home directory) that the ssh daemon has read access to, and no-one outside of root/config management has write access to.