20% off every kit until 31 December. Code SAVE20 is added for you at checkout.

← All guides & playbooks

Engineering guide · Reviewed 30 November 2026

How to migrate SSH RSA keys to Ed25519

Create a separate Ed25519 key, add its public half beside the existing RSA key, and prove a new login works before revoking RSA. Repeat the check for server host keys and unattended CI jobs. Changing only one laptop leaves the rest of the estate behind.

About 5 seconds. No signup. Public endpoints only; internal systems and private keys need a separate inventory.

First, separate three different SSH decisions

User keys prove who can log in. Host keys prove which server you reached. Key exchange establishes the session secret. An Ed25519 user key changes neither the server’s host key nor the negotiated key exchange.

The name ssh-rsa in an algorithm list means RSA with SHA-1 signatures, disabled by default in OpenSSH 8.8. An RSA public key can still use SHA-2 signatures. Disabling that one name is useful legacy cleanup; retiring RSA also means removing rsa-sha2-256 and rsa-sha2-512. See the OpenSSH 8.8 release notes.

The free website check above finds other public dependencies. It does not connect to SSH or inventory private keys. Keep this work beside your migration checklist.

1. Inventory laptops, servers and automation

  • Record key owners, fingerprints, destinations and last use. Review ~/.ssh/config, SSH agents, each account’s authorized_keys, SSH certificate authorities and bastions.
  • Audit GitHub and GitLab account keys and repository deploy keys. Check CI secret stores, build runners, submodules, backup jobs and deployment agents. Deploy keys are separate from a developer’s account key.
  • Check client versions, server policies and appliances before rollout. Some FIPS-constrained environments do not permit Ed25519; use an approved alternative with your security team rather than bypassing that policy.
ssh -V
ssh-add -l
ssh-keygen -lf ~/.ssh/id_rsa.pub
ssh -G deploy@example.com | grep -E 'identityfile|hostkeyalgorithms|pubkeyacceptedalgorithms'
sudo sshd -T | grep -E 'hostkey|pubkeyacceptedalgorithms'

Do not paste private keys into tickets or logs. Use the public .pub file and fingerprint for inventory. Check the effective configuration for relevant Match blocks too.

2. Create and test a separate Ed25519 user key

ssh-keygen -t ed25519 -a 64 -f ~/.ssh/id_ed25519_work -C "work-ssh"
ssh-keygen -lf ~/.ssh/id_ed25519_work.pub
# Install ONLY the .pub file through your approved access workflow.
# Keep a working session open; test a NEW connection without multiplexing.
ssh -o ControlMaster=no -o ControlPath=none -o IdentitiesOnly=yes   -o PreferredAuthentications=publickey -o PasswordAuthentication=no   -o KbdInteractiveAuthentication=no -i ~/.ssh/id_ed25519_work deploy@example.com

Use a passphrase for a human-held key. Never overwrite the RSA file during generation. Add the public key through your normal administrator, GitHub/GitLab or authorized-keys workflow. Confirm the target key fingerprint in debug output and repeat with the actual CI runner identity.

For automation, update the secret reference, key registration and host trust together. Scope deploy keys to the repositories and permissions they need. Follow GitHub’s key generation instructions and GitLab’s SSH guidance.

3. Stage the server host key and algorithm policy

Back up the configuration and verify console or other recovery access first. If the host has no Ed25519 host key, generate it without replacing an existing file. Publish its fingerprint over a trusted channel. Do not accept a changed host key blindly or disable host-key checking.

# Only if this host key does not already exist:
sudo ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N ''
sudo ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub

# Merge into sshd_config using your configuration management:
HostKey /etc/ssh/ssh_host_ed25519_key
# Legacy SHA-1 removal only (modern OpenSSH already defaults to this):
PubkeyAcceptedAlgorithms -ssh-rsa
HostKeyAlgorithms -ssh-rsa

These minus-list settings remove algorithms from the defaults; they do not add missing Ed25519 support. Use a single effective setting for each option: OpenSSH generally uses the first obtained value. Check included files and conditional rules in the sshd_config manual.

After every required client supports the replacement, an estate deliberately retiring all RSA signatures can use the following policy instead of the two removal lines above. Migrate SSH CAs and certificates too if you use them.

PubkeyAcceptedAlgorithms -ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-rsa-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com
HostKeyAlgorithms -ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-rsa-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com

sudo sshd -t
sudo sshd -T | grep -E 'hostkey|pubkeyacceptedalgorithms'
# Reload via your OS service manager only after validation.

Test a fresh login after reload before closing the old session. Verify the negotiated host-key algorithm with ssh -v. Then revoke the old user/deploy public keys and remove obsolete host-key configuration through your normal change process. Keep a documented recovery route, rather than re-enabling RSA globally when one old job fails.

4. Check hybrid post-quantum key exchange separately

OpenSSH’s hybrid key exchange combines a classical component with a post-quantum component. Both peers must support a common method. Check supported methods with ssh -Q kex and the actual negotiation with ssh -v.

OpenSSH 9.9 added mlkem768x25519-sha256; its specifications table also records support for the standardized name sntrup761x25519-sha512 from 9.9. Older releases used the latter’s @openssh.com name. OpenSSH 10.0 made the ML-KEM hybrid the preferred default. Vendor backports and local policies can change availability.

A hybrid session does not make Ed25519 authentication post-quantum. Record the signature and key-exchange migrations as separate work items. For your web estate, continue with TLS certificates, login signing keys and DNSSEC signing.

Choose your next step

The free check is a starting point. Get the instructions, the evidence to send, or help with the review.

Fix-It Kit

£31.20was £39 + VAT

Fix what you control with your developer or AI coding tool. Includes a tailored checklist, prompts and read-only checks.

Buy the Fix-It Kit

Evidence Pack

£79.20was £99 + VAT

Put your findings in writing: a six-page PDF, editable customer and board documents, plus the complete Fix-It Kit.

Buy the Evidence Pack

Zero-Access Review

£1,500 + VAT

A fixed-fee engineering review of what a public scan cannot see. We never log in to your production systems.

Book a review

Questions engineers ask

Does disabling ssh-rsa remove every RSA key?

No. ssh-rsa names the legacy RSA/SHA-1 signature algorithm. RSA keys can still authenticate with rsa-sha2-256 or rsa-sha2-512. To retire RSA entirely, replace user and host keys and remove all three RSA signature algorithms from the applicable allowlists.

Is Ed25519 post-quantum?

No. Ed25519 is a classical signature scheme. Hybrid post-quantum SSH key exchange protects the session’s key agreement separately; it does not turn an Ed25519 identity into a post-quantum signature.

Will the website scanner check SSH keys?

No. The public scan checks website TLS, public login keys, DNSSEC and common email selectors. Inventory SSH servers, user keys and CI deploy keys separately on systems you are authorized to administer.

When can I remove the old RSA key?

After a fresh Ed25519 login works from each required client and runner, host fingerprints have been verified through a trusted channel, and your tested recovery access is available. Remove the old public key from each destination and revoke the old deploy key at its provider.

PostRSA Checkout

Checkout

Total

Billing
Have a promo or referral code?

Payment is processed by Stripe. See terms and privacy.

Fixed fee · Paid securely via Stripe · No production access required