by dogcow · 1d ago · 0 comments
The current threat is "store now, decrypt later," so you want to make sure the traffic flow is sufficiently secured.
The SSH keys you use to log in are for authentication only, not encryption. For authentication, there's not a current known threat because someone would have to have a computer capable of cracking your key right now, in real-time.
You can add the following line to your server's sshd_config file to ensure you only accept post-quantum hybrid key exchange algorithms.
KexAlgorithms mlkem768x25519-sha256,sntrup761x25519-sha512,sntrup761x25519-sha512@openssh.com
Similarly, on your clients, you can add a KexAlgoritms entry under 'Host *' in ~/.ssh/config/ > sshd -V
OpenSSH_10.6p2, OpenSSL 4.1.1 1 Dec 2026
> ssh -Q kex
diffie-hellman-group1-sha1
diffie-hellman-group14-sha1
diffie-hellman-group14-sha256
diffie-hellman-group16-sha512
diffie-hellman-group18-sha512
diffie-hellman-group-exchange-sha1
diffie-hellman-group-exchange-sha256
ecdh-sha2-nistp256
ecdh-sha2-nistp384
ecdh-sha2-nistp521
mlkem768nistp256-sha256 -> PQ, but NIST P-256 lol
curve25519-sha256
curve25519-sha256@libssh.org
sntrup761x25519-sha512 -> PQ
sntrup761x25519-sha512@openssh.com -> PQ
mlkem768x25519-sha256 -> PQ
Check with sshd -t after changing the config.for example, this is within my homelab, where I know all clients and servers are on the latest OpenSSH so I can lock the options down:
debug2: KEX algorithms: mlkem768x25519-sha256,sntrup761x25519-sha512,ext-info-c,kex-strict-c-v00@openssh.com
debug2: host key algorithms: ssh-ed25519
debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes256-gcm@openssh.com
debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes256-gcm@openssh.com
debug2: MACs ctos: hmac-sha2-512-etm@openssh.com
debug2: MACs stoc: hmac-sha2-512-etm@openssh.com
debug2: compression ctos: none,zlib@openssh.com
debug2: compression stoc: none,zlib@openssh.com KexAlgorithms mlkem768x25519-sha256,sntrup761x25519-sha512,sntrup761x25519-sha512@openssh.com
sntrup761x25519-sha512@openssh.com has been supported since OpenSSH 8.5 back in March 2021What a mess!
For a hybrid algorithm you have to break BOTH to decrypt anything
Btw, it's the first time I'm hearing about sntrup. It's not available in OpenSSH 10.6.
pavin@suse-pc:~> ssh -V
OpenSSH_10.6p2, OpenSSL 3.5.3 16 Sep 2025
pavin@suse-pc:~> ssh -Q key
ssh-ed25519
ssh-ed25519-cert-v01@openssh.com
sk-ssh-ed25519@openssh.com
sk-ssh-ed25519-cert-v01@openssh.com
ssh-mldsa44-ed25519
ssh-mldsa44-ed25519-cert
ecdsa-sha2-nistp256
ecdsa-sha2-nistp256-cert-v01@openssh.com
ecdsa-sha2-nistp384
ecdsa-sha2-nistp384-cert-v01@openssh.com
ecdsa-sha2-nistp521
ecdsa-sha2-nistp521-cert-v01@openssh.com
sk-ecdsa-sha2-nistp256@openssh.com
sk-ecdsa-sha2-nistp256-cert-v01@openssh.com
ssh-rsa
ssh-rsa-cert-v01@openssh.com
pavin@suse-pc:~>Might be useful to highlight that you can put ^ at the front of that list, i.e.
KexAlgorithms ^mlkem768x25519-sha256,sntrup761x25519-sha512,sntrup761x25519-sha512@openssh.com
`man sshd_config`:
If the specified list begins with a ‘^’ character, then the specified ciphers will be placed at the head of the default set.
Also people should not forget to set their ssh_config client-side too. ;)Fortunately, Signal upgraded to PQXDH for initial key exchange years ago, and added frequent ML-KEM based ratchets in 1025.
SSH's rekeying generates completely new keys, so probably add this to your config:
RekeyLimit 128M 10m
Or something much more frequent (default 1G 1h)Option A: having 6+ keys in 1 hour, attacks break 1 key to see a slice of the communication
Option B: 1 key exchange at the beginning, betting on the attacker not saving the first handshake packet
Still, switch to post-quantum key exchange ASAP, this is only a bandaid solution.