Review GitHub SSH keys after replacing a work device
Match fingerprints to authorized devices and confirm alternate access before retiring a key.
The problem
You move to a new laptop and find several GitHub keys with names like Laptop. The title alone may not identify the right one. Inventory the device and owner for each key before removing anything.
The tool
GitHub recommends regularly reviewing SSH keys, deploy keys and authorized applications. This guide checks SSH keys in account settings against the fingerprint of a local public key. Use your own account and approved work devices.
The steps
- Open Settings in GitHub, then SSH and GPG keys. Record SSH key names and fingerprints where shown, with their apparent purpose.
- Find the
.pubfile that each device uses. Runssh-keygen -lf ~/.ssh/id_ed25519.pubwith the actual path to the public key. - Match each fingerprint to the account list. Record a recognizable device and the review date, and flag unresolved entries.
- Confirm the current device still has access. Perform an ordinary read on a training checkout and verify that it actually uses SSH.
- After confirming the retired device with its owner, remove the identified key from the account page. Investigate an unfamiliar key according to your organization's account response procedure.
- Repeat the test from the retained device. Check repository deploy keys separately if your builds use independent credentials, then record the review date.
The real cost
The review uses account settings. Time depends on how long it takes to inventory devices and confirm which jobs rely on repository access.
The free alternative
A small team can keep an internal register of fingerprints and check it each time a laptop is replaced. Limit the register to public-key data and ownership.
Notes
- We have not tried these steps ourselves yet. They are based on the official docs. Button names may change. If your interface differs, follow the docs.
- Do not share or request private-key files. Compute the fingerprint from the public file.
- Confirm an alternative access path before removing a key that might be the only one on a device.
Sources
Did you like this guide?
The weekly newsletter is being prepared. Leave your email and we'll send it when it launches.
We use your email only to send the newsletter. Privacy policy
