How to Check Your SSH Key Type and Upgrade It
Run `ssh-add -L` and read the first word of each line: that is your key type. GitHub's docs still tell you to generate Ed25519 keys, but Ed25519 is not post-quantum, and post-quantum SSH keys were not yet supported on GitHub in early December 2026. Seth Larson's fallback is P-384 or RSA-4096 if GitHub lacks ML-DSA support.
This is not an emergency, but it is a good job for the next few weeks. New NSA guidance and a post from Seth Larson landed in the first week of December 2026, and people are asking if their old SSH keys are a problem.
Everything below is plain text commands, so it is light on data. Still, do the server edits while your connection is steady. Getting cut off halfway through editing authorized_keys is no fun.
Why is everyone talking about SSH key types now?
Two things happened in early December 2026.
First, the NSA released a press release titled “NSA Advises Immediate Transition to Post-Quantum Cryptography to Protect National Security Systems”. Bruce Schneier’s write-up says organisations should record which algorithms each system uses, and check for any not approved in CNSA 1.0 or 2.0. The ones named include DSA, most elliptic curves other than P-384 or P-521, and EdDSA. Ed25519 is an EdDSA scheme.
Schneier and his commenters read this as a hint of an elliptic-curve weakness. Schneier says a source told him P-256 “was broken”, but he does not know the details. Treat that as unconfirmed.
Second, Seth Larson wrote that Google announced on 3 December 2026 that ECDSA P-256 root and intermediate CA certificates will not be accepted after 17 March 2027. He calls this “probably the strongest evidence” of an expensive break of 256-bit curves. That is his inference. He says it is not an emergency and suggests doing the upgrade over the next three months.
CISA’s current assessment, quoted by Schneier, is that recent advances “do not present an immediate and widespread threat”. A joint statement from companies including Amazon, Apple, Cloudflare, Google and Microsoft urges migrating “as soon as possible”. So: no panic, but don’t ignore it.
How do I check my SSH key type?
Start with the keys loaded in your agent:
ssh-add -L
The first field on each line is the key type. To list only the 256-bit curve keys (P-256 and Curve25519/Ed25519), use Seth Larson’s command:
ssh-add -L | grep -E '^[^ ]*(nistp256|25519)' | grep -vE '^[^ ]*ml-?dsa'
Careful here. That only lists keys currently loaded in the agent, not every file in ~/.ssh. Seeing nothing does not mean you are clear, so also go through the key files in that folder yourself, and write down which servers use which key.
How do I check my OpenSSH version and ML-DSA support?
ssh -V
ssh -Q key | grep -i mldsa
The second command checks for ML-DSA, a post-quantum signature option. It printed nothing on Seth Larson’s machine. He notes Ubuntu 26.04.1 ships OpenSSH 10.2p1, support for mldsa44-ed25519 arrives in OpenSSH 10.6p2, and SSH ML-DSA is still an IETF draft. Expect an empty result on most machines for now.
Is Ed25519 post-quantum?
No. People mix up two different things here.
- Key exchange is how your session is encrypted. OpenSSH added the hybrid
mlkem768x25519-sha256exchange in 9.9, and OpenSSH 10.0 (April 2025) made it the default. There is more on OpenSSH’s post-quantum page. - Authentication keys are the keys you log in with. These are still RSA, ECDSA or Ed25519 for most of us. Post-quantum versions are still a draft.
Updating OpenSSH deals with the first. Replacing your key files deals with the second.
Which new key type should I choose?
It depends on your tools.
- Ed25519: this is what GitHub’s docs tell you to generate. It is a sensible replacement for DSA, which GitHub says is unsupported. But it is not quantum-resistant, and EdDSA is on the NSA list of algorithms to check for.
- P-384 or RSA-4096: Seth Larson’s advice is to use these if GitHub does not yet support ML-DSA. Use
ssh-keygen -t ecdsa -b 384orssh-keygen -t rsa -b 4096. GitHub’s docs also give RSA-4096 for legacy systems without Ed25519. P-384 is one of the curves the NSA list leaves out of its warning. mldsa44-ed25519: use this only if your OpenSSH supports it and GitHub accepts it. As of December 2026, Seth Larson says GitHub did not. He points to GitHub discussion 214623 for updates, so check there before you generate anything.
If you keep keys in Bitwarden, note that it supports only Ed25519 and RSA SSH keys. For those users, Seth Larson treats RSA-4096 as the stop-gap.
My take: if your only goal is to stop using DSA or an old key, Ed25519 is fine today. If you want to move away from 256-bit curves, as the Google news suggests, pick P-384 or RSA-4096 and re-check GitHub’s ML-DSA support in a few months. The evidence of a P-256 break is thin, so I would not rush.
How do I generate the new key and add it to the agent?
- Generate the key. For Ed25519, GitHub’s command works on any platform:
ssh-keygen -t ed25519 -C "your_email@example.com"
For P-384:ssh-keygen -t ecdsa -b 384 -C "your_email@example.com" - Add it to the agent, per GitHub’s docs (change the filename if your key is not Ed25519):
– Linux:eval "$(ssh-agent -s)"thenssh-add ~/.ssh/id_ed25519
– macOS:ssh-add --apple-use-keychain ~/.ssh/id_ed25519, and putAddKeysToAgent yesandUseKeychain yesin~/.ssh/config
– Windows: in an elevated PowerShell runGet-Service -Name ssh-agent | Set-Service -StartupType ManualandStart-Service ssh-agent. Then in a normal terminal runssh-add c:/Users/YOU/.ssh/id_ed25519
One catch for hardware keys (-sk): per Seth Larson, OpenSSH ignores -b for ECDSA-SK, Ed25519 and Ed25519-SK. If you wanted P-384, check that you actually got one.
How do I update GitHub and my servers?
Add the new key first and remove the old one last. Do it the other way round and you lock yourself out.
- Add the new public key (the
.pubfile) in your GitHub account’s SSH key settings. - On each server, add the new public key as a new line in
~/.ssh/authorized_keys. Leave the old line in place for now. - Keep your current session open. In a new terminal, test a login to each server and to GitHub with the new key.
- Once every login works, remove the old public key from GitHub and from each server’s
authorized_keys. - Remove the old key from your agent and delete the old key files from your computer.
That follows Seth Larson’s order: generate the new key, store it in a password manager and delete the local files, test it, then remove the old key from services, the agent and the computer. The step people forget most is the servers, so write your list before you start.
What does this mean for small teams in East Africa?
This section is my own reading. I found no NITA-U, UCC or URA guidance on post-quantum cryptography or SSH key types, and nothing from Kenya either.
The NSA announcement is about US national security systems. It is not a rule for a private office in Kampala or Nairobi. But it is a useful prompt to tidy up, especially if a freelancer or old developer still has access to your server.
What I would do:
- List who has SSH access to which server, and with which key type.
- Replace any DSA keys, since GitHub says they are unsupported.
- Update OpenSSH on laptops and servers, which gets you the post-quantum key exchange default from 10.0 onwards.
- Plan the key swap inside Seth Larson’s three-month window, one server at a time, when the network is stable.
If you handle customer data and wonder about legal duties, ask a lawyer. Uganda’s Data Protection and Privacy Act 2019 has breach notification and cross-border rules, according to DataGuidance, but that is a commercial summary, not legal advice.
Common mistakes
- Thinking Ed25519 is quantum-safe. It is not.
- Treating the P-256 break as confirmed. Only one unnamed source and one author’s inference point that way.
- Trusting
ssh-add -Lalone and never looking in~/.ssh. - Deleting the old key before testing the new one on every server.
Frequently asked questions
How do I check if my SSH key is RSA or Ed25519?
Run `ssh-add -L` and read the first field of each line. That field is the key type. It only shows keys loaded in your agent, so also check the files in ~/.ssh.
Is Ed25519 safe from quantum computers?
No. Ed25519 is not post-quantum, and EdDSA is among the algorithms the NSA guidance, as reported by Schneier, tells organisations to check for.
Does GitHub support post-quantum SSH keys?
Not when Seth Larson wrote his article in early December 2026. Check GitHub discussion 214623 for updates before generating one.
What should I use if GitHub does not support ML-DSA yet?
Seth Larson suggests P-384 (`ssh-keygen -t ecdsa -b 384`) or RSA-4096. Bitwarden users are limited to Ed25519 and RSA.
Do I have to change my keys right now?
No. CISA says recent advances do not present an immediate and widespread threat, and Seth Larson says it is not an emergency. He suggests finishing within about three months.