
Your Mac Is Quietly Turning Off Post-Quantum SSH. Here's the One-Line Fix.

A week ago I thought the "AI is breaking encryption" posts were hype. Then it got serious fast.
On 2 December the NSA, CISA and the White House's Office of the National Cyber Director put out a joint statement urging everyone to speed up the move to post-quantum cryptography. The reason wasn't quantum computers. It was frontier AI models that can now solve some long-unsolved problems in mathematics, and findings from US AI companies that affect some of the cryptography in use today. The agencies were careful to say this isn't an immediate, widespread threat.
The same day, Amazon, Anthropic, Apple, Cloudflare, Google, Microsoft, OpenAI and Oracle published a joint statement backing that guidance. Cloudflare's CEO Matthew Prince went further: they'd been briefed on something, it's a big deal, they can't share all the details yet, and it's urgent to move to post-quantum (or, as he put it, "maybe more appropriately called post-AI") standards.
The details behind it haven't been made public. But the part that worries me is "harvest now, decrypt later": anything recorded today with classical key exchange could be read later if that key exchange falls. So I audited my own setup. The servers were fine. My Mac was the weak link.
The problem: macOS puts classical key exchange first
Modern OpenSSH supports hybrid post-quantum key exchange. sntrup761x25519 has been the default since OpenSSH 9.0, and mlkem768x25519 (built on NIST's ML-KEM standard) became the default in OpenSSH 10. Both sides just need to prefer it.
My Mac's OpenSSH 10.3 should have been doing exactly that. Instead, connecting to one of my servers showed this:
debug1: kex: algorithm: ecdh-sha2-nistp256
Plain elliptic-curve Diffie–Hellman. Not post-quantum, even though the server offered sntrup761x25519 first.
The cause is a file Apple ships. /etc/ssh/ssh_config includes /etc/ssh/ssh_config.d/100-macos.conf, which includes /etc/ssh/crypto.conf:
# Default algorithms favoring higher-performance FIPS algorithms
# in most cases.
Ciphers ^[email protected],[email protected]
KexAlgorithms ^ecdh-sha2-nistp256
MACs ^[email protected],hmac-sha2-256
That ^ moves ecdh-sha2-nistp256 to the front of the list. SSH uses the first algorithm in the client's list that the server also supports, and almost every SSH server supports that one. So on my Mac, nearly every SSH connection (servers, git push over SSH, everything) was using classical key exchange.
I've seen this on macOS 26. Older versions may differ, so check yours.
Check your Mac
Run this against any server you SSH into:
ssh -v yourserver true 2>&1 | grep "kex: algorithm"
If it says mlkem768x25519-sha256 or sntrup761x25519-sha512, you're fine. If it says ecdh-sha2-nistp256 or curve25519-sha256, you're not.
You can also see what your client will offer without connecting:
ssh -G yourserver | grep ^kexalgorithms
The fix
Add one line to the very top of ~/.ssh/config:
KexAlgorithms ^mlkem768x25519-sha256,[email protected]
The ^ does the same trick Apple's file does, in your favour: it moves the two post-quantum options to the front and keeps every other algorithm behind them as a fallback. Old servers and network gear that only speak classical key exchange still connect.
This works because, for each setting, SSH uses the first value it finds, and your own ~/.ssh/config is read before the system files. So your line wins over Apple's without touching anything under /etc, and it survives macOS updates.
It has to go above any Host blocks. A line placed after a Host block only applies to that host. If you use OrbStack, put it above OrbStack's Include line too.
Run the check again and you should see:
debug1: kex: algorithm: [email protected]
(or mlkem768x25519-sha256 if the server runs OpenSSH 10 or later).
Check your servers too
While you're there, it's worth checking both ends.
SSH. On the server:
ssh -V
sudo sshd -T | grep ^kexalgorithms
You want OpenSSH 9.0 or later, with sntrup761x25519 or mlkem768x25519 at the front. Ubuntu 24.04's OpenSSH 9.6 does this out of the box. If a hardening guide gave you a custom KexAlgorithms line, make sure it didn't drop them.
TLS. From your Mac, using Homebrew's OpenSSL 3.5 or later (the system LibreSSL can't do this test):
echo | $(brew --prefix openssl)/bin/openssl s_client \
-connect your.server:443 -servername your.domain \
-groups X25519MLKEM768 2>&1 | grep "Negotiated TLS1.3 group"
Negotiated TLS1.3 group: X25519MLKEM768 means the server does post-quantum TLS. Anything built on Go 1.24 or later supports it by default, which covers recent Traefik and Caddy releases, and so does anything linked against OpenSSL 3.5 or later.
If your site sits behind Cloudflare, the leg from modern browsers to Cloudflare is already post-quantum. Test your origin directly as well: that's the leg you control. And while you're there, make sure Cloudflare's SSL mode is Full (strict), not Flexible. Flexible means the leg to your server is plain HTTP, which is a much bigger problem today than anything quantum.
Why hybrid matters
mlkem768x25519 and sntrup761x25519 are hybrids: each combines a post-quantum algorithm with the classical X25519, and an attacker has to break both. So even if the newer half turns out to have a weakness, you're no worse off than with classical key exchange alone. That's why switching costs you nothing.
What this doesn't fix
This protects the key exchange, the part that matters for "harvest now, decrypt later". It doesn't change signatures: your SSH keys, host keys and TLS certificates are still RSA, ECDSA or Ed25519. Post-quantum replacements for those aren't widely deployed yet, and a weak signature only matters once someone can forge one in real time, so that part has to wait for vendors to catch up. Symmetric encryption such as AES and ChaCha20 isn't the concern here.
TL;DR
- Run
ssh -v yourserver true 2>&1 | grep "kex: algorithm". - If it doesn't say
mlkem768x25519orsntrup761x25519, add this to the top of~/.ssh/config:KexAlgorithms ^mlkem768x25519-sha256,[email protected] - Check that your servers run OpenSSH 9.0 or later and that your TLS negotiates
X25519MLKEM768.
It took me five minutes. If the people who've been briefed are calling it urgent, five minutes is worth it.

