1ssh-add(1)                       User Commands                      ssh-add(1)
2
3
4

NAME

6       ssh-add - add RSA or DSA identities to the authentication agent
7

SYNOPSIS

9       ssh-add [-lLdDxX] [-t life] [ file ]...
10
11

DESCRIPTION

13       The  ssh-add  utility  adds RSA or DSA identities to the authentication
14       agent, ssh-agent(1). When run without arguments, it attempts to add all
15       of  the files $HOME/.ssh/identity (RSA v1), $HOME/.ssh/id_rsa (RSA v2),
16       and $HOME/.ssh/id_dsa (DSA v2) that exist. If more than one of the pri‐
17       vate  keys  exists, an attempt to decrypt each with the same passphrase
18       is made before reprompting for a different passphrase.  The  passphrase
19       is  read  from  the  user's  tty  or  by running the program defined in
20       SSH_ASKPASS (see below).
21
22
23       The authentication agent must be running.
24

OPTIONS

26       The following options are supported:
27
28       -d         Instead of adding the  identity,  this  option  removes  the
29                  identity from the agent.
30
31
32       -D         Deletes all identities from the agent.
33
34
35       -l         Lists  fingerprints  of all identities currently represented
36                  by the agent.
37
38
39       -L         Lists public key parameters of all identities currently rep‐
40                  resented by the agent.
41
42
43       -t life    Sets  a maximum lifetime when adding identities to an agent.
44                  The lifetime can be specified in seconds or in a time format
45                  specified in sshd(1M).
46
47
48       -x         Locks the agent with a password.
49
50
51       -X         Unlocks the agent.
52
53

ENVIRONMENT VARIABLES

55       DISPLAY          If ssh-add needs a passphrase, it reads the passphrase
56       SSH_ASKPASS      from the current terminal if it was run from a  termi‐
57                        nal.  If  ssh-add  does not have a terminal associated
58                        with it but DISPLAY and SSH_ASKPASS are set,  it  exe‐
59                        cutes the program specified by SSH_ASKPASS and open an
60                        X11 window to read the passphrase.  This  is  particu‐
61                        larly  useful when calling ssh-add from a .Xsession or
62                        related   script.   The   system   is   shipped   with
63                        /usr/lib/ssh/ssh-askpass  which  is  the default value
64                        for SSH_ASKPASS.
65
66
67       SSH_AUTH_SOCK    Identifies the path of a unix-domain  socket  used  to
68                        communicate with the agent.
69
70

EXIT STATUS

72       The following exit values are returned:
73
74       0    Successful completion.
75
76
77       1    An error occurred.
78
79

FILES

81       These  files should not be readable by anyone but the user. Notice that
82       ssh-add ignores a file if it is accessible by others. It is possible to
83       specify  a  passphrase when generating the key; that passphrase is used
84       to encrypt the private part of this file.
85
86
87       If these files are stored on a network file system it is  assumed  that
88       either  the protection provided in the file themselves or the transport
89       layer of the network file system provides sufficient protection for the
90       site  policy.  If  this is not the case, then it is recommended the key
91       files are stored on removable media or locally on the relevant hosts.
92
93
94       Recommended names for the DSA and RSA key files:
95
96       $HOME/.ssh/identity         Contains the RSA authentication identity of
97                                   the user for protocol version 1.
98
99
100       $HOME/.ssh/identity.pub     Contains the public part of the RSA authen‐
101                                   tication identity of the user for  protocol
102                                   version 1.
103
104
105       $HOME/.ssh/id_dsa           Contains  the  private  DSA  authentication
106                                   identity of the user.
107
108
109       $HOME/.ssh/id_dsa.pub       Contains the public part of the DSA authen‐
110                                   tication identity of the user.
111
112
113       $HOME/.ssh/id_rsa           Contains  the  private  RSA  authentication
114                                   identity of the user.
115
116
117       $HOME/.ssh/id_rsa.pub       Contains the public part of the RSA authen‐
118                                   tication identity of the user.
119
120
121       /usr/lib/ssh/ssh-askpass    Contains the default value for SSH_ASKPASS.
122
123

ATTRIBUTES

125       See attributes(5) for descriptions of the following attributes:
126
127
128
129
130       ┌─────────────────────────────┬─────────────────────────────┐
131       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
132       ├─────────────────────────────┼─────────────────────────────┤
133       │Availability                 │SUNWsshu                     │
134       ├─────────────────────────────┼─────────────────────────────┤
135       │Interface Stability          │Committed                    │
136       └─────────────────────────────┴─────────────────────────────┘
137

SEE ALSO

139       ssh(1), ssh-agent(1), ssh-keygen(1), sshd(1M), attributes(5)
140
141
142
143SunOS 5.11                        20 May 2009                       ssh-add(1)
Impressum