PREP LAB

Guided SSH Hardening

< Shield House

OBJECTIVES

0/8 Complete

    SSH HARDENING INTEL

    MISSION BRIEFING

    A penetration test revealed your SSH server is vulnerable to brute-force attacks. Walk through each hardening step to secure the SSH daemon before the retest.

    # Current sshd_config (INSECURE)
    PermitRootLogin yes
    PasswordAuthentication yes
    Port 22
    MaxAuthTries 6
    PermitEmptyPasswords yes
    ClientAliveInterval 0

    Key Commands

    cat /etc/ssh/sshd_config
    View SSH server config
    grep Setting /etc/ssh/sshd_config
    Find specific setting
    sed -i 's/old/new/' file
    Edit config in-place
    systemctl restart sshd
    Apply SSH changes
    ssh-keygen -t ed25519
    Generate SSH key pair
    fail2ban-client status sshd
    Check fail2ban SSH jail
    Why This Matters
    SSH is the primary remote access vector for Linux servers. A poorly configured SSH daemon is an open invitation for attackers. Every step here maps to real CIS Benchmark controls.