Hacker News new | ask | show | jobs
by zzq1015 7 hours ago
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.
2 comments

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