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.
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.
The general process would look something like:
You’ll need to perform the following steps for each SSH key you are replacing:
old_id_rsaandold_id_rsa.pub(obviously use the same type name as your key, just prefixold_)~/.ssh/config, add a line telling SSH to use the old key as well as the new ones:IdentityFile ~/.ssh/old_id_rsa(change the key filename as aporopriate)ssh-keygen -t ed25519~/.ssh/id_ed25519.pubkey to theauthorized_keysfile or equivalent mechanism. Do not remove the old public key yet.IdentityFileline from your~/.ssh/configauthorized_keysfile on each server you log in to.Depending on your threat model you’re going to want to do this more or less often, and so you may want to consider automating it with sonething like
ansibleif it’ll be a regular job.I hate this part.