Name

ssh-add

Synopsis

    ssh-add [options] [files]
    ssh-add -e|-sreader

Add RSA or DSA identities to the authentication agent (see ssh-agent), which must be running. With no arguments specified, add the files $HOME/.ssh/id_rsa, $HOME/.ssh/id_dsa, and $HOME/.ssh/identity. If any files are specified, add those instead, prompting for a passphrase if required.

Options

-c

Confirm that an added identity should be used for authentication. The confirmation is done by the program named in the SSH_ASKPASS environment variable. GNU/Linux and Mac OS X only.

-d

Remove an identity from the agent instead of adding one.

-D

Delete all identities from the agent.

-e reader

Remove key in specified smartcard reader.

-l

List fingerprints of all identities known to the agent.

-L

List public key parameters of all identities known to the agent.

-s

Add key in smartcard reader.

-t life

Set maximum lifetime when adding identities to an agent. The value of life can be in seconds or another time format specified in sshd.

-x

Lock the agent with a password.

-X

Unlock the agent.

Get Unix in a Nutshell, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.