NCAE Mapping Hub
Overview Scoreboard Data Roles Exercised Checklists Lessons Skill Drills Practice Terminal Progress
published priority 4 20 min. 40 XP.

SSH Hardening Without Locking Yourself Out

Classic mistake: team hardens sshd_config, restarts sshd, and promptly loses access. This lesson covers the safe sequence. test in a second terminal before closing your first session, preserve scoring-engine keys, and understand the permission triad.

Objectives

Quick reference

CommandPurpose
systemctl status sshd Is SSH up?
sshd -T | less Effective config after parsing
cp /etc/ssh/sshd_config /root/sshd_config.backup Back up before editing
tail -20 /var/log/auth.log Recent authentication events
chmod 700 ~/.ssh; chmod 600 ~/.ssh/authorized_keys Permission triad
fail2ban-client status sshd Is fail2ban holding any bans?

Common pitfalls

Skill drills

  1. 1. Which sshd_config option disables root SSH login?
    PermitRootLogin no
  2. 2. Required permission mode for ~/.ssh?
    700
  3. 3. Required permission mode for authorized_keys?
    600
  4. 4. Command that validates sshd_config without restarting sshd?
    sshd -T

NCAE scoreboard patterns this lesson prevents