Harden and verify OpenSSH server access

8 steps · about 2 h 56 min · Intermediate

  1. Map the SSH server authentication flow (reference, OpenBSD manual pages, 18 min)

    Know which daemon, files and privilege boundaries participate before changing access policy.

  2. Create and inspect a modern key pair (reference, OpenBSD manual pages, 22 min)

    Generate a protected key and verify its fingerprint rather than copying unidentified key material.

  3. Constrain an authorised key (guide, SSH Academy, 22 min)

    Apply per-key restrictions when an automation or support key needs less freedom than an interactive user.

  4. Build a least-privilege server policy (reference, OpenBSD manual pages, 32 min)

    Choose authentication, user, root-login and forwarding settings from their exact documented behaviour.

  5. Make client host selection explicit (reference, OpenBSD manual pages, 20 min)

    Use host aliases and identity selection to reduce accidental key and destination mistakes.

  6. Test authentication and forwarding verbosely (reference, OpenBSD manual pages, 24 min)

    Read client debug output and exercise only the forwarding modes the policy is meant to allow.

  7. Collect host keys without trusting them blindly (reference, OpenBSD manual pages, 16 min)

    Separate key collection from out-of-band fingerprint verification and known-hosts updates.

  8. Validate a constrained file-transfer path (reference, OpenBSD manual pages, 22 min)

    Finish with a syntax check, a second recovery session and a restricted transfer test before ending the old session.