Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The more pressing issue is making sure your key exchange algorithm is set to using post-quantum hybrid algos.

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/
 help



Before doing any of these, please check your sshd version and crypto capabilities. Otherwise, you could lose access to ssh.

  > 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.

you can also ssh to a live server with -vv (double verbose is important, single verbose won't give you these full details) to see the actual details of the protocol negotiation.

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

Looks good except you can change the line in your config:

  KexAlgorithms mlkem768x25519-sha256,sntrup761x25519-sha512,sntrup761x25519-sha512@openssh.com
sntrup761x25519-sha512@openssh.com has been supported since OpenSSH 8.5 back in March 2021

The entire point of having hybrids was to hedge against relatively new and untested PQC algos like ML-KEM/DSA. But now that p256, curve25519, etc. would soon be obsolete I hope these would be swapped out in hybrids with stronger ones.

What a mess!


TBH, OpenSSH is the LEAST messy and most PQ-ready software for now. SNTRUP, a PQ algo, has been supported since March 2021

For a hybrid algorithm you have to break BOTH to decrypt anything


But the other pair in the hybrid has to be strong too. Can't have one known-to-be-broken (p256, ed25519) one paired with a relatively new (mldsa) but not yet broken one.

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:~>

No, it's ssh -Q kex

KEX = key exchange, OpenSSH definitely has sntrup761x25519-sha512 AND sntrup761x25519-sha512@openssh.com

Also, it's like nobody supports curve448. I wish mlkem1024x448-sha512 were implemented


Thanks, I have it. Never had cause to look at the key exchange options before all this!

Also for keys it's

  ssh -Q key-sig
Or

  ssh -Q HostKeyAlgorithms
Because `ssh -Q key` does not list every key type

> KexAlgorithms mlkem768x25519-sha256,sntrup761x25519-sha512,sntrup761x25519-sha512@openssh.com

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. ;)

The ^ trick works client-side. Server-side SSHd is just a list of supported parameters, and only for client-side SSH the order matters.

oh shit… so if we can attack Diffie-Hellman at the initial key exchange, all ephemeral keys will be known, including any tricks like ratcheting? Right??!

Yes. The ratchet is another DH exchange, and equally vulnerable to a passive collector. (Assuming the initial DH exchange was captured.)

Fortunately, Signal upgraded to PQXDH for initial key exchange years ago, and added frequent ML-KEM based ratchets in 1025.


AFAIK, no.

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)

SSH rekeying is just another DH, and equally vulnerable. Essentially it is a new session, no ratcheting, so shorter rekeys just make it more likely the listener catches a rekey event.

Breaking keys takes time.

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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: