1. Tech

Your suggestion is on its way!

An email with a link to:


was emailed to:

Thanks for sharing About.com with others!

Linux / Unix Command: ssh-add
Command Library


ssh-add - adds RSA or DSA identities to the authentication agent  


ssh-add [-lLdDxX ] [-t life ] [file ... ]
ssh-add -s reader
ssh-add -e reader  


ssh-add adds RSA or DSA identities to the authentication agent, ssh-agent1. When run without arguments, it adds the files $HOME/.ssh/id_rsa $HOME/.ssh/id_dsa and $HOME/.ssh/identity Alternative file names can be given on the command line. If any file requires a passphrase, ssh-add asks for the passphrase from the user. The passphrase is read from the user's tty. ssh-add retries the last passphrase if multiple identity files are given.

The authentication agent must be running and must be an ancestor of the current process for ssh-add to work.

The options are as follows:

Lists fingerprints of all identities currently represented by the agent.
Lists public key parameters of all identities currently represented by the agent.
Instead of adding the identity, removes the identity from the agent.
Deletes all identities from the agent.
Lock the agent with a password.
Unlock the agent.
-t life
Set a maximum lifetime when adding identities to an agent. The lifetime may be specified in seconds or in a time format specified in sshd(8).
-s reader
Add key in smartcard reader
-e reader
Remove key in smartcard reader



ssh(1), ssh-agent1, ssh-keygen1, sshd(8)

Important: Use the man command (% man) to see how a command is used on your particular computer.

>> Linux/Unix Command Library

>> Shell Command Library

Explore Linux
By Category
    linuxLinuxcomputeTechb0502bb1540001006c84963cb0502bb1540002006c818e0ahttp://linux.about.comod526F6F74132058liveGary Newelllinuxguide3TO004KpzNIP11970-01-0110/od/index.htm0526F6F741approved/od
  1. About.com
  2. Tech
  3. Linux

©2016 About.com. All rights reserved.