Skip to main content
Kill -9 Club
Sign in

ssh-add

SSHPackage: openssh-client

Loads a private key into the agent for the session, which saves retyping the passphrase — and which lends the key to everything that talks to the agent, including a remote host when -A is on.

What its options do in the lessons

From the same glossary the lessons render under their commands, so the two cannot disagree.

ssh-add -l
Lists the fingerprints of the keys the agent holds — the fingerprints, never the keys. With no agent reachable it says so, rather than answering with an empty list.
ssh-add -D
Removes every key from the agent without stopping it. What to run when leaving a shared workstation.
ssh-add -t
How long before the agent forgets the key (-t 4h). Bounds the exposure and asks nothing further of you.
ssh-add -c
Requires a confirmation before every signature. Each use of the key becomes visible, which assumes an ssh-askpass to answer it: a workstation option, not a server one.

Lessons that teach it