If OpenSSH prints “WARNING: connection is not using a post-quantum key exchange algorithm”, the server you connected to agreed only on a classical key exchange. Traffic from that session could be recorded now and decrypted later by a quantum computer. The proper fix is to enable OpenSSH post-quantum key exchange on the server, usually by upgrading it or removing a KexAlgorithms line that disables the hybrid algorithms. The warning is not an error, and your current session still works.
This guide explains where the warning comes from and how OpenSSH added post-quantum support from version 9.0 to 10.6. It covers how the default mlkem768x25519-sha256 algorithm works, how to fix or deliberately silence the warning, and whether you should create the new mldsa44-ed25519 SSH keys yet.
What does “connection is not using a post-quantum key exchange algorithm” mean?
OpenSSH 10.1, released on 2025-10-06, added “a warning when the connection negotiates a non-post quantum key agreement algorithm.” A new client option, WarnWeakCrypto, controls it and is “defaulting to on.” According to the OpenSSH post-quantum page, the message begins “** WARNING: connection is not using a post-quantum key exchange algorithm,” mentions “store now, decrypt later” attacks and links to openssh.com/pq.html.
The warning is about the key exchange, which is the step where client and server agree on the session keys that encrypt everything afterwards. Your host key and your login key are not involved. If that step relies only on classical math such as X25519 or ECDH, a capable enough quantum computer could later recover the session keys from a recording of the handshake.
Why SSH is a “store now, decrypt later” target
OpenSSH has been concerned about this since OpenSSH 9.0. Its release notes describe “capture now, decrypt later” attacks, where an adversary records SSH ciphertext and decrypts it once a sufficiently advanced quantum computer exists. SSH sessions often carry credentials, configuration files, database dumps and secrets that stay sensitive for years. That makes them worth recording today.
On timing, the OpenSSH project cites estimates that a cryptographically relevant quantum computer could arrive in 5 to 20 years, and many expect the mid-2030s. Data recorded today has to stay secret for longer than that window, so key exchange is the urgent part.
How OpenSSH post-quantum key exchange evolved: 9.0 to 10.6
OpenSSH did not add post-quantum support in one release. The table below summarises the relevant changes from the official release notes.
| Version | Released | Post-quantum change |
|---|---|---|
| 9.0 | 2022-04-08 | Hybrid Streamlined NTRU Prime + x25519 (sntrup761x25519-sha512@openssh.com) becomes the default key exchange |
| 9.9 | 2024-09-19 | Adds hybrid mlkem768x25519-sha256, based on the FIPS 203 ML-KEM, “available by default” |
| 10.0 | 2025-04-09 | mlkem768x25519-sha256 becomes the default for key agreement; sshd disables finite-field (modp) Diffie-Hellman by default |
| 10.1 | 2025-10-06 | Client warns when a non-post-quantum key agreement is negotiated (WarnWeakCrypto) |
| 10.4 | 2026-07-06 | Experimental composite ML-DSA 44 + Ed25519 signatures, off by default |
| 10.6 | 2026-10-06 | Enables ssh-mldsa44-ed25519 signatures; sshd gains its own WarnWeakCrypto logging |
The OpenSSH 10.0 release notes describe ML-KEM as “considered to be safe against attack by quantum computers.” They also say it “has been standardised by NIST” and “is considerably faster than the previous default.” NIST published FIPS 203 (ML-KEM), FIPS 204 (ML-DSA) and FIPS 205 (SLH-DSA) on August 13, 2024. The latest release listed on openssh.org is 10.6p2, dated 2026-11-05.
The 10.0 removal of finite-field Diffie-Hellman affects only the server. The client still supports those methods by default, so an old server can still negotiate a classical exchange with a new client. That case is exactly what the warning is for.
How mlkem768x25519-sha256 works (RFC 10042)
The default algorithm is now standardised in RFC 10042, “Post-Quantum/Traditional Hybrid Key Exchange with the Module-Lattice-Based Key-Encapsulation Mechanism for Use in SSH.” Panos Kampanakis (AWS), Douglas Stebila (University of Waterloo) and Torben Hansen (AWS) wrote it. It is dated August 2026 and has Informational status. It defines three methods:
mlkem768x25519-sha256: ML-KEM-768 combined with X25519 (the OpenSSH default)mlkem768nistp256-sha256: ML-KEM-768 combined with NIST P-256mlkem1024nistp384-sha384: ML-KEM-1024 combined with NIST P-384
In each method, the client and server run a post-quantum key encapsulation and a classical elliptic-curve exchange in parallel. The two resulting secrets are concatenated and hashed: K = HASH(K_PQ || K_CL), using SHA-256 or SHA-384 depending on the method.
The OpenSSH project explains the reason for the hybrid design. Because the post-quantum method is combined with X25519, the result should be no weaker than the classical algorithm even if the post-quantum part is later broken. To break the session key, an attacker would have to defeat both components. TLS made a similar choice. Our explainer on X25519MLKEM768 as a TLS 1.3 standard covers the web side.
How to fix the post-quantum key exchange warning
The warning comes from your client, but the fix almost always belongs on the server. The OpenSSH guidance works in this order.
- Upgrade the server. Servers running OpenSSH 9.0 or later support
sntrup761x25519-sha512, and 9.9 or later also supportmlkem768x25519-sha256. Either algorithm satisfies the warning. - Check for a restrictive
KexAlgorithmssetting. If the server is new enough but you still see the warning, aKexAlgorithmsline insshd_config(or in the client’sssh_config) may be excluding the hybrid algorithms. Hardening guides written before these algorithms existed often pin a list like that. - Silence the warning only for specific hosts. If you cannot upgrade a device and you accept the risk, disable the post-quantum warning for that host alone instead of globally.
On the server, look for an explicit override:
grep -i kexalgorithms /etc/ssh/sshd_config /etc/ssh/sshd_config.d/*
If that returns nothing, sshd uses its built-in defaults. According to the current sshd_config(5) manual page, those defaults are mlkem768x25519-sha256, sntrup761x25519-sha512 (under both of its names), curve25519-sha256 (both names) and ecdh-sha2-nistp256/384/521, with no finite-field DH. If you need a custom list, keep the two hybrid algorithms at the front.
To silence the warning for one legacy host, add this to ~/.ssh/config, as shown on the OpenSSH page:
Match host unsafe.example.com
WarnWeakCrypto no-pq-kex
According to ssh_config(5), the no-pq-kex flag turns off only the warning about missing post-quantum key exchange. Setting WarnWeakCrypto no turns off all weak-crypto warnings, which is broader than most people need. The default is equivalent to yes, with all warnings enabled.
Server-side logging in OpenSSH 10.6
Since OpenSSH 10.6, sshd also has a WarnWeakCrypto option. It is on by default and logs when a client uses a key agreement scheme that is not post-quantum safe. It accepts the same no-pq-kex flag. Administrators can use those log entries to find outdated clients without waiting for users to report the warning.
How to check which key exchange your connection uses
The ssh(1) manual page documents two useful tools. To see which key exchange algorithms your client supports, run:
ssh -Q kex
If mlkem768x25519-sha256 is missing from the output, your client is older than 9.9. In the current client defaults, the preference list starts with mlkem768x25519-sha256, followed by sntrup761x25519-sha512, sntrup761x25519-sha512@openssh.com, curve25519-sha256 and others, and ends with diffie-hellman-group14-sha256. The related commands ssh -Q key, ssh -Q sig and ssh -Q key-sig list the key and signature types your client supports.
To see what a particular connection actually negotiates, connect with verbose output:
ssh -v user@host.example.com
The debug output shows the algorithm negotiation during the handshake. If you need more detail, you can repeat -v up to three times (-vvv). If the negotiated key exchange is curve25519-sha256 or an ECDH or DH method rather than one of the hybrids, that host is the one triggering the warning.
Post-quantum SSH keys: generating ssh-mldsa44-ed25519
Key exchange protects session confidentiality. Signatures prove the identity of hosts and users. OpenSSH now supports post-quantum signatures as well. OpenSSH 10.4 added “experimental support for a composite post-quantum signature scheme that combines ML-DSA 44 and Ed25519,” which was not enabled by default. OpenSSH 10.6 then enabled the “hybrid post-quantum ssh-mldsa44-ed25519 signature algorithm.” The name no longer carries the @openssh.com vendor suffix, and keys created with the experimental 10.4 support “must be regenerated and/or removed.”
The ssh-keygen(1) manual page lists mldsa44-ed25519 as a key type. Ed25519 remains the default when you run ssh-keygen without arguments, so you have to request the new type explicitly:
ssh-keygen -t mldsa44-ed25519
The current client defaults include ssh-mldsa44-ed25519 and ssh-mldsa44-ed25519-cert in both HostKeyAlgorithms and PubkeyAcceptedAlgorithms. The client and server both need a release that accepts the algorithm, though. Keep your existing key in place until every server you log in to supports the new one.
Key and signature sizes
The algorithm is specified in draft-ietf-sshm-composite-sigs-00, “Post-Quantum Composite Signatures in SSH,” by D. Miller. The draft is dated 21 August 2026, its intended status is Standards Track, and it also defines ssh-mldsa87-p384. For ssh-mldsa44-ed25519:
- Public key: 1,344 bytes (a 1,312-byte ML-DSA-44 key plus a 32-byte Ed25519 key)
- Signature: 2,484 bytes (a 2,420-byte ML-DSA-44 signature plus a 64-byte Ed25519 signature)
- Validity rule: a signature is valid only if both component signatures verify
The keys and signatures are larger than classical ones: a 1,344-byte public key and a 2,484-byte signature. For a broader comparison of post-quantum signature families, see ML-DSA vs SLH-DSA: signature sizes, speed and which to use.
Why key exchange matters more right now than signatures
The OpenSSH project notes that RSA and ECDSA are also vulnerable to quantum computers. Signatures, however, carry no “store now, decrypt later” risk. An attacker cannot record an authentication today and use a future quantum computer to go back and impersonate you in that session. For signatures, the task is to retire classical keys before quantum computers arrive.
That gives a clear order of work:
- Make sure every server negotiates
mlkem768x25519-sha256orsntrup761x25519-sha512, so that the warning disappears for real rather than being hidden. - Plan the move to hybrid signature keys for hosts and users once your whole fleet runs a version that supports them.
The same distinction between encryption and signatures applies outside SSH. At Hadamard we build BB84, an Ethereum Layer 2 that uses one-time addresses based on hash commitments instead of ECDSA keys. That design deals with the signature side of the problem for stablecoin payments. To see where other systems stand, our post-quantum migration tracker follows browsers, messengers, blockchains and standards.
FAQ
Is the “connection is not using a post-quantum key exchange algorithm” warning dangerous, and should I just turn it off?
The warning does not mean you have been attacked. It means the session could be recorded now and decrypted once quantum computers are powerful enough. Fix it on the server where you can. If you cannot, use WarnWeakCrypto no-pq-kex inside a Match host block for that host only, rather than disabling warnings globally.
Which OpenSSH version do I need for post-quantum SSH, on the client and the server?
For key exchange, both sides need OpenSSH 9.0 or later for sntrup761x25519-sha512, or 9.9 or later for mlkem768x25519-sha256. ML-KEM is the default from 10.0. The client warning appears from 10.1, and server-side logging arrived in 10.6. The non-experimental ssh-mldsa44-ed25519 signatures require 10.6.
Should I replace my Ed25519 SSH keys with mldsa44-ed25519 keys now?
It is not as urgent as fixing key exchange, because signatures carry no “store now, decrypt later” risk. Generate a mldsa44-ed25519 key once your servers run 10.6 or later, and keep your Ed25519 key until every server accepts the new type. If you made keys under the experimental 10.4 support, you have to regenerate them.
Is mlkem768x25519-sha256 still secure if ML-KEM is ever broken?
It is designed to be. The shared secret is derived from both the ML-KEM and the X25519 results (K = HASH(K_PQ || K_CL)). The OpenSSH project says the hybrid should be no weaker than the classical algorithm even if the post-quantum part is later broken.
Sources
- Post-quantum cryptography in OpenSSH, OpenSSH project (read 2026-11-17)
- OpenSSH release notes index, OpenSSH project (read 2026-11-17)
- OpenSSH 9.0 release notes, OpenSSH project (2022-04-08)
- OpenSSH 9.9 release notes, OpenSSH project (2024-09-19)
- OpenSSH 10.0 release notes, OpenSSH project (2025-04-09)
- OpenSSH 10.1 release notes, OpenSSH project (2025-10-06)
- OpenSSH 10.4 release notes, OpenSSH project (2026-07-06)
- OpenSSH 10.6 release notes, OpenSSH project (2026-10-06)
- RFC 10042: Post-Quantum/Traditional Hybrid Key Exchange with ML-KEM for Use in SSH, RFC Editor (August 2026)
- draft-ietf-sshm-composite-sigs-00: Post-Quantum Composite Signatures in SSH, IETF draft mirror (2026-08-21)
- ssh_config(5) manual page, OpenBSD (read 2026-11-17)
- sshd_config(5) manual page, OpenBSD (read 2026-11-17)
- ssh-keygen(1) manual page, OpenBSD (read 2026-11-17)
- ssh(1) manual page, OpenBSD (read 2026-11-17)
- NIST releases first 3 finalized post-quantum encryption standards, NIST (2024-08-13)
