User Commands ssh-add(1)
NAME
ssh-add - add RSA or DSA identities to the authentication
agentSYNOPSIS
ssh-add [-lLdDxX] [-t life] [ file ]...
DESCRIPTION
The ssh-add utility adds RSA or DSA identities to the
authentication agent, ssh-agent(1). When run without argu-
ments, it attempts to add all of the files$HOME/.ssh/identity (RSA v1), $HOME/.ssh/id_rsa (RSA v2),
and $HOME/.ssh/id_dsa (DSA v2) that exist. If more than one
of the private keys exists, an attempt to decrypt each withthe same passphrase is made before reprompting for a dif-
ferent passphrase. The passphrase is read from the user'stty or by running the program defined in SSH_ASKPASS (see
below). The authentication agent must be running. OPTIONS The following options are supported:-d Instead of adding the identity, this option
removes the identity from the agent.-D Deletes all identities from the agent.
-l Lists fingerprints of all identities currently
represented by the agent.-L Lists public key parameters of all identities
currently represented by the agent.-t life Sets a maximum lifetime when adding identities to
an agent. The lifetime can be specified in seconds or in a time format specified in sshd(1M).-x Locks the agent with a password.
-X Unlocks the agent.
SunOS 5.11 Last change: 20 May 2009 1
User Commands ssh-add(1)
ENVIRONMENT VARIABLESDISPLAY If ssh-add needs a passphrase, it reads the
SSH_ASKPASS passphrase from the current terminal if it
was run from a terminal. If ssh-add does
not have a terminal associated with it butDISPLAY and SSH_ASKPASS are set, it exe-
cutes the program specified by SSH_ASKPASS
and open an X11 window to read the passphrase. This is particularly usefulwhen calling ssh-add from a .Xsession or
related script. The system is shipped with/usr/lib/ssh/ssh-askpass which is the
default value for SSH_ASKPASS.
SSH_AUTH_SOCK Identifies the path of a unix-domain socket
used to communicate with the agent. EXIT STATUS The following exit values are returned: 0 Successful completion. 1 An error occurred. FILES These files should not be readable by anyone but the user.Notice that ssh-add ignores a file if it is accessible by
others. It is possible to specify a passphrase when generat-
ing the key; that passphrase is used to encrypt the private part of this file. If these files are stored on a network file system it is assumed that either the protection provided in the file themselves or the transport layer of the network file system provides sufficient protection for the site policy. If this is not the case, then it is recommended the key files are stored on removable media or locally on the relevant hosts. Recommended names for the DSA and RSA key files:$HOME/.ssh/identity Contains the RSA authentication
identity of the user for proto-
col version 1.SunOS 5.11 Last change: 20 May 2009 2
User Commands ssh-add(1)
$HOME/.ssh/identity.pub Contains the public part of the
RSA authentication identity of the user for protocol version 1.$HOME/.ssh/id_dsa Contains the private DSA authen-
tication identity of the user.$HOME/.ssh/id_dsa.pub Contains the public part of the
DSA authentication identity of the user.$HOME/.ssh/id_rsa Contains the private RSA authen-
tication identity of the user.$HOME/.ssh/id_rsa.pub Contains the public part of the
RSA authentication identity of the user./usr/lib/ssh/ssh-askpass Contains the default value for
SSH_ASKPASS.
ATTRIBUTES
See attributes(5) for descriptions of the following attri-
butes:____________________________________________________________
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|_____________________________|_____________________________|
| Availability | network/ssh ||_____________________________|_____________________________|
| Interface Stability | Committed ||_____________________________|_____________________________|
SEE ALSO
ssh(1), ssh-agent(1), ssh-keygen(1), sshd(1M), attributes(5)
SunOS 5.11 Last change: 20 May 2009 3