ssh-add

Adds private key identities to the authentication agent

Summary

ssh-add adds private key identities to the authentication agent, ssh-agent. When run without arguments, it adds the files ~/.ssh/id_rsa, ~/.ssh/id_dsa, ~/.ssh/id_ecdsa, and ~/.ssh/id_ed25519.

After loading a private key, ssh-add will try to load corresponding certificate information from the filename obtained by appending -cert.pub to the name of the private key file.

Syntax

ssh-add [-cDdkLlqvXx] [-E fingerprint_hash] [-t life] [file ...]

Command Options

ssh-add [option]

Effect

-l

Lists fingerprints of all identities currently represented by the agent.

-L

Lists public key parameters of all identities currently represented by the agent.

-d

Delete identity

-D

Delete all identities

-x

Lock agent

-X

Unlock Agent

-t [life]

Set lifetime (in seconds) when adding identities.

-E [hash]

Specifies the hash algorithm used when displaying key fingerprints. Valid options are: “md5” and “sha256”. The default is “sha256”.

Last updated