Back to Newsroom

Threat intel5 min read

OpenSSH warns when SSH sessions skip post-quantum key exchange

Since OpenSSH 10.1, the ssh client warns when a connection uses a classical key exchange that a future quantum computer could break. Here is how to check your servers and fix it.

4Tify Team

OpenSSH warns when SSH sessions skip post-quantum key exchange

OpenSSH clients from version 10.1 onward print a warning every time a connection falls back to a key exchange that is not post-quantum. The login still works. The message is there to tell you that someone recording the session today could, in principle, read it once a large enough quantum computer exists.

What happened

OpenSSH 10.1, released on 6 October 2025, added a client-side check. When the client and server agree on a classical key exchange instead of one of the post-quantum hybrids, ssh prints:

** 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

The check is controlled by a new WarnWeakCrypto option in ssh_config, and it is on by default. Every OpenSSH release since then keeps it, up to the current 10.6 (portable 10.6p2, out on 5 November 2026). As more workstations, CI runners and jump hosts move to these versions, admins keep running into the message on servers that have worked unchanged for years.

Why it matters

Key exchange is the first step of an SSH session. The two sides agree on a shared secret without sending it over the network, and that secret protects everything after it: commands, terminal output, copied files.

The classical algorithms used for this step could be broken by a capable quantum computer. An attacker who captures encrypted SSH traffic now can keep it and try to recover the secret later. That is the "store now, decrypt later" risk named in the warning. No one has a quantum computer that can do this today. The OpenSSH project's own guidance cites estimates of 5 to 20 years, with many expecting one around the mid-2030s. The question for a security team is how long the data crossing your SSH sessions needs to stay private.

The warning concerns key exchange only. Host and user keys (RSA, ECDSA, Ed25519) are also not quantum-safe, but a recorded session gives an attacker nothing to break there later, so OpenSSH does not warn about them.

Who is affected

Anyone who connects from OpenSSH 10.1 or newer to a server that cannot negotiate a post-quantum hybrid. OpenSSH has supported one for a long time:

  • OpenSSH 9.0 (April 2022) added sntrup761x25519-sha512 and made it the default.
  • OpenSSH 9.9 added mlkem768x25519-sha256, built on ML-KEM, which NIST standardised as FIPS 203 in August 2024.
  • OpenSSH 10.0 (April 2025) made mlkem768x25519-sha256 the default.

Both are hybrids: they pair the post-quantum scheme with classical X25519, so the result is no weaker than X25519 alone even if the new part turns out to be flawed.

In practice the warning shows up on servers running OpenSSH older than 9.0, on long-lived appliances and network gear with their own SSH stacks, on hosted Git and platform endpoints that have not upgraded, and on newer OpenSSH servers where an old hardened KexAlgorithms line removed the hybrid methods.

What to do now

  1. Find out what was negotiated. Connect with ssh -v user@host and look for the debug1: kex: algorithm: line. mlkem768x25519-sha256 or sntrup761x25519-sha512 means the session is protected; curve25519-sha256 or an ecdh-sha2-* / diffie-hellman-* name means it is not.

  2. Upgrade the server to OpenSSH 9.0 or later (10.0 or later to get ML-KEM by default), or ask the vendor of the device or service when their SSH stack will support a hybrid.

  3. Check your hardening. If the server is already on 9.0 or newer, review KexAlgorithms in sshd_config and on the clients. Configurations copied from older hardening guides often list only classical algorithms.

  4. Silence the warning only per host. For a legacy box you cannot upgrade, the OpenSSH post-quantum page documents a scoped exception:

    Match host legacy.example.com
        WarnWeakCrypto no-pq-kex
    

    This hides the message and changes nothing about the encryption, so keep the exception narrow and put the host on your upgrade list. Avoid turning it off globally.

  5. Start with the connections that must stay private longest. Admin access to systems holding regulated, personal or long-lived business data should move first. An upgrade protects future sessions. It cannot help a session that was already recorded.

Old SSH servers rarely show up on anyone's list until a warning like this one appears. Our vulnerability scanning checks exposed SSH services for outdated versions and weak key exchange settings, so the hosts still negotiating classical-only algorithms are known before someone has to stumble on them.

NEWSLETTER

The week’s news,
every Friday.

A short email with what we published that week. You can unsubscribe from any of them.

FRIDAY DIGEST · SAMPLE4TIFY NEWSROOM

This week in security

  • 01Public exploit out for vBulletin flaw that needs no login
  • 02EAGERBEE, ShadowRelay and PhantomNet backdoors hit Russia and Belarus
  • 03European Commission IT outage leaves staff without VPN and email

+ 6 MORE IN THIS ISSUE · UNSUBSCRIBE IN ONE CLICK

ONE OFFER

More than one product?
Get one offer.

Tell us what you need to protect and your budget, monthly or yearly. We combine the products into one offer and one contract, sized to that budget, and we stay with you after it is signed.

Ask for an offer Just tell us how many assets you have and what you want to spend.