SSH warning: "connection is not using a post-quantum key exchange algorithm"
Your SSH connection is still encrypted. The warning means the server, or something in between, agreed only a classical key exchange, so a recording of the session could be decrypted by a future quantum computer. The fix is almost always on the server side.
The warning
** 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
Your computer's SSH client prints it. It started appearing after clients updated to OpenSSH 10.1 or newer, which warn whenever a connection does not use a post-quantum key exchange. Nothing changed on the server; your client just started telling you.
Is it urgent?
No. Nobody can read the session today. The risk is "store now, decrypt later": someone records encrypted traffic now and decrypts it years from now, once quantum computers are big enough. Fix servers that carry sensitive data first, then the rest.
1. See which side is behind
Run this from your computer:
ssh -v you@your-server exit 2>&1 | grep "kex: algorithm"
| It shows | Meaning |
|---|---|
| mlkem768x25519-sha256 | Post-quantum, no warning |
| sntrup761x25519-sha512 | Post-quantum, no warning |
| curve25519-sha256 or similar | Classical: the cause |
Or run the free check: enter the domain, open "Also check an SSH server" and add the server's name. It shows exactly which key exchange methods the server offers.
2. If it is your own server
OpenSSH servers have offered a post-quantum hybrid by default since version 9.0, and made ML-KEM the default in 10.0. So the cause is one of two things:
- The server's OpenSSH is older than 9.0. Check with
ssh -Von the server. Upgrade the operating system or its OpenSSH package. Some current systems still ship older versions; Amazon Linux 2023, for example, ships OpenSSH 8.7. - A "hardening" line turned it off. A
KexAlgorithmsline in the server's config that lists only classical methods disables the post-quantum ones.
Our tested OpenSSH guide walks through both, including the safe list for each version. Read its warning first: on OpenSSH 9.6, adding the ML-KEM name to the config stops the SSH server from starting, which can lock you out.
3. If it is someone else's server
Git hosting, routers and appliances often run SSH software other than OpenSSH, and you cannot change their settings. Users have reported the warning with Bitbucket Cloud, Azure DevOps, self-hosted Gerrit and Dropbear on home routers. Check the provider's status page or support forum, or ask them to add a post-quantum key exchange. Some SSH libraries support it but need a newer version or a setting switched on: GitLab's SSH server, for example, needs Go 1.24 or newer and must be enabled by hand.
4. Hiding the warning for one server
If you cannot fix the server and accept the risk, you can silence the warning for that server only, in ~/.ssh/config on your computer:
Host git.example.com
WarnWeakCrypto no-pq-kex
no-pq-kex hides only this warning and keeps any other weak-cryptography warnings. This hides the message; it does not fix anything. Never put it under Host *, or you will stop seeing it for servers you could fix.
Check your server
The free Kexwatch check tests your website and, optionally, your SSH server, and explains what to change in plain English.