tdro

Another wandering soul whispering into the void. If you are looking for my blog you are in the wrong place. The profile and header pictures are brought to you by cdd20.

tdro micro.thedroneely.com (edited) view
  • Markdown Plaintext Embed Permalink
  • 260/50 words 87s read

    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:
    shell
    KexAlgorithms mlkem768x25519-sha256,sntrup761x25519-sha512
    shell
    ssh -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 
    Helpful enumeration commands
    The second hullabaloo is that migrating to newer authentication keys are advised.
    shell
    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)
    Generate additional keys if supported
    shell
    ssh -vT git@gitlab.com
    ssh -vT git@codeberg.org
    ssh -vT git@github.com
    Check client-server debug output for key algorithm support or enumerate
    shell
    debug1: 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
    Confirm kex: algorithm, attempt key: and accepted authentication keys
    #gists #linux