Post-Quantum SSH: What Changed on Ubuntu
OpenSSH already negotiates a post-quantum key exchange by default. Check what your Ubuntu box really uses, and learn why host keys are still classical.
What changed in post-quantum SSH
Post-quantum SSH is already switched on for most people, and nobody had to configure it. A current OpenSSH client talking to a current OpenSSH server picks a hybrid post-quantum key exchange by default, so the session key resists an attacker who records your traffic today and decrypts it years from now. The protection is real, and it is narrower than the phrase "quantum-safe SSH" suggests.
Two terms first. SSH (secure shell) is the protocol you log into a server with. The key exchange, usually written "kex", is the first step of every SSH connection: the two ends agree on a shared secret, and that secret encrypts everything that follows. The key exchange is the part that changed first, and on Ubuntu's LTS releases it is still the only part that has.
Do not trust this page, run the commands
Every algorithm name below comes out of a command you can run yourself. That is on purpose. The default has changed more than once across OpenSSH releases, so a guide written two years ago can name an algorithm your machine no longer prefers, and it has no way to tell you. Learn these commands and you stop needing articles about this, including this one.
Start with what your build knows how to do.
ssh -V
ssh -Q kexssh -V prints a version line beginning with OpenSSH_, followed by the Ubuntu package suffix and the OpenSSL version. ssh -Q kex prints one key exchange algorithm per line. On a build with post-quantum support you will find names such as mlkem768x25519-sha256 and sntrup761x25519-sha512@openssh.com in that list, sitting next to classical names like curve25519-sha256.
What your build supports is not what it offers
This is the distinction most posts skip. ssh -Q kex answers one question: what could this binary do. It does not answer the question you care about: what will this connection actually propose. The two lists are different, and the gap between them is where old advice does real damage.
ssh -G example.com | grep -i '^kexalgorithms'
sudo sshd -T | grep -i '^kexalgorithms'ssh -G <host> prints the client's effective configuration for that host, after ~/.ssh/config and /etc/ssh/ssh_config have been applied. sshd -T does the same for the server. Each prints a single kexalgorithms line in preference order, and the first name on it is that side's first choice. That line is what goes on the wire.
The gap is not theoretical. OpenSSH 8.5, released on 2021-03-03, added sntrup761x25519-sha512@openssh.com and deliberately left it out of the default list. On that release ssh -Q kex shows the algorithm and ssh -G does not, which means the binary can do a post-quantum key exchange and no connection asks for it unless somebody adds it with a KexAlgorithms line.
Read the algorithm your connection negotiated
ssh -v example.com 2>&1 | grep 'kex: algorithm'Between a current client and a current server, that prints:
debug1: kex: algorithm: mlkem768x25519-sha256mlkem768x25519-sha256 is a hybrid. It runs ML-KEM (module-lattice key encapsulation mechanism, standardised as FIPS 203) at parameter set 768, together with X25519 elliptic curve Diffie-Hellman, and mixes both outputs into the session key.
Against an older server you may see this instead:
debug1: kex: algorithm: curve25519-sha256That name has no post-quantum half. curve25519-sha256 is elliptic curve Diffie-Hellman on its own, and a large quantum computer breaks it. That is the whole reason the default moved.
One negotiation rule explains why a single old machine holds a session back. The client sends its list in preference order, the server sends its own, and the algorithm chosen is the first name on the client's list that also appears on the server's. The client's preference wins, so the older of the two ends decides how far up the list you get. Upgrading your laptop does not upgrade a session to a server that has never heard of ML-KEM.
ssh -v is worth knowing for more than this one line, because the same output is where you track down a Permission denied (publickey) failure when a login is refused outright.
Drop the grep and ssh -v shows the rest of the negotiation, including the line that the next section is about:
debug1: kex: host key algorithm: ssh-ed25519Which OpenSSH release made the hybrid exchange the default
The upstream release notes give a clear sequence. The dates matter more than the version numbers, because they show how long this has been running quietly.
- 8.5, released 2021-03-03, added
sntrup761x25519-sha512@openssh.comand left it disabled by default. - 8.9, released 2022-02-23, added it to the default list, but behind
curve25519-sha256and the ECDH methods. - 9.0, released 2022-04-08, turned it on. The notes say OpenSSH will "use the hybrid Streamlined NTRU Prime + x25519 key exchange method by default". This is the release where a post-quantum key exchange became the normal case.
- 9.9, released 2024-09-19, added
mlkem768x25519-sha256as a second option. The same release gave the older method its IANA registered name,sntrup761x25519-sha512, so newer builds list it under both spellings. - 10.0, released 2025-04-09, made
mlkem768x25519-sha256the default for key agreement. - 10.1, released 2025-10-06, added a client warning when a connection negotiates a key exchange with no post-quantum half. It is controlled by the
WarnWeakCryptooption inssh_configand is on by default. - 10.6, released 2026-10-06, added
WarnWeakCryptotosshd_configas well. It is on by default there too, and makes the server log clients that negotiate a key agreement that is not post-quantum.
April 2022 is the date worth remembering. Any pair of machines running OpenSSH 9.0 or newer on the default algorithm lists has been doing a post-quantum key exchange since then, with no configuration and no announcement to the person typing ssh. A pinned KexAlgorithms line on either end can still take that away, which is why the commands above beat any version table.
Which Ubuntu release ships it
Ubuntu freezes an OpenSSH version at release, then backports security fixes into it without moving the version number. So the Ubuntu release you run decides your default algorithm. Check the machine in front of you with ssh -V rather than trusting a list. As of October 2026 the archive holds these versions:
- 22.04 LTS ships
1:8.9p1, which predates the 9.0 default. Its default list includessntrup761x25519-sha512@openssh.com, but behindcurve25519-sha256and the ECDH names, so a 22.04 client negotiatescurve25519-sha256. A 22.04 server still accepts the post-quantum exchange from a 9.0 or newer client. - 24.04 LTS ships
1:9.6p1, which is after 9.0 and before 9.9, so its default issntrup761x25519-sha512@openssh.comand it has no ML-KEM. - 25.10 shipped
1:10.0p1(last checked in October 2026), whose default ismlkem768x25519-sha256. It reached end of life on 2026-07-09 and no longer gets security updates, so move any 25.10 box to 26.04 LTS. - 26.04 LTS ships
1:10.2p1, which defaults tomlkem768x25519-sha256and warns about connections that are not post-quantum. It predates 10.4, so it has no post-quantum signature type. - 26.10, released on 2026-10-15 and supported until July 2027, ships
1:10.5p1. It defaults tomlkem768x25519-sha256, warns about connections that are not post-quantum, and is the first Ubuntu release to carry the experimental post-quantum signature type from OpenSSH 10.4, covered below.
Work through a real pair of machines. A 26.04 laptop connects to a 24.04 server. The client's first choice, mlkem768x25519-sha256, is not in the 9.6 server's list. The client's next post-quantum choice that the server does have is sntrup761x25519-sha512@openssh.com, and that is the name ssh -v reports. The session is post-quantum on the key exchange, against a server built in 2024, with nothing configured by anybody.
The 22.04 case shows why the order of the list matters as much as what is on it. OpenSSH 8.9 knows the sntrup761x25519-sha512@openssh.com name, so ssh -Q kex on that box lists it, and ssh -G lists it too, but after curve25519-sha256 and the three ECDH names. Because the client's preference wins, a 22.04 client settles on curve25519-sha256 with any server, while the same 26.04 laptop connecting to a 22.04 server still gets sntrup761x25519-sha512@openssh.com. The connections that end up classical are the ones where the server offers no post-quantum name at all, such as an OpenSSH older than 8.9 left on its defaults, or a server with a pinned KexAlgorithms line. From an OpenSSH 10.1 or newer client, such a connection says so:
** WARNING: connection is not using a post-quantum key exchange algorithm.
** This session may be vulnerable to "store now, decrypt later" attacks.The warning describes the negotiated connection, which depends on both ends. With your client on its default settings, it points at the server you are reaching, because your client offered post-quantum names and the server accepted none of them. If ssh -G <host> | grep -i '^kexalgorithms' shows no mlkem or sntrup name, the pin is on your own side instead. Otherwise the answer is to upgrade the server. Setting WarnWeakCrypto no removes the message and changes nothing about the connection. If that warning has just appeared on one of your own connections, the step-by-step fix for the post-quantum warning shows how to confirm the negotiated algorithm and make the change on the right machine.
Why hybrid, and what harvest now decrypt later means
The threat has a plain shape. An attacker who can see your traffic records the encrypted bytes today and stores them. They cannot read them today. They keep them until a quantum computer large enough to break X25519 exists, and then they read them. This is called harvest now, decrypt later, or store now, decrypt later. It asks nothing clever of the attacker in the present. It asks for disk space and patience.
Encryption has this problem and signatures do not, and that asymmetry drives everything else. A recorded ciphertext keeps its value for as long as the data inside it stays sensitive. A signature only has to be unforgeable at the moment it is checked. Breaking a signature algorithm in 2035 lets somebody impersonate a server in 2035. It does not let them go back and forge a login from 2026. So the key exchange had to be fixed first, and the signature side could follow later, which is the order upstream took.
Hybrid means both algorithms run and both results feed the session key. To recover the secret behind mlkem768x25519-sha256 an attacker must break ML-KEM 768 and X25519. The pairing is deliberate: ML-KEM is much newer than X25519 and has had far less time under attack from cryptanalysts, so a flaw found in the new algorithm does not cost you the protection you already had.
What is protected and what is not
The key exchange is protected. The shared secret encrypting your session came out of a hybrid exchange, so a recording of that session made today does not become readable when quantum computers arrive.
On 26.04 LTS and older the host key is not protected. The debug1: kex: host key algorithm: ssh-ed25519 line names a classical signature, and so do rsa-sha2-512 and the ECDSA (elliptic curve digital signature algorithm) types. An attacker holding a working quantum computer could forge that signature and impersonate your server, but only during a live connection at that future time, and never against traffic recorded now.
Your login key is not protected either. The key in ~/.ssh/id_ed25519 is the same kind of classical signature, and the same reasoning covers it. What protects that key this year is where it lives and who can read it, so sensible SSH key management moves your real risk much further than any algorithm name on this page.
Upstream has now started on the signature side. OpenSSH 10.4, released 2026-07-06, added experimental support for a composite signature that combines ML-DSA 44 with Ed25519, generated with ssh-keygen -t mldsa44-ed25519 and left off by default. OpenSSH 10.6, released 2026-10-06, enabled it as ssh-mldsa44-ed25519. The new name drops the @openssh.com suffix the experimental version used, so keys made with 10.4 or 10.5 have to be regenerated. Like the key exchange it is a hybrid, so a forger has to break both halves. The current ssh_config manual puts the plain ssh-mldsa44-ed25519 after ssh-ed25519 in the default host key and public key lists, and ssh-keygen with no -t still makes an Ed25519 key.
On Ubuntu, only the newest interim release has any of it. 26.04 LTS ships 1:10.2p1, which predates 10.4, so the LTS builds have no post-quantum host key type and no post-quantum user key type, and ssh-keygen has none to offer you. 26.10, released on 2026-10-15, ships 1:10.5p1, and its ssh-keygen manual lists mldsa44-ed25519 among the key types, with ed25519 still the default. That is the experimental version under the ssh-mldsa44-ed25519@openssh.com name, so keys of that type made on 26.10 will need regenerating once you move to a release with OpenSSH 10.6 or newer. The 26.10 manuals put that name at the end of the default host key and public key lists, after ssh-ed25519, so on default settings a 26.10 connection still prefers ssh-ed25519. Run ssh -Q key on your machine: if no name containing mldsa appears, a guide telling you to generate one is describing software your machine does not have. Because a signature only has to hold at the moment it is checked, waiting for an LTS release to ship the final version costs you nothing today.
TLS on the same server is a separate question with a separate answer. TLS (transport layer security) is what your web server speaks on port 443, and it is a different codebase on a different schedule. Upgrading OpenSSH changes nothing there. If you are running a self-signed certificate for a private service on the same VPS, its signature and its key exchange are decided by OpenSSL and your web server, so ask about that stack on its own terms.
What a sensible operator does now
Keep OpenSSH current, and stop there. That really is the whole strategy for this problem. sudo apt update && sudo apt upgrade keeps you on the version your Ubuntu release ships, and moving to a newer Ubuntu release is what moves you to a newer OpenSSH. Turning on unattended security upgrades gets those patches applied without you remembering to. Building OpenSSH from source to chase an algorithm name is a poor trade, because you give up the distribution's security updates for the most exposed service on the box. If you fetch source anyway, check the download against its published checksum before you build it.
Do not hand-write a KexAlgorithms line. This is the one action that reliably makes things worse. A hardening guide from 2018 hands you a list that was correct in 2018, and pasting it into sshd_config replaces the default list rather than adding to it. Every algorithm invented since then is now excluded, so a server that would have negotiated mlkem768x25519-sha256 on its own quietly drops to whatever survives in the pinned list. Run sudo sshd -T | grep -i '^kexalgorithms' on any server you inherited. If that line is shorter than the one on a fresh install of the same release, somebody pinned it.
If you have a real reason to change the list, add to it instead of replacing it. OpenSSH reads a leading + as append, a leading - as remove, and a leading ^ as move to the front.
KexAlgorithms ^mlkem768x25519-sha256Test the file before you rely on it. sudo sshd -t parses the configuration and prints nothing when it is valid. A KexAlgorithms line naming an algorithm the build does not have stops sshd from starting, and on a remote box that means you cannot get back in, so keep a second session open while you work. When the two sides' lists stop overlapping, the client says so plainly:
Unable to negotiate with 203.0.113.10 port 22: no matching key exchange method found. Their offer: curve25519-sha256,ecdh-sha2-nistp256Read "quantum-safe" marketing as a claim about one layer. A vendor calling a product quantum-safe is describing whichever layer they named, and that layer is usually a key exchange somewhere. Ask for the algorithm name and the protocol it applies to. For Ubuntu's LTS releases in October 2026 the honest version of the claim is that the key exchange is hybrid post-quantum while the signatures are classical. Ubuntu 26.10 carries the experimental hybrid post-quantum signature from OpenSSH 10.4, upstream OpenSSH 10.6 enables it under its final name, and either one only counts where both ends run the same version of it. Anything wider than that should arrive with a name you can find in ssh -Q kex or ssh -Q key output.
Keep doing the boring parts. A post-quantum key exchange does nothing about a guessable password, or a private key copied onto a laptop that later gets stolen. Those are what actually take servers, and standard SSH hardening on a VPS still carries almost all of the weight. If the negotiation steps here were unfamiliar, what SSH does when you connect covers the stages this page assumes you know.
FAQ
Is my SSH connection already post-quantum?
Run ssh -v yourserver 2>&1 | grep 'kex: algorithm' and read the name it prints. mlkem768x25519-sha256 and sntrup761x25519-sha512@openssh.com are hybrid post-quantum exchanges. curve25519-sha256, ecdh-sha2-nistp256 and any diffie-hellman-group name are classical. Both ends need a version that offers a post-quantum name, because the negotiation picks the client's first choice that the server also supports, so the older machine sets the ceiling.
Which OpenSSH release made post-quantum key exchange the default?
OpenSSH 9.0, released on 2022-04-08, made sntrup761x25519-sha512@openssh.com the default key exchange. OpenSSH 9.9, released on 2024-09-19, added mlkem768x25519-sha256, and OpenSSH 10.0, released on 2025-04-09, made that one the default instead. OpenSSH 10.1, released on 2025-10-06, began warning when a connection negotiates neither. Check what your own build does with ssh -Q kex and ssh -G <host>, because your Ubuntu release decides which of those you have.
Should I generate a post-quantum SSH key?
Not on an Ubuntu LTS release, because its OpenSSH has no such key type. 26.04 LTS ships 10.2, and the post-quantum work there covers only the key exchange, which needs no key files from you and no configuration at all. Upstream, OpenSSH 10.4 added an experimental key that combines ML-DSA 44 with Ed25519, and Ubuntu 26.10 ships that experimental version in its 10.5 package. OpenSSH 10.6, released on 2026-10-06, enabled it as ssh-mldsa44-ed25519. If both ends run 10.6 or newer, ssh-keygen -t mldsa44-ed25519 makes one, and keys from the experimental 10.4 and 10.5 support, including any made on 26.10, must be regenerated. Everywhere else, keep using an Ed25519 key and protect where it is stored.
Why does ssh warn that my connection is not post-quantum?
OpenSSH 10.1 and newer print ** WARNING: connection is not using a post-quantum key exchange algorithm. when the negotiated exchange has no post-quantum half. With a client on its default settings the cause is the server, because your client offered post-quantum names and the server accepted none of them. Run ssh -G yourserver | grep -i '^kexalgorithms' first to rule out a pinned list on your own side. Then upgrade the server's OpenSSH, or check that nobody pinned a KexAlgorithms line in its sshd_config that excludes the modern names. Setting WarnWeakCrypto no hides the message and leaves the connection exactly as weak as it was.