CH-J Toolsserver management over SSH
Menu
All guides and articles →

How to verify that SSH uses post-quantum cryptography

Read-only OpenSSH diagnostics: algorithm support, effective configuration, the KEX actually negotiated, and separate verification of authentication.

Determine which layer you are checking

The most convincing evidence is not the application name or operating system version, but the result of a specific connection. In SSH, distinguish between transport key exchange, server authentication, and user authentication. A post-quantum mechanism in one layer does not automatically ensure the same property in the others. This process begins with a key exchange, usually referred to as a KEX.

Test with the client you actually use to connect. The system OpenSSH installation on a laptop may support different algorithms from the library built into a graphical or mobile client. A successful test with one program therefore does not establish the capabilities of the other. Record the client, target host, port, and date; without this context, the result can easily be attributed to the wrong connection setup.

First, find out the version and support

ssh -V
ssh -Q kex

The first command lists the version of the running client, the second its supported key exchange algorithms. In the listing, you may see mlkem768x25519-sha256 or the sntrup761x25519-sha512 variant for the corresponding implementation. These are hybrid mechanisms with a post-quantum component. The exact list depends on the build and its libraries, not just the package name.

The presence of an entry in ssh -Q confirms the client's capability, not its use in the current session. Similarly, a new server version does not guarantee the expected settings. Consider distribution modifications, cryptographic policies, and other binary in the path. For multiple installations, determine which ssh command you are actually running.

Check the configuration for a specific target

ssh -G -p 22 spravce@server.example

The effective configuration takes the applicable client blocks and options into account. Look for kexalgorithms, hostname, port, and any route through an intermediary. The output may reveal that an alias points to a different server or that local configuration restricts modern KEX. This still describes the client’s offer and rules, rather than the result negotiated by both sides.

If you use a jump host, there are separate SSH connections. Check the relevant parts of the path separately; do not automatically attribute a property of the first tunnel to the target connection. Your operational conclusion should state which part of the route was verified. Otherwise, a well-secured intermediary may be mistaken for evidence about the security of an older target device.

Diagnostics of the established connection is crucial

ssh -vv -p 22 spravce@server.example

Find the line kex: algorithm and its selected value in the output. For the expected hybrid ML-KEM profile, the decisive evidence is the actual selection of mlkem768x25519-sha256, rather than its mere presence in the offer. Read kex: host key algorithm and the subsequent user authentication separately. A classical host signature does not rule out hybrid transport key exchange.

Only log in to a server whose identity you have verified through a trusted method. Diagnostics should not require disabling host key checking. Before sharing the output, remove internal names, addresses, accounts, and paths according to their sensitivity. Private keys and passwords do not belong in the log.

One-time request for a specific algorithm

ssh -vv -o KexAlgorithms=mlkem768x25519-sha256 -p 22 spravce@server.example

This option offers only the specified KEX for a single test. If the other side does not support or allow it, the connection fails instead of automatically using a classical alternative. This is useful for confirming compatibility, but it is no reason to immediately overwrite the global configuration of all clients and servers. Preserve a working recovery access path.

An unknown algorithm error points to local support or name. A missing common KEX error points to a mismatch between the two parties. The receiving server may be a different instance than you expect, for example due to port or proxy. Distinguish this issue from a user key rejection, which occurs at a different stage.

What does a warning mean and what does its absence mean?

Newer OpenSSH warns when using non-post-quantum exchange about the option to store traffic and decrypt it later. Hiding the warning via settings does not upgrade the transport. Similarly, the absence of a message may not be positive evidence: an older client or other library may not provide this diagnostic at all.

The correct approach is to determine what was actually negotiated, what both implementations support, and which migration step is appropriate. Do not replace the user key solely because a KEX is missing and expect this to fix the transport. In CH-J Tools Mobile 0.0.4, the generator’s wide range of options also does not imply ML-KEM support in the built-in SSH connection.

Save the result as a verifiable statement

  • Identify the specific client, server, and port.
  • Write down the selected KEX, host algorithm, and authentication method separately.
  • Distinguish between support, the offer, and the algorithm actually negotiated.
  • After updating or changing the rules, perform a targeted new test.

For example, the result may be a record of a hybrid KEX with classic user authentication. This is valid and useful information. Do not overwrite it with a general conclusion that all keys, files, and connections in the application are post-quantum. A well-defined test will allow you to safely verify the next step of the migration later.

Frequently asked questions

Is it enough to see ML-KEM in ssh -Q?

No. The list confirms client support; actual usage can be determined by diagnosing a specific connection.

Will suppressing the warning fix the cryptography?

No. It will change the message, not the negotiated mechanism.

Can I transfer the result of the system SSH to the mobile application?

Not automatically. Each implementation and specific session requires its own review.

Detailed documentation

OpenSSH: ssh command and diagnostic options →

OpenSSH: client configuration →

OpenSSH: post-quantum key exchange →

Biometric unlock and security →

All tutorials by category →