OpenSSH has supported post-quantum key exchange by default since version 9.0 in 2022, initially using sntrup761x25519-sha512@openssh.com. Since version 10.0, released in April 2025, the preferred default has been mlkem768x25519-sha256, a hybrid of ML-KEM and X25519.
If both ends of a connection support post-quantum key exchange, and their configurations permit it, SSH can negotiate a hybrid algorithm without any additional configuration. For most organisations, the migration needs to involve identifying where these algorithms aren't supported (older servers, network appliances, embedded devices and the SSH libraries used by scripts and automation).
The transition to post-quantum cryptography (PQC) is also gaining urgency. In December 2026, Amazon, Anthropic, Apple, Cloudflare, Google, Microsoft, OpenAI, and Oracle published a joint statement (opens in a new tab) calling on organisations to accelerate migration to NIST-standardised post-quantum cryptography.
We explain the use of the post-quantum key exchange, how to check which algorithm an SSH connection negotiates, where older systems tend to fallback, and the configuration changes that are needed.
What post-quantum SSH protects
Every SSH session starts with a key exchange, which is where the client and server will negotiate which cryptographic keys will be used to encrypt the rest of the session.
Traditional key exchange methods, including Diffie-Hellman, ECDH and X25519, rely on mathematical problems that a sufficiently powerful quantum computer could theoretically solve. As far as we know, nobody has built a cryptographically relevant quantum computer yet, but an attacker who records encrypted traffic today could store it and potentially decrypt it in the future. This is usually called "harvest now, decrypt later" (HNDL), and it is a reason that key exchange is an immediate priority for post-quantum migration.
OpenSSH's post-quantum methods use hybrid key exchange. The newer mlkem768x25519-sha256 combines ML-KEM-768, the NIST-standardised post-quantum key encapsulation mechanism, with the X25519 algorithm. The earlier sntrup761x25519-sha512 combines Streamlined NTRU Prime with X25519.
The hybrid construction is designed to retain security if either component remains secure. This provides protection against the possibility that a weakness is later discovered in one of the algorithms, rather than relying entirely on a single new cryptographic primitive.
Key exchange as a priority, signatures as a separate migration
Host keys and user authentication keys perform a different job. They use digital signatures to prove identity, where the server proves its identity to the client, and the client can prove its identity to the server.
A sufficiently powerful quantum computer could undermine conventional signature algorithms such as RSA, ECDSA and Ed25519, potentially allowing an attacker to forge identities. Unlike the harvest-now-decrypt-later threat against recorded traffic, this generally requires a quantum computer at the time the attacker attempts the forgery.
That makes post-quantum key exchange a more immediate priority, but it does not mean that signature migration is unimportant. Organisations will need time to inventory keys, update systems, test interoperability, and establish new trust arrangements.
OpenSSH 10.6, released in October 2026, introduced the hybrid signature algorithm ssh-mldsa44-ed25519. It is included in the default host-key and user-authentication algorithm lists.
However, existing Ed25519 and RSA keys are not automatically converted. Administrators aiming to use the new hybrid signature scheme must generate and deploy new keys. OpenSSH support also does not mean that every SSH implementation supports the same algorithm, or that the mechanism has been standardised by the IETF.
The practical difference is that the post-quantum key exchange protects the confidentiality of sessions against future decryption, while post-quantum signatures protect the authenticity of SSH identities against future quantum-enabled forgery. Both belong in a wider cryptographic migration plan.
How to check which key exchange a connection uses
An SSH installation can support post-quantum algorithms without necessarily using them. A useful audit needs to distinguish between what the client supports, what the server offers, and what the connection negotiates.
From the client
Start by checking which key exchange algorithms the local SSH client supports:
ssh -Q kex
Look for:
mlkem768x25519-sha256
sntrup761x25519-sha512
If neither appears, the client may need upgrading. However, ssh -Q kex lists algorithms supported by the client build, not necessarily those its configuration permits.
Check the effective configuration for a particular destination with:
ssh -G server.example.com | grep -i '^kexalgorithms '
To see what a specific connection actually negotiates, connect with verbose output:
ssh -v user@server.example.com
Look for the kex: algorithm line:
debug1: kex: algorithm: mlkem768x25519-sha256
This confirms that the connection negotiated a hybrid post-quantum key exchange.
From OpenSSH 10.1, the client also prints a warning when a connection doesn't use a post-quantum key exchange. This is controlled by the WarnWeakCrypto option and is enabled by default. Administrators should generally leave it enabled.
OpenSSH 10.6 also added the corresponding WarnWeakCrypto option to sshd_config, allowing the server to log clients that connect using classical key exchange.
Across the server estate
Checking one connection at a time doesn't scale well. Nmap's ssh2-enum-algos script can quickly enumerate the algorithms that are offered by SSH servers across a network range.
To run this script against an authorised range of systems:
nmap -n -Pn -p 22 -v --script ssh2-enum-algos <ip-range>
The -v option enables verbose output, which displays the individual algorithms offered by each server.
For example, a server might return:
Nmap scan report for <ip-address>
PORT STATE SERVICE
22/tcp open ssh
| ssh2-enum-algos:
| kex_algorithms: (10)
| mlkem768x25519-sha256
| sntrup761x25519-sha512
| sntrup761x25519-sha512@openssh.com
| curve25519-sha256
| curve25519-sha256@libssh.org
| ecdh-sha2-nistp256
| ecdh-sha2-nistp384
| ecdh-sha2-nistp521
| ext-info-s
| kex-strict-s-v00@openssh.com
...
Here, the server offers both ML-KEM and SNTRUP hybrid key exchange alongside classical algorithms. A server that doesn't offer either post-quantum algorithm may need further investigation.
There is an important difference between what the server offers and what a client will actually negotiate. A server may offer ML-KEM but still negotiate classical X25519 with an older client that doesn't support post-quantum key exchange.
Summary of the three checks
ssh -Q kexidentifies algorithms supported by the client.- Nmap's
ssh2-enum-algosscript identifies the algorithms offered by one or more servers. ssh -vagainst the server will identify the algorithm that is actually negotiated.
Where systems fall back to non-PQC algorithms
Post-quantum key exchange usually fails to negotiate because one end is older or uses a different SSH implementation. The usual places are:
Older OpenSSH installations: Versions before 9.0 don't use post-quantum key exchange by default. Older Linux distributions, particularly those on extended support, may still ship versions from before 2022. Check the actual OpenSSH build rather than relying solely on the distribution's release date, as vendors sometimes backport security features.
Network appliances: Firewalls, switches, storage arrays, hypervisors and out-of-band management controllers often use vendor-maintained SSH implementations. Their upgrade schedules may differ from those of the operating systems you manage.
Embedded devices: Some use Dropbear rather than OpenSSH. Check the version and supported algorithms rather than assuming all SSH implementations have equivalent post-quantum support.
SSH libraries: Scripts, configuration management tools and CI pipelines may use libraries such as Paramiko, libssh and Go's
x/crypto/ssh. These negotiate their own algorithms, so check the version and configuration of each dependency.Windows: Windows includes its own OpenSSH client and optional server. Check the installed version with
ssh -Vrather than assuming it matches the latest upstream release. Microsoft-maintained builds may follow a different release schedule from upstream OpenSSH.Jump hosts: With
ProxyJump, the originating client normally negotiates SSH directly with the destination through the jump host. However, if users log into a bastion and run SSH from there, the bastion's SSH client negotiates the second connection. Audit both situations.Managed SFTP and Git endpoints: Third-party services may use their own SSH implementations. Where possible, test their advertised algorithms and verify the negotiated key exchange.
Migrating to post-quantum SSH
Upgrading OpenSSH is the core recommendation. OpenSSH 9.0 introduced post-quantum key exchange by default, and 10.0 made mlkem768x25519-sha256 the preferred default. In many cases, no additional configuration is necessary.
The common exception is a hardened configuration that explicitly sets KexAlgorithms. Older security baselines and hardening guides may contain algorithm lists written before post-quantum methods were available.
Check the effective server configuration:
sudo sshd -T | grep '^kexalgorithms ' | cut -d " " -f 2- | tr ',' '\n'
This will output something similar to the following, which is what the effective configuration permits:
mlkem768x25519-sha256
sntrup761x25519-sha512
sntrup761x25519-sha512@openssh.com
curve25519-sha256
curve25519-sha256@libssh.org
ecdh-sha2-nistp256
ecdh-sha2-nistp384
ecdh-sha2-nistp521
If an explicit algorithm preference is necessary, OpenSSH supports the ^ prefix to place algorithms at the beginning of the default list without discarding the remaining defaults.
For OpenSSH 9.9 or later:
KexAlgorithms ^mlkem768x25519-sha256,sntrup761x25519-sha512
This prioritises the two hybrid algorithms while retaining the default fallback algorithms, including classical methods.
The ^ prefix is important, as without it an explicitly supplied list replaces the defaults. This approach also avoids maintaining a long list of fallback algorithms manually.
Before applying any configuration change, check that the installed OpenSSH version supports the algorithms specified. Test the configuration, which should not return any configuration warnings:
sudo sshd -t
Keep an existing administrative session open while testing a new connection, so that a configuration mistake doesn't leave you without remote access.
Once the configuration is updated, repeat the connection test:
ssh -v user@server.example.com
In the output, look for the following:
debug1: kex: algorithm: mlkem768x25519-sha256
This confirms that the connection actually negotiated the hybrid algorithm.
Strict requirement for a post-quantum key exchange
Some organisations may want to go further and refuse connections that don't support post-quantum key exchange.
This is appropriate for controlled environments where all connecting clients have been identified, tested, and upgraded. For example:
KexAlgorithms mlkem768x25519-sha256,sntrup761x25519-sha512,sntrup761x25519-sha512@openssh.com
Unlike the previous example, this explicitly replaces the default list with only post-quantum algorithms. X25519 and other conventional key-exchange methods would no longer be permitted.
This configuration requires OpenSSH 9.9 or later for the ML-KEM algorithm and unsuffixed SNTRUP algorithm. The suffixed SNTRUP variant provides compatibility with OpenSSH 9.0 to 9.8.
Clients that cannot negotiate one of the permitted algorithms will fail with an error similar to the following, where "Their offer" lists the server's algorithms:
Unable to negotiate with <ip-address> port 22: no matching key exchange method found. Their offer: mlkem768x25519-sha256,sntrup761x25519-sha512,sntrup761x25519-sha512@openssh.com
Network appliances, older SSH libraries, and third-party tools may also be refused.
Before enforcing this policy, review the server-side WarnWeakCrypto logs, identify classical-only clients, and establish a remediation plan. Test the configuration and verify access from representative clients before deploying it across the estate.
Where this fits in a wider plan
SSH is one part of a much larger cryptographic migration.
The UK's National Cyber Security Centre (NCSC) has established three milestones for organisations preparing for post-quantum cryptography:
| Deadline | Expected activity |
|---|---|
| 2028 | Complete cryptographic discovery, establish migration goals and produce an initial migration plan. |
| 2031 | Complete the highest-priority migration activities and establish a detailed roadmap for full migration. |
| 2035 | Complete migration to post-quantum cryptography across systems, services and products. |
Following its December 2026 announcement (opens in a new tab) urging organisations to take action, the NCSC reiterated the importance of completing high-priority migration activities by 1 January 2031.
SSH is a useful starting point because much of the initial work involves identifying outdated implementations, upgrading software and correcting configuration rather than replacing infrastructure.
However, the same discovery exercise should cover TLS, VPNs, certificates, code-signing systems and other cryptographic dependencies.
Useful references include the NCSC's PQC migration timelines (opens in a new tab), the OpenSSH release notes (opens in a new tab), the OpenSSH post-quantum guidance (opens in a new tab) and the ssh-keygen manual (opens in a new tab).
SSH key exchange and configuration are among the areas we examine during a network penetration test.

