How to check SSH is post-quantum safe: OpenSSH ML-KEM, the 10.1 warning and fixes
A step-by-step guide to confirming your SSH connections use post-quantum key exchange (mlkem768x25519-sha256), reading the OpenSSH 10.1 warning, and fixing servers that do not.
· 6 min read
Written by AI from the sources linked below. How we use AI
On this page
- In short
- Why key agreement is the urgent part
- What "hybrid" means
- Step 1: check a connection
- Step 2: understand the warning
- Reading the results
- Step 3: see what the client and server support
- Step 4: what to do if you cannot update a server yet
- What this does not protect
- A quick fleet audit
- Common questions
- Sources
In short
SSH is post-quantum safe for key agreement when the client and server negotiate a hybrid algorithm: mlkem768x25519-sha256 (OpenSSH 9.9 and later) or sntrup761x25519-sha512 (OpenSSH 9.0 and later). Current OpenSSH clients and servers prefer these by default, so for most people the job is not configuring anything but finding the old servers, appliances and libraries that still negotiate plain elliptic-curve key exchange, and updating them. This guide shows how to check a connection, what the OpenSSH 10.1 warning means, how to find out what a server offers, and what to leave alone.
It is timely: on 2 December 2026 the NSA published an advisory urging an immediate move to post-quantum cryptography, and we explain it in our report on the advisory.
Why key agreement is the urgent part
Every SSH session begins with a key agreement: client and server derive a shared secret, and the session's encryption keys come from it. The OpenSSH project explains that if an attacker can break the key agreement they can decrypt and view the whole session, and that the attacker need not do it in real time. They can record encrypted sessions now and decrypt them later once a cryptographically relevant quantum computer exists. This is the "store now, decrypt later" (or "harvest now, decrypt later") attack.
Signatures work differently. Most signature algorithms in use today, including RSA and ECDSA, can in principle be broken by a quantum computer, but OpenSSH points out there is no equivalent record-now risk for them: the urgency is retiring classical signature keys before such a computer arrives. OpenSSH says it will add post-quantum signature algorithms in future. That is why this guide is about the key exchange, which you can fix today, and not about host or user keys.
How soon might such a machine exist? OpenSSH's own page says estimates range from 5 to 20 years, with many observers expecting the mid-2030s. It also gives an answer to the skeptic who thinks it will never happen: if quantum computers are practical, you protected vast quantities of data; if not, you moved to algorithms with stronger mathematical underpinnings.
What "hybrid" means
Neither algorithm replaces classical cryptography on its own. Both combine X25519, the elliptic curve exchange SSH has used for years, with a post-quantum algorithm: ML-KEM-768 (the NIST-standardised lattice scheme) in mlkem768x25519-sha256, and Streamlined NTRU Prime in sntrup761x25519-sha512. The session is safe if either half holds. We explain the lattice maths in our lattice cryptography explainer.
The OpenSSH history, from its pages:
| Release | Date | Change |
|---|---|---|
| 9.0 | April 2022 | Post-quantum key agreement offered by default, initially sntrup761x25519-sha512 |
| 9.9 | Adds mlkem768x25519-sha256 |
|
| 10.0 | 9 April 2025 | mlkem768x25519-sha256 becomes the default |
| 10.1 | 6 October 2025 | Client warns when a connection uses a non-post-quantum key agreement |
| 10.5 | WarnWeakCrypto option added to the server too (per the release notes) |
The latest release the project's release notes list is Portable OpenSSH 10.6p2, dated 5 November 2026.
Step 1: check a connection
Run the client in verbose mode and read the key exchange line:
ssh -v user@host 2>&1 | grep -i kex
Look for the line that names the negotiated key exchange algorithm. If it shows mlkem768x25519-sha256 or sntrup761x25519-sha512, that session used a post-quantum hybrid. If it shows curve25519-sha256 or an ecdh-sha2-* curve, it did not.
With OpenSSH 10.1 or later you may not need to look: the client prints this warning by default when a session is not post-quantum:
** WARNING: connection is not using a post-quantum key exchange algorithm.
** This session may be vulnerable to "store now, decrypt later" attacks.
** The server may need to be upgraded. See https://openssh.com/pq.html
Step 2: understand the warning
The OpenSSH FAQ is direct. The warning means the server did not offer either post-quantum algorithm. The ideal fix is to update the server to an SSH implementation that supports at least one. Servers on OpenSSH 9.0 or later support sntrup761x25519-sha512, and 9.9 or later support mlkem768x25519-sha256. If your server is already new enough, check whether its KexAlgorithms setting has disabled them.
Typical culprits:
- Old distributions that still ship OpenSSH older than 9.0.
- Network gear and appliances with their own SSH implementation, which you update through the vendor, not through your package manager.
- Hardened configurations that pin
KexAlgorithmsto an explicit list written years ago. - Embedded and third-party libraries (some Go, Java, Python or Rust SSH libraries) used by tools that connect for you.
Reading the results
Three outcomes cover almost every case. First, the verbose output names mlkem768x25519-sha256: the session is protected against record-now attacks, and nothing more is needed for key agreement. Second, it names sntrup761x25519-sha512: also post-quantum, and a sign the server is older than 9.9, so schedule a routine update. Third, it names a plain curve such as curve25519-sha256: the server offered nothing post-quantum, and the cause is one of the four in Step 2. Work from the third group first, and prioritise hosts that carry sensitive data or are reached over the open internet, because those are the sessions most worth recording.
Step 3: see what the client and server support
List the key exchange algorithms your client supports:
ssh -Q kex
On a server you administer, print the effective server configuration and check the kexalgorithms line:
sudo sshd -T | grep -i kexalgorithms
The default client list, from the OpenBSD ssh_config manual, begins with mlkem768x25519-sha256, then the two sntrup761x25519 names, followed by the classical curve25519-sha256, ECDH and Diffie-Hellman options. The client uses the first algorithm in its list that the server also supports, so a modern client talking to a modern server picks ML-KEM on its own.
If you need to change the list, prefer the modifier prefixes over rewriting it. In KexAlgorithms, a + appends to the default set, - removes algorithms from it (wildcards allowed), and ^ puts the listed algorithms first. For example, KexAlgorithms ^mlkem768x25519-sha256 places the ML-KEM hybrid at the head of the default list, while a hard-coded list stays frozen as new releases change the defaults. Better still, delete old pinned lists and let the defaults apply.
Step 4: what to do if you cannot update a server yet
The OpenSSH FAQ's guidance is to silence the warning only selectively, so you do not lose it for everything else. In ~/.ssh/config:
Match host unsafe.example.com
WarnWeakCrypto no-pq-kex
According to the manual, no-pq-kex disables only the non-post-quantum warning, while no disables all weak-crypto warnings. The default is yes, all warnings on. Treat a silenced host as technical debt: write down why, and who owns the update.
What this does not protect
- Authentication. Host keys and user keys are still RSA, ECDSA or Ed25519 unless you changed them. As above, there is no record-now risk for them, but they will need to move to post-quantum signatures as OpenSSH adds them.
- Other protocols. Traffic inside the SSH tunnel, or other services such as TLS, needs its own check.
- Endpoints. Post-quantum key agreement protects the network path. It does not help if the server is compromised, as in Microsoft's report of AI-assisted attackers breaching an ISP's Linux servers.
A quick fleet audit
- Inventory every SSH server version: package manager output for distributions, vendor consoles for appliances.
- From a current client, connect to each host and look for the 10.1 warning, or log the negotiated algorithm with
ssh -v. - For each host that warns, record the cause: version too old, pinned
KexAlgorithms, or appliance firmware. - Update what you can; remove stale
KexAlgorithmspins; schedule vendor updates for the rest. - Keep the per-host
WarnWeakCrypto no-pq-kexexceptions in version control with an owner and a date.
Common questions
Do I need to do anything on a recent Linux or macOS machine? If both ends run OpenSSH 10.0 or later, ML-KEM is already the default and you do not need to change a thing. Verify it with ssh -v.
Is a post-quantum algorithm less safe than X25519 alone? The hybrid design means an attacker would have to break both halves. OpenSSH also says it chose algorithms with good safety margins, because new algorithms might still turn out weaker than expected.
Is this a response to a specific attack? The quantum-computer case is the reason OpenSSH gives. The NSA's December advisory adds that AI companies disclosed discoveries affecting some cryptographic systems; the agency did not describe them, and its joint statement with CISA and the White House cyber office says recent AI advances do not present an immediate and widespread threat.
Sources
- OpenSSH, Post-quantum cryptography
- OpenSSH, Release notes
- OpenBSD, ssh_config(5) manual: KexAlgorithms and WarnWeakCrypto
- The Register, NSA pushes post-quantum cryptography, but quantum computers not the cause
Written by
The official account of the people who run audiotale.net: announcements, conversation starters and the newsroom's drafts. Posts written with AI say so. Every other account here is a real person.
Read next
NSA advisory 2 Dec 2026: move to post-quantum crypto now, citing AI discoveries
The NSA, CISA and ONCD told national security system owners to speed up the switch to ML-KEM and ML-DSA, citing AI-company disclosures as well as quantum computers. What to check in TLS and SSH.
audiotale.net team7 min read
CVE-2026-123158 sshole: OpenSSH 10.6p2 fixes Alpine login bypass, now exploited
A password of 257 bytes or more logs attackers into passwordless accounts on musl-based Linux such as Alpine; GreyNoise and Previdian have seen real intrusions.
audiotale.net team7 min read
OpenSSH 10.6p2: critical password bypass on musl Linux without PAM (Alpine), what to do
OpenSSH 10.6p2 works around a critical password authentication bypass on musl-based Linux without PAM, including Alpine. Turn off password logins first, then update.
audiotale.net team8 min read