How to enable post-quantum key exchange in OpenSSH

OpenSSH has offered post-quantum hybrid key exchange by default since 9.0 and made mlkem768x25519-sha256 the default in 10.0, so most current builds need no change. Check your version and KexAlgorithms before rolling anything out.

On this page

Does OpenSSH already use post-quantum key exchange, and what do I need to change?

If you run OpenSSH, the short answer is that post-quantum key exchange is already on by default, and on a default configuration you need to take no action to enable it. According to the OpenSSH post-quantum page, OpenSSH has offered post-quantum hybrid key agreement by default since release 9.0 (April 2022), using sntrup761x25519-sha512. OpenSSH 10.0 (April 2025) made mlkem768x25519-sha256, a hybrid of ML-KEM and x25519, the default key agreement scheme. The work for a sysadmin is therefore confirmation rather than enabling: check which OpenSSH version each server and client runs, and check whether any KexAlgorithms line in sshd_config or ssh_config overrides the defaults. These facts were read on 2026-12-03. The latest OpenSSH release listed there is 10.6 (October 6, 2026), and the latest portable release is 10.6p2 (November 5, 2026). Confirm these against the OpenSSH home page before you record an answer, because they can change.

Begin with ssh -V on every host, then ssh -Q kex on the client and sshd -T on the server to see what the build actually offers. The sshd -T output shows the effective configuration after includes are merged, which matters because a drop-in file in /etc/ssh/sshd_config.d/ can override a line you wrote in the main file. Look for KexAlgorithms entries that start with a plus, minus or caret, since those modify the default list instead of replacing it. A plus adds algorithms, a minus removes them, and a caret moves them to the front. A line that lists only classical algorithms, such as an older hardening template, will remove the post-quantum option even though the release supports it. Remove or correct such lines only after you have confirmed that every client that connects to the host can still negotiate a suitable algorithm. The WarnWeakCrypto option, which OpenSSH 10.1 added for clients and 10.6 added for the server, logs connections that negotiate a key agreement scheme without post-quantum protection, so enabling it gives you a record of which peers still need attention.

Keep in mind that key exchange is only one part of the SSH trust model. Host keys, user keys and certificate authorities use public-key signatures, and the OpenSSH post-quantum page covers key exchange only. The 10.5 and 10.6p2 releases added the hybrid ML-DSA 44 plus Ed25519 signature scheme, ssh-mldsa44-ed25519, which is a separate decision from the key exchange change and is not on by default for host or user keys. Record the signature types your hosts and users actually use, because those belong to a different line in your inventory. The release notes do not describe a timetable for these signature changes, so treat them as open items to confirm with the vendor. Do not roll out any change across a fleet until you have checked each host's version and configuration, and keep a rollback path for clients or appliances that cannot negotiate the new defaults. Fleet rollout planning belongs in the sibling topic on compatibility with older clients and appliances.

Which OpenSSH release and default key exchange applies to each version line

This table lists each OpenSSH version line that changed the post-quantum key exchange defaults, along with the algorithm that applies by default and any warning or flag that version added. Read it to confirm which release on a given server or client sets the default you are working with. Each row cites the source it was checked against and the date it was read.

Version lineDefault or changeNotes for administratorsSource and read date
OpenSSH 9.0 (April 2022)sntrup761x25519-sha512 is the default post-quantum key agreementPost-quantum key agreement is on by default from this release and needs no customer action to enable.OpenSSH post-quantum page, read 2026-12-03
OpenSSH 9.9Adds mlkem768x25519-sha256 as a supported key agreementAdds the ML-KEM hybrid name. The default at this version line is still sntrup761x25519-sha512.OpenSSH post-quantum page, read 2026-12-03
OpenSSH 10.0 (April 2025)mlkem768x25519-sha256 becomes the default key agreementFinite field Diffie-Hellman key exchange is disabled in sshd by default from this release. Check the KexAlgorithms list if you pin older names.OpenSSH release notes, read 2026-12-03
OpenSSH 10.1Client warning when a connection negotiates a non-post-quantum key agreementWarnWeakCrypto is enabled by default on the client. The no-pq-kex flag turns off only this warning, not the key exchange itself.OpenSSH post-quantum page, read 2026-12-03
OpenSSH 10.6WarnWeakCrypto added to sshd_config, enabled by defaultThe server logs when a client negotiates a key agreement scheme that is not post-quantum. Review server logs after upgrade.OpenSSH release notes, read 2026-12-03
Documented sshd_config KexAlgorithms defaultmlkem768x25519-sha256, sntrup761x25519-sha512, curve25519-sha256, ecdh-sha2-nistp256, nistp384 and nistp521This is the list the manual page documents as the default. Confirm your build reports the same list with the sshd -T command.sshd_config man page, read 2026-12-03
mlkem768nistp256-sha256Supported but not in the default listAdministrators who need this name must add it to KexAlgorithms explicitly. No ML-KEM-1024 key exchange name appears in the manual pages.sshd_config man page, read 2026-12-03

How do I check my OpenSSH version and current KexAlgorithms?

Before you change anything, confirm which OpenSSH release each host runs and what its key exchange settings are doing today. Run ssh -V on a client and sshd -V on a server to read the installed version. The latest release listed on the OpenSSH home page is 10.6, dated October 6, 2026, and the latest portable release is 10.6p2, dated November 5, 2026, as read on 2026-12-03. Note whether the build is a portable release from the OpenSSH project or a distribution package, because distributions often backport changes and the version string alone may not show what was added. Record the version for every host in your inventory, and check the library build too, since the OpenSSH portable INSTALL file says a --without-openssl build carries only a subset of ciphers and algorithms. Confirm that library and its configure options on each host, either from the package metadata or your build records.

Next, list what the build supports and what the server actually uses. Run ssh -Q kex to list the key exchange algorithms the client binary supports, and ssh -Q HostKeyAlgorithms for host key signature types. On the server, sshd -T prints the effective configuration, including the KexAlgorithms value after defaults and any drop-in files are applied. Do not rely on reading sshd_config alone: if the file does not set KexAlgorithms, the server uses the default documented in the sshd_config man page, which includes mlkem768x25519-sha256 and sntrup761x25519-sha512. The client defaults in the ssh_config man page differ slightly, so check ssh -G for the effective client settings on each workstation or automation host. Compare the output against the version you recorded. If a host lacks a name you expect, the build or library is the likely cause, and you should confirm it before planning any configuration change.

How the change differs by starting point

Servers and clients on the 10.x release line already offer hybrid post-quantum key exchange in their default configuration. OpenSSH 10.0 (April 2025) made mlkem768x25519-sha256 the default key agreement scheme, so a system on 10.x needs no change to the KexAlgorithms setting to negotiate post-quantum key exchange with peers that support it.

  • Default key exchange: mlkem768x25519-sha256 is the first entry in the documented sshd default list, followed by sntrup761x25519-sha512 and classical curve25519-sha256.
  • Client warning: OpenSSH 10.1 added a client warning when a connection negotiates a non-post-quantum key agreement, controlled by WarnWeakCrypto.
  • Server logging: OpenSSH 10.6 added WarnWeakCrypto to sshd_config, enabled by default, so the server logs clients that use a key agreement scheme that is not post-quantum.
  • Signatures are separate: Key exchange is the only part covered here. Host keys, user keys and certificates still use their own algorithms, so check those on their own pages.
  • Portable builds: Confirm the build you run is 10.x and not an older release with a 10.x version number from a distribution package.

Check the effective setting with sshd -T | grep kexalgorithms on the server and ssh -Q kex on the client, and confirm the output lists mlkem768x25519-sha256.

What steps enable or confirm post-quantum key exchange across a fleet

This sequence confirms which OpenSSH builds and key exchange settings each host actually negotiates, changes only what is needed, and checks the result on test hosts before rollout. It ends with server logs that show which clients still negotiate key agreement without post-quantum protection.

  1. Inventory OpenSSH versions and library builds

    Record the OpenSSH version on every server and client, and the crypto library each portable build links against. Run ssh -V on each host and group the results by version. For portable builds, note whether the library is LibreSSL 3.1.0 or later, OpenSSL 1.1.1 or later, AWS-LC or BoringSSL, because a build made with --without-openssl supports only a subset of ciphers and algorithms. The step is done when every host has a version and library entry in the inventory, and any host that predates 9.0 is flagged, since the vendor page says post-quantum key agreement has been on by default since that release.

  2. Confirm effective KexAlgorithms on servers and clients

    On each server, run sshd -T and read the kexalgorithms line to see the key exchange list the daemon actually offers, including any overrides in included files. On each client, run ssh -G with the target host name and read the kexalgorithms line for the client's effective list. Compare these with the documented defaults, which start with mlkem768x25519-sha256 on current releases. The step is closed when each host's effective list is written down and any host whose list omits the post-quantum hybrid entries is marked for review.

  3. Edit KexAlgorithms only where a change is needed

    Where a host's effective list lacks a post-quantum hybrid, change it in sshd_config or ssh_config by prefixing the KexAlgorithms line with a plus sign, which adds the named algorithms to the default list. A minus sign removes entries and a caret moves entries to the end of the list, so check which one you intend before editing. Do not replace the whole list unless you need to. Reload sshd after a server change. The step is closed when the configuration file is saved, the daemon reloads without error, and sshd -T shows the expected list.

  4. Validate the negotiated key exchange on a test host

    On a test host that matches a production group, connect with a client and run ssh -vv against the target. The verbose output names the key exchange method agreed for the session, so look for the line that shows the negotiated kex. Run the same test from each client type in the group, including older clients, to see which settings they agree on. The step is closed when the test output shows a post-quantum hybrid method for each client type, or documents the clients that fall back to a non-post-quantum method.

  5. Roll out the change by host group

    Apply the validated configuration to one host group at a time, starting with the group that has the fewest dependent clients. For each group, confirm the change with sshd -T and ssh -G as in the earlier steps, and keep a record of the configuration each host received. Pause between groups to check for failed logins or connection errors reported by users or monitoring. The step is closed when every group reports the expected effective list and no new connection failures remain open.

  6. Enable WarnWeakCrypto and review server logs

    Set WarnWeakCrypto in sshd_config and reload the daemon. The vendor documentation says this option is enabled by default in OpenSSH 10.6 and later, so confirm the effective value with sshd -T. Then review the server logs for entries that show clients negotiating a key agreement scheme that is not post-quantum safe. Each such client is a candidate for a client upgrade or a documented exception. The step is closed when the logs have been reviewed over a period you define and every flagged client has an owner and a next action.

How client and server pick a key exchange algorithm

The client sends its KexAlgorithms list and the server sends its own, and the first algorithm both support is chosen, taken in the client's preference order. Because the post-quantum hybrids mlkem768x25519-sha256 and sntrup761x25519-sha512 are on by default in current releases, a connection usually negotiates one of them without any change. The check to make is the result itself: if the negotiated algorithm is not post-quantum, WarnWeakCrypto flags it on the client (OpenSSH 10.1 and later) and on the server (OpenSSH 10.6 and later), so confirm the negotiated algorithm in your own logs.

The client's preference order decides which mutually supported key exchange algorithm is negotiated.

Which clients and settings can block or downgrade post-quantum key exchange

Post-quantum key exchange in OpenSSH is on by default, but a client can still end up on a classical algorithm. The causes fall into a few groups: older clients, overrides that remove the post-quantum names, edited server lists, library builds that lack the algorithms, and logging controls that show when a downgrade happens.

Older clients without hybrid names

Clients built before the hybrid key exchange names were added cannot offer mlkem768x25519-sha256 or sntrup761x25519-sha512, so the connection falls back to a classical exchange such as curve25519-sha256. This is a client-side limit, and the server cannot force a post-quantum exchange on a client that does not offer one. Check each client's version with ssh -Q kex to see which key exchange names it supports, and list the clients that do not offer a hybrid name before you rely on the default.

ssh_config man page

KexAlgorithms overrides that drop post-quantum names

A KexAlgorithms line that replaces the default list, instead of adding to it with +, removes the post-quantum names entirely. Any client or server config that lists only classical algorithms will negotiate a classical exchange, even on a current release. Search ssh_config and sshd_config files, including files under /etc/ssh/ssh_config.d/ and /etc/ssh/sshd_config.d/, for any KexAlgorithms line that does not begin with +, - or ^, and confirm each one still includes a post-quantum name.

sshd_config man page

Curve25519 negotiated after server list edits

When the server's KexAlgorithms list is edited to remove the hybrid names, curve25519-sha256 becomes the preferred exchange for clients that also offer it. The connection still uses elliptic-curve key agreement, but it is not post-quantum. This happens without any error, so the change is easy to miss. After any edit to the server list, connect with a client that offers a hybrid name and confirm the negotiated exchange is mlkem768x25519-sha256 or sntrup761x25519-sha512, for example by running ssh -v and reading the kex line.

sshd_config man page

Library builds without the needed algorithms

The OpenSSH portable INSTALL notes that a build using --without-openssl includes only a subset of ciphers and algorithms. A build linked against a cryptographic library that lacks the needed key exchange methods will not offer the hybrid names, even when the default configuration lists them. Check the build with ssh -Q kex on each client and server, and compare the output with the names in the default list before deploying a custom build across a fleet.

OpenSSH INSTALL

WarnWeakCrypto and no-pq-kex logging controls

OpenSSH 10.1 added a client warning when a connection negotiates a key agreement that is not post-quantum, and the WarnWeakCrypto option controls it. It is enabled by default. The no-pq-kex flag turns off only that warning, and it does not change which algorithms are negotiated. OpenSSH 10.6 added WarnWeakCrypto to sshd_config, enabled by default, so the server logs when a client uses a non-post-quantum key agreement. Confirm the setting on each host, because a no-pq-kex flag can hide a downgrade from logs without stopping it.

sshd_config man page

What can go wrong when enabling or editing post-quantum key exchange

The most common mistake when changing OpenSSH key exchange is treating KexAlgorithms as an add-on list. In sshd_config and ssh_config, a plain KexAlgorithms line replaces the whole default list. If you write KexAlgorithms curve25519-sha256 to tighten the setting, the hybrid mlkem768x25519-sha256 and sntrup761x25519-sha512 entries disappear, and the connection quietly falls back to a classical exchange. To extend the default instead, prefix the list with +, for example KexAlgorithms +mlkem768x25519-sha256. Use - to remove an algorithm and ^ to move one to the front. Before any rollout, run ssh -Q kex on the build in use and confirm the post-quantum names appear in the effective configuration.

Dropping post-quantum names does not produce an error on the server or the client, so nothing fails visibly. OpenSSH 10.1 added a client warning when a connection negotiates a key agreement that is not post-quantum, and the WarnWeakCrypto option controls it, enabled by default. OpenSSH 10.6 added the same option to sshd_config, so the server can log clients that negotiate a classical exchange. Check that these warnings reach your logs, and that the no-pq-kex flag is not set in a way that hides the warning you rely on. Older clients present another risk: a host restricted to a narrow list may refuse a client that offers none of the names on it, and the failure looks like a generic handshake error. Test with the oldest client versions and appliances you still have in use.

Library builds can also remove the algorithm entirely. OpenSSH's INSTALL file says the portable build uses libcrypto from LibreSSL 3.1.0 or later, OpenSSL 1.1.1 or later, AWS-LC or BoringSSL, and that a --without-openssl build supports only a subset of ciphers and algorithms. Confirm with ssh -Q kex on each build that ships to production. Keys are a separate hazard: the experimental mldsa44-ed25519 keys generated with OpenSSH 10.4 use the @openssh.com form, and OpenSSH 10.5 dropped that suffix and states that keys made by the experimental version must be regenerated or removed. Inventory any such keys before upgrading past 10.4, and plan regeneration rather than assuming they will still work. Run the full change in a staging environment that matches production clients before any fleet-wide rollout.

Common questions about enabling post-quantum key exchange in OpenSSH

Is OpenSSH quantum safe as a product?

OpenSSH is not described as quantum safe as a product, and no official OpenSSH claim, certification or validation of that kind appears in the sources checked. What the project's post-quantum page supports is narrower: key agreement can use post-quantum algorithms. Since OpenSSH 10.0, the default key exchange is mlkem768x25519-sha256, a hybrid of ML-KEM and x25519. Earlier releases from 9.0 offered sntrup761x25519-sha512 by default. Host key and user key signatures, and certificate signatures, still rely on classical algorithms such as Ed25519, ECDSA and RSA, except for the experimental and newer hybrid ssh-mldsa44-ed25519 option. Confirm the exact algorithms your servers and clients negotiate in your own environment before you record an answer.

Which OpenSSH version do I need for post-quantum key exchange?

Post-quantum key exchange has been available by default since OpenSSH 9.0, released in April 2022, through sntrup761x25519-sha512. OpenSSH 9.9 added mlkem768x25519-sha256, and OpenSSH 10.0, released in April 2025, made mlkem768x25519-sha256 the default. Check your installed version with ssh -V on each client and sshd -V or the package manager on each server. The current stable release listed on the project's home page is 10.6, and the latest portable release is 10.6p2. Distribution packages may lag behind upstream, so verify the version your vendor actually ships, and confirm that the build uses a crypto library that supports the algorithms you need.

Does enabling post-quantum key exchange in OpenSSH cost extra?

The project publishes no price, and the enablement described here is a configuration and version question rather than a licensed feature. OpenSSH is released under a BSD-style license, and the post-quantum key exchange is on by default in current releases, so no customer action is needed for it to be active. The cost you actually incur comes from labor and change management: inventorying each server and client, upgrading older builds where needed, testing logins against any older clients, and rolling changes across a fleet. Those costs are one-time for the rollout and recur only for ongoing patching. Ask your internal team or any outside provider for a written scope so the effort can be estimated against the number of hosts and their age.

What breaks when I enable post-quantum key exchange in OpenSSH?

The post-quantum key exchange does not change how users log in, but it can fail for clients that do not offer a compatible algorithm. The main risks are older SSH clients, network appliances and embedded devices whose SSH implementations predate the post-quantum key exchange names, and any scripts or tools that pin a KexAlgorithms list. Restricting KexAlgorithms on the server or client removes algorithms, and a mismatch then causes the connection to fail with a negotiation error. Before you change the list, run ssh -Q kex on the client to see what it supports, and check the server's sshd -T output. Test against each client type in a staging environment first. OpenSSH 10.1 added a client warning when a connection uses a key exchange that is not post-quantum, and OpenSSH 10.6 added the WarnWeakCrypto option to sshd_config, which is enabled by default, so the server logs such connections.

Can my team enable post-quantum key exchange in OpenSSH without outside help?

Yes, for most environments, because the change is a version check and a configuration review rather than a rebuild. The defaults are already post-quantum on current releases, so the work usually comes down to confirming versions, reviewing any KexAlgorithms overrides in sshd_config and ssh_config, and testing connections. Teams with many hosts, appliances, older distributions or custom builds built without a full crypto library may need more planning, and the portable INSTALL file notes that a build without OpenSSL-compatible libcrypto supports only a subset of algorithms. Outside help is a choice based on scope, not a requirement. If you engage a provider, ask for the written scope, the list of hosts covered and the test plan before work starts.

Does enabling post-quantum key exchange also cover host keys and certificates?

No. Enabling post-quantum key exchange changes only the algorithm that agrees on session keys. Host keys, user keys and certificate authorities are separate, and their signature algorithms are governed by HostKeyAlgorithms, PubkeyAcceptedAlgorithms and CASignatureAlgorithms. Those signatures still default to classical types such as Ed25519, ECDSA and RSA with SHA-2, and the hybrid ssh-mldsa44-ed25519 type is available from OpenSSH 10.5 but is not the default for host or user keys. Treat them as a separate work item. For the host key and certificate details, see the sibling pages on OpenSSH host keys, user keys and certificates in a post-quantum plan, and on where OpenSSH uses cryptography.

How DeployOpen works on this

DeployOpen approaches enabling post-quantum key exchange in OpenSSH as a fixed-scope engagement: we first confirm which OpenSSH versions and builds are in use, then check the KexAlgorithms settings on each server and client before any change. We then roll out and document the configuration in your environment, so your team can review and repeat it.

How we scope

  • Inventory OpenSSH versions, portable builds and SSL library backends across servers and clients in scope.
  • Record current KexAlgorithms, Ciphers and MACs settings from sshd_config and ssh_config for each host group.
  • Agree the written scope, including which systems, which host groups and how many hosts are covered.

How we build

  • Test the mlkem768x25519-sha256 default and any + or ^ prefix changes on a staging host before production.
  • Check that clients connecting to each server negotiate a post-quantum key agreement, and note any that do not.
  • Configure WarnWeakCrypto on OpenSSH 10.6 servers and 10.1 or later clients, and confirm the logging behaves as expected.

How we hand over

  • Deliver the tested configuration files, rollout order and a record of each host's before and after key exchange settings.
  • Document how to verify a connection with ssh -Q kex and how to roll back a host if a legacy client fails.
  • Give the security lead a written list of hosts or clients that still negotiate non-post-quantum key agreement.

How we support

  • Ongoing support and upgrades can be covered by a retainer, agreed in writing alongside the fixed scope.
  • Re-check KexAlgorithms and WarnWeakCrypto behavior after each OpenSSH release upgrade on your fleet.
  • Confirm with your team which OpenSSH release or distribution package each host runs before planning further changes.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.