My SSH hardening guide has iced over. It’s old but for the eternally spooked the overall idea remains. Personally, if you can avoid (?), that’s one less worry.
The first hullabaloo appears to be that newer KexAlgorithms or key exchange algorithms are advised:
KexAlgorithms mlkem768x25519-sha256,sntrup761x25519-sha512ssh -Q mac # List client message authentication codes
ssh -Q cipher # List client ciphers
ssh -Q kex # List client key exchange algorithms
ssh -Q key # List client key types
nmap --script ssh2-enum-algos -p 22 localhost # (If port open, unfiltered, and nmap --script exists) List all of the above on the server in one shot The second hullabaloo is that migrating to newer authentication keys are advised.
ssh-keygen -t ecdsa -b 384 # Higher client key bits (384 or 521 > 256)
ssh-keygen -t mldsa44-ed25519 # New client keys
ssh-keygen -A # Add missing host/server keys (RSA/ECDSA/ED25519/MLDSA44-ED25519)ssh -vT git@gitlab.com
ssh -vT git@codeberg.org
ssh -vT git@github.comdebug1: kex: algorithm: mlkem768x25519-sha256
debug1: Will attempt key: /home/user/.ssh/id_rsa
debug1: Will attempt key: /home/user/.ssh/id_xmss
debug1: Will attempt key: /home/user/.ssh/id_ecdsa
debug1: Will attempt key: /home/user/.ssh/id_ecdsa_sk
debug1: Will attempt key: /home/user/.ssh/id_ed25519
debug1: Will attempt key: /home/user/.ssh/id_ed25519_sk
debug1: Will attempt key: /home/user/.ssh/id_mldsa44_ed25519
debug1: Server accepts key: /home/user/.ssh/id_rsa RSA SHA256:0000000000000000000000000000000000000000000 agent/explicit
debug1: Server accepts key: /home/user/.ssh/id_ecdsa ECDSA SHA256:1111111111111111111111111111111111111111111 agent/explicit
debug1: Server accepts key: /home/user/.ssh/id_mldsa44_ed25519 MLDSA44-ED25519 SHA256:3333333333333333333333333333333333333333333 agent/explicit