# Your Mac can skip post-quantum SSH. Check it in one command.

December 3, 2026 Security 5 min read

[Plans changed on 2026-11-24. See current plans at /pricing.](https://contextmode.ai/pricing)

On 2 December 2026, the NSA, CISA and the White House Office of the National Cyber Director told organisations to move to post-quantum cryptography faster. Nine large companies backed them the same day. Your Mac is part of that move, and the default SSH setup on macOS 26 does not use post-quantum key exchange, even when the server supports it. The check takes one command. The fix is one line in `~/.ssh/config`, but you must check your OpenSSH version first, because the wrong line stops ssh from working.

## The short version

- Run `ssh -v git@github.com 2>&1 | grep "kex: algorithm"`. If the answer is `ecdh-sha2-nistp256` or `curve25519-sha256`, the connection is not post-quantum.
- On macOS 26, the file `/etc/ssh/crypto.conf` puts classical ECDH first. A line at the top of `~/.ssh/config` overrides it.
- Add the `mlkem768x25519-sha256` name only on OpenSSH 9.9 or later. On older OpenSSH, the line fails. We tested it.
- Keep the `^` in the line. It keeps the classical algorithms as a fallback for old servers.

## What happened this week

The NSA, CISA and the White House Office of the National Cyber Director urged organisations to speed up the move to post-quantum cryptography. The stated reason is not a quantum computer. It is frontier AI models that solve math problems that stayed open for a long time. The agencies said this is not an immediate, widespread threat. sudolabs reports the statement in its write-up of the macOS problem.

The same day, Amazon, Anthropic, Apple, Cloudflare, Google, Microsoft, OpenAI, Oracle and SpaceX published a joint statement that backs the guidance. Cloudflare CEO Matthew Prince added: "it is urgent to move encrypted systems to post-quantum (maybe more appropriately called post-AI) standards."

Keep the tone calm. On 25 November, Cloudflare explained that post-quantum cryptography is still safe. Anthropic published new math on lattice problems, and the attacks it describes need quantum computers that do not exist. The post-quantum algorithms are the fix here. They are not the problem.

## Why it matters for coding agents

Your coding agents run `git push` and `git pull` over SSH from your Mac. They use your SSH config and your keys. If your Mac picks a classical key exchange, every agent session that talks to a Git host over SSH uses it too. This is the "store now, decrypt later" case: someone records the traffic today and decrypts it when the attack becomes possible.

## Why the Mac picks the wrong one

OpenSSH made post-quantum key exchange the default in two steps. `sntrup761x25519-sha512` is the default since OpenSSH 9.0 (April 2022). `mlkem768x25519-sha256` arrived in 9.9 and is the default since 10.0 (April 2025). OpenSSH 10.1 prints a warning when a connection is not post-quantum.

macOS 26 ships `/etc/ssh/crypto.conf`. The file `/etc/ssh/ssh_config.d/100-macos.conf` includes it, and it holds this line:

```
KexAlgorithms ^ecdh-sha2-nistp256
```

In `ssh_config`, a list that starts with `^` goes to the head of the default set. So classical ECDH comes first. The client offers the first algorithm that the server also supports, and almost every server supports this one. sudolabs found this on macOS 26 with OpenSSH 10.3.

The fix works because ssh reads `~/.ssh/config` before the system files, and the first value wins. A line at the top of your own file beats `crypto.conf`.

## Step 1: Check

Run these three commands. Use any server in place of `git@github.com`.

```
ssh -V
ssh -v git@github.com 2>&1 | grep "kex: algorithm"
ssh -G github.com | grep ^kexalgorithms
```

The second command shows the algorithm your connection really used. Read it like this:

| You see | It means |
| --- | --- |
| mlkem768x25519-sha256 | Post-quantum. Good. |
| sntrup761x25519-sha512@openssh.com | Post-quantum. Good. |
| ecdh-sha2-nistp256 | Not post-quantum. |
| curve25519-sha256 | Not post-quantum. |

Example output on a Mac that has the problem:

```
$ ssh -v git@github.com 2>&1 | grep "kex: algorithm"
debug1: kex: algorithm: ecdh-sha2-nistp256
```

If you see a good name, you are done. If you see a classical name, go on.

**Check your version first. The wrong line stops ssh.**

We tested this on a Mac with macOS 14.5 and OpenSSH 9.6. The line `KexAlgorithms ^mlkem768x25519-sha256,sntrup761x25519-sha512@openssh.com` made ssh fail with these errors:

```
Unsupported KEX algorithm "mlkem768x25519-sha256"
Bad SSH2 KexAlgorithms
```

That Mac has no `/etc/ssh/crypto.conf`, and its live connection to github.com already used `sntrup761x25519-sha512@openssh.com`. It needed no fix. Run `ssh -V` before you edit any file.

## Step 2: Fix, on OpenSSH 9.9 or later

First, confirm that your ssh knows the algorithm. This command must print one line:

```
ssh -Q kex | grep mlkem
```

```
mlkem768x25519-sha256
```

If it prints the line, put this at the very top of `~/.ssh/config`, above any `Host` block:

```
KexAlgorithms ^mlkem768x25519-sha256,sntrup761x25519-sha512@openssh.com
```

The `^` puts these two names first and keeps the classical algorithms after them. A server that is too old for post-quantum still connects.

## Step 3: On OpenSSH older than 9.9

If `ssh -Q kex | grep mlkem` prints nothing, do not add `mlkem768x25519-sha256`. That is the case that broke ssh in our test.

- If the check in step 1 already shows `sntrup761x25519-sha512@openssh.com`, you have nothing to do.
- If it does not, use this line at the top of `~/.ssh/config`:

```
KexAlgorithms ^sntrup761x25519-sha512@openssh.com
```

## Step 4: Check again

```
ssh -v git@github.com 2>&1 | grep "kex: algorithm"
```

Example output after the fix, on OpenSSH 9.9 or later with a server that supports it:

```
debug1: kex: algorithm: mlkem768x25519-sha256
```

If the server only supports the older name, you see `sntrup761x25519-sha512@openssh.com`. Both are good. If you still see a classical name, the server does not support post-quantum key exchange. Your client is correct, and the next step is for the server.

## Step 5: Servers

Run OpenSSH 9.0 or later on the server side. Prefer 10.x, because it has `mlkem768x25519-sha256` as its default. The client and the server must share one post-quantum algorithm, or the connection falls back to a classical one.

## Sources

All pages read 3 December 2026. Thanks to sudolabs for finding the macOS cause.

- [sudolabs.nz, the macOS SSH post-quantum key exchange fix](https://sudolabs.nz/blog/macos-ssh-post-quantum-key-exchange-fix). It reports the 2 December guidance and the `crypto.conf` cause. Read 3 December 2026.
- [blog.cloudflare.com, "Post-quantum cryptography is still safe"](https://blog.cloudflare.com/pq-is-still-safe/), 25 November 2026. Read 3 December 2026.
- Cloudflare on X, the joint statement from Amazon, Anthropic, Apple, Cloudflare, Google, Microsoft, OpenAI, Oracle and SpaceX, and Matthew Prince's reply, 2 December 2026. Read 3 December 2026.
- [openssh.com/pq.html](https://www.openssh.com/pq.html). Read 3 December 2026.
- [openssh.com/releasenotes.html](https://www.openssh.com/releasenotes.html). Read 3 December 2026.
- [man.openbsd.org/ssh_config](https://man.openbsd.org/ssh_config), the `KexAlgorithms` entry. Read 3 December 2026.
- Our own test: macOS 14.5, OpenSSH 9.6, run 3 December 2026.

[Get started free](https://console.contextmode.ai/login) [All posts](https://contextmode.ai/blog)
