Modern(er) version of https://infosec.mozilla.org/guidelines/openssh configuration, including post-quantum algorithms.
Example usage:
./sshd_hardening.sh | tee /etc/ssh/sshd_config.d/sshd_hardening.conf
rc-service sshd restart || service sshd restart || systemctl restart sshdCheck the current runtime sshd config to make sure that the hardening is effective:
sshd -T | lessIf you're still seeing:
** WARNING: connection is not using a post-quantum key exchange algorithm.
** This session may be vulnerable to "store now, decrypt later" attacks.
** The server may need to be upgraded. See https://openssh.com/pq.html
this could mean that your sshd version is ancient or there is something wrong with the configuration
You can check the sshd version with:
sshd -Vand you can also check if post-quantum algorithms are available with:
ssh -Q kex | grep -vE "^(diffie|ecdh|curve)"this should yield at least:
sntrup761x25519-sha512
sntrup761x25519-sha512@openssh.com
mlkem768x25519-sha256