Facts last checked: December 4, 2026
SSH logins and file transfers are a prime target for harvest-now-decrypt-later. OpenSSH has had post-quantum key exchange on by default for years:
- OpenSSH 9.0 (April 2022) made
sntrup761x25519-sha512the default. - OpenSSH 10.0 (April 2025) made
mlkem768x25519-sha256the default. - OpenSSH 10.1 (October 2025) prints a warning when a connection uses a key exchange that isn’t post-quantum. The
WarnWeakCryptooption controls it.
Seeing the warning?
The warning means the server you connect to doesn’t offer a post-quantum method. Fix the server rather than hiding the warning.
Check the server
ssh -V
sudo sshd -T | grep -i kexalgorithms
If the server is older than 9.0, update it. If /etc/ssh/sshd_config (or a file in sshd_config.d) has a KexAlgorithms line, put the post-quantum methods first:
KexAlgorithms mlkem768x25519-sha256,sntrup761x25519-sha512,[email protected],curve25519-sha256,[email protected]
Only list methods your ssh -Q kex output shows, then test the config and restart, keeping your current session open in case of a mistake:
sudo sshd -t && sudo systemctl restart ssh
On RHEL-family systems the service is sshd.
Check a connection
ssh -v user@server 2>&1 | grep "kex: algorithm"
