---
title: 'Warning: connection is not using a post-quantum key exchange algorithm'
url: https://calvin.my/posts/warning-connection-is-not-using-a-post-quantum-key-exchange-algorithm
published: 2026-03-26
updated: 2026-09-16
category: Operations
tags:
- Security
- OpenSSH
- MacOS
summary: OpenSSH may warn that a connection lacks post-quantum key exchange protection against future “store now, decrypt later” attacks. The post explains that this is a precaution rather than an immediate security incident. Users can address it by upgrading remote servers to OpenSSH 10 or later, testing client-side preferences for quantum-resistant exchanges, or retaining compatible methods when servers are not ready. The warning can also be suppressed, though doing so does not improve security.
---

# Warning: connection is not using a post-quantum key exchange algorithm

## The issue

OpenSSH (or any tool that depends on it) might display a warning about the "store now, decrypt later" attack.

```bash
** 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
```

The warning is a proactive measure to encourage the migration to quantum-resistant standards. There is no immediate risk. ([Reference](https://www.openssh.org/pq.html))

* * *

## The Fix

### Option 1:

1. Upgrade the remote server to OpenSSH 10+.

### Option 2:

1. If you do not own the server or you are not sure if the server has already been upgraded, you can enforce the KEX via client-side configuration. For example, in MacOS:

   ```bash
   $ nano ~/.ssh/config
   
   # All Hosts
   Host *
   KexAlgorithms mlkem768x25519-sha256,sntrup761x25519-sha512@openssh.com,curve25519-sha256
   
   # Or, Certain Hosts
   Host x.x.x.x y.y.y.y z.z.z.z
   KexAlgorithms mlkem768x25519-sha256,sntrup761x25519-sha512@openssh.com,curve25519-sha256
   ```

2. If the connection is successful and you no longer see the warning, this indicates the server is already upgraded, but the default is still the old algorithm.

3. If the connection negotiation is not successful, this indicates the server is not ready. You will need to stick to one of the available algorithms.

   ```bash
   Unable to negotiate with x.x.x.x port yy: no matching key exchange method found. Their offer: aaa, bbb, ccc
   ```

### Option 3:

1. Add the following to suppress the warning.

   ```bash
   $ nano ~/.ssh/config
   
   Host *
   WarnWeakCrypto no-pq-kex
   ```
