"** WARNING: connection is not using a post-quantum key exchange algorithm": what it means and what to do
Short answer. OpenSSH 10.1 and later print this when the session key was agreed with a classic algorithm instead of a post-quantum one. Your login works and nothing is broken today. The concern is recordings: someone who stores the encrypted traffic now could decrypt it years later, once a large quantum computer exists. The real fix is on the server, where OpenSSH 9.0 or newer has a post-quantum key exchange on by default. If you can't upgrade the server, turn the warning off for that host only.
The whole message is three lines:
** 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
To silence it for one server you can't fix, in ~/.ssh/config:
Match host old-server.example.com
WarnWeakCrypto no-pq-kex
What the warning means
Every SSH connection starts with a key exchange: the two sides agree on a secret key for the session without sending it over the wire. The classic methods (curve25519-sha256, ecdh-sha2-nistp256, the diffie-hellman groups) are safe against today's computers. A sufficiently large quantum computer could break them.
No such computer exists yet. OpenSSH's own page puts the estimates at 5 to 20 years, with many observers expecting the mid-2030s [1]. The warning is about what happens in between. An attacker who can record your encrypted sessions today can keep them and decrypt them when the hardware arrives. OpenSSH calls this store now, decrypt later
[1].
So the question to ask is not am I being attacked
but will what I send in this session still matter in ten or fifteen years
. Passwords you type, private keys and configuration files you copy, and customer data you view all travel inside the session.
- What is not affected: signing in. Host keys and user keys are signatures, and a recording of a signature can't be used later to get in. OpenSSH says there is no store-now-decrypt-later problem for signatures and plans post-quantum signature algorithms later [1].
- What the fix looks like: a hybrid key exchange.
mlkem768x25519-sha256combines the post-quantum ML-KEM with the classic X25519, so it is at least as strong as the classic method even if the new part turned out to be flawed [1].
Fix it on the server
The message says so itself: the server may need to be upgraded. OpenSSH has had post-quantum key exchange for years [1]:
- OpenSSH 9.0 (April 2022) made
sntrup761x25519-sha512the default. - OpenSSH 9.9 added
mlkem768x25519-sha256, and OpenSSH 10.0 (9 April 2025) made it the default [2]. - OpenSSH 10.1 (6 October 2025) added the warning and the option that controls it [3].
What to do, in this order:
- Check the server's version with
ssh -Von the server. Below 9.0, upgrade OpenSSH through the system's package manager or upgrade the system. - If the version is new enough and the warning still appears, someone has pinned an old list. Run
sudo sshd -T | grep -i kexalgorithmson the server. Ifmlkem768x25519-sha256andsntrup761x25519-sha512are missing, find theKexAlgorithmsline insshd_configand remove it, or put those two names first. - Reconnect and check what was negotiated:
ssh -v server 2>&1 | grep 'kex: algorithm'.
If the other end isn't OpenSSH (a switch, a storage appliance, a hosted service), its key exchange list is the vendor's decision. Ask for a firmware release with mlkem768x25519-sha256, and until then treat it as a host you can't fix.
Turn it off on the client
The option is WarnWeakCrypto. Its value no-pq-kex turns off this one warning; no turns off all weak-crypto warnings; the default is yes [4]. Prefer no-pq-kex: the release notes say the option will probably cover more warnings in future [3], and you'd want to see those.
Keep it to the hosts that need it. OpenSSH's page shows it inside a Match host block [1]; a Host block works the same way. Under Host * you would also hide the warning for servers you could have fixed. For a single connection:
ssh -o WarnWeakCrypto=no-pq-kex [email protected]
One trap. Setting KexAlgorithms yourself also makes the warning disappear, without making the connection post-quantum. In the OpenSSH 10.3 source, the warning is printed only when KexAlgorithms was not set in the configuration [5]. If you added KexAlgorithms +diffie-hellman-group14-sha1 for an old switch, ssh assumes you chose the list on purpose and stays quiet.
On a Mac, no warning doesn't mean post-quantum
That trap applies to every Mac out of the box. macOS ships its own defaults in /etc/ssh/crypto.conf, and on macOS 26.6 that file contains KexAlgorithms ^ecdh-sha2-nistp256: the classic NIST P-256 exchange goes to the front of the list.
We checked what that does on 4 December 2026, on macOS 26.6 with OpenSSH_10.3p1, against a local OpenSSH server that supports mlkem768x25519-sha256. The stock ssh negotiated ecdh-sha2-nistp256 and printed no warning. The same command with -F none, which ignores the configuration files, negotiated mlkem768x25519-sha256. Against a server limited to classic methods, -F none showed the warning and the stock configuration did not.
If you want post-quantum key exchange from a Mac wherever the server supports it, move it to the front yourself in ~/.ssh/config:
Host *
KexAlgorithms ^mlkem768x25519-sha256
We tried this setting as a command-line option (-o), and the connection then used mlkem768x25519-sha256. The warning stays off, for the reason above, so check with ssh -v rather than waiting for a message.
What MyXterm offers
MyXterm is the free, open-source SSH client we build; its first stable release is v0.1.0. It has two SSH engines, and they differ here.
- The built-in engine (the default on Windows) offers
mlkem768x25519-sha256first, thencurve25519-sha256, the NIST ECDH curves and the SHA-2 Diffie-Hellman groups; a unit test pins that order [6]. It negotiated the hybrid with github.com and gitlab.com in our interoperability run of 28 November 2026 [7]. It does not offersntrup761x25519-sha512. It prints no warning of its own when a server only does classic key exchange, and the app doesn't show the negotiated algorithm yet; a connection diagnostics view is planned SSH-002. - System OpenSSH (the default on macOS and Linux) is your own
sshin a tab. You see exactly the warnings a terminal would show, yourWarnWeakCryptolines apply, and on a Mac the Apple order described above applies too. MyXterm doesn't override it [8].
A setting to order algorithms per session is not built yet partial SSH-106.
FAQ
Is my SSH connection insecure when I see the post-quantum warning?
Not against today's attackers. The session is encrypted with a classic key exchange that current computers cannot break. The warning is about someone recording the traffic now and decrypting it later with a quantum computer, so it matters most for data that must stay secret for many years.
How do I turn off the post-quantum warning for one host?
In ~/.ssh/config, add WarnWeakCrypto no-pq-kex inside a Host or Match host block for that server, or pass -o WarnWeakCrypto=no-pq-kex on the command line. Upgrading the server to OpenSSH 9.0 or newer removes the cause instead of the message.
Why don't I see the warning on macOS?
macOS sets KexAlgorithms in /etc/ssh/crypto.conf to prefer ecdh-sha2-nistp256, and OpenSSH only warns when KexAlgorithms was not set in the configuration. On macOS 26.6 the stock ssh negotiated that classic method without a warning, even with a server that supports mlkem768x25519-sha256.
Sources
Read on 4 December 2026. The macOS observations are from our own test on that day; MyXterm statements are from the repository on the same day.
- OpenSSH, Post-Quantum Cryptography: openssh.org/pq.html
- OpenSSH 10.0 release notes, 9 April 2025: openssh.org/txt/release-10.0
- OpenSSH 10.1 release notes, 6 October 2025: openssh.org/txt/release-10.1
- OpenBSD manual, ssh_config(5),
WarnWeakCryptoandKexAlgorithms: man.openbsd.org/ssh_config - OpenSSH portable 10.3p1 source,
ssh_login()in sshconnect.c: github.com/openssh/openssh-portable/blob/V_10_3_P1/sshconnect.c - MyXterm built-in SSH engine, key exchange order and the test
post_quantum_key_exchange_is_offered_first: crates/ssh/src/client.rs - MyXterm public interoperability run, 28 November 2026: docs/testing/PUBLIC_INTEROP_2026-11-28.md
- MyXterm feature list, SSH-106 and SSH-002: docs/features.toml
Last updated