Enable post-quantum SSH (mlkem768x25519-sha256) on Go (golang.org/x/crypto/ssh)
How to offer the hybrid post-quantum key exchange mlkem768x25519-sha256 on Go (golang.org/x/crypto/ssh), from the vendor's documentation, checked on December 4, 2026.
Steps
- Check the requirements: golang.org/x/crypto v0.38.0+ and Go 1.24+.
- Apply the configuration below.
- Reload the service and check it again on checkmypqc.com.
Recommended now: post-quantum first, classical kept
mlkem768x25519-sha256 is first in the default key exchange list. A server that sets Config.KeyExchanges keeps its own list: add ssh.KeyExchangeMLKEM768X25519.
Later: require post-quantum
cfg := &ssh.ServerConfig{
Config: ssh.Config{
KeyExchanges: []string{ssh.KeyExchangeMLKEM768X25519},
},
}
Findings
- HighNo post-quantum key exchange
CMP-SSH-KX-CLASSICAL - HighOnly a pre-standard post-quantum method
CMP-SSH-KX-DRAFT-ONLY - LowPost-quantum through sntrup761 only
CMP-SSH-KX-NO-MLKEM