Lion Cipher Lab

Run ssh-agent as your daily driver, then measure the agent-forwarding hijack and shut it down

Why it matters

The ssh-agent is the single most-used credential on an engineer's machine: load your key once, and it signs every login all day so you never retype a passphrase. The catch is that the moment you add `-A` (agent forwarding) to reach a server through a jump box, you hand that server's root the ability to log in AS YOU to everything your key opens — without ever seeing your private key. This is a top way attackers turn one compromised hop into a whole fleet. You will prove the hijack on your own throwaway containers, then shut it down and watch the reachable-host count fall from 3 to 0.

What you'll learn

Steps in this lab

  1. What an ssh-agent is, in one breath
  2. What this lab is NOT (so you place it correctly)
  3. Start the agent and load one key
  4. Build the disposable two-hop lab
  5. Turn on agent forwarding and feel why it is tempting
  6. MEASURE the hijack from root's seat on the bastion
  7. Fix 1 (partial): cap the key's lifetime with ssh-add -t
  8. Fix 2 (and its honest failure): confirm each use with ssh-add -c
  9. Fix 3 (the real one): ProxyJump keeps the agent on your machine
  10. Daily hygiene: -l, -D, and pinning identities in ~/.ssh/config
  11. Windows note: the ssh-agent service as your daily driver
  12. What you proved, and the instinct to keep

Open the full interactive lab →