6440 ssh packages should be replaceable
[unleashed.git] / usr / src / man / man1 / ssh-agent.sunssh.1
blobcabafb3e5956ca254a156fc67a77776d442d4bd9
1 '\" te
2 .\" To view license terms, attribution, and copyright for OpenSSH, the default path is /var/sadm/pkg/SUNWsshdr/install/copyright. If the Solaris operating environment has been installed anywhere other than the default, modify the given path to access the file at the
3 .\" installed location.
4 .\" Portions Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved.
5 .TH SSH-AGENT 1 "Aug 17, 2009"
6 .SH NAME
7 ssh-agent \- authentication agent
8 .SH SYNOPSIS
9 .LP
10 .nf
11 \fBssh-agent\fR [\fB-a\fR \fIbind_address\fR] [\fB-c\fR | \fB-s\fR ] [\fB-d\fR]
12      [-t \fIlife\fR] [\fIcommand\fR [\fIargs\fR]...]
13 .fi
15 .LP
16 .nf
17 \fBssh-agent\fR [\fB-c\fR | \fB-s\fR] \fB-k\fR
18 .fi
20 .SH DESCRIPTION
21 .LP
22 \fBssh-agent\fR is a program to hold private keys used for public key
23 authentication (\fBRSA\fR, \fBDSA\fR). \fBssh-agent\fR is often started at the
24 beginning of a login session. All other windows or programs are started as
25 clients to the \fBssh-agent\fR program. Through use of environment variables,
26 the agent can be located and automatically used for authentication when logging
27 in to other machines using \fBssh\fR(1). See the \fISystem Administration
28 Guide: Security Services\fR.
29 .sp
30 .LP
31 If a command line is given, this is executed as a subprocess of the agent. When
32 the command dies, so does the agent.
33 .sp
34 .LP
35 The agent initially does not have any private keys. Keys are added using
36 \fBssh-add\fR(1), which sends the identity to the agent. Several identities can
37 be stored in the agent; the agent can automatically use any of these
38 identities. Use the \fB-l\fR option in \fBssh-add\fR(1) to display the
39 identities currently held by the agent.
40 .sp
41 .LP
42 The agent is run in the user's local host. Authentication data need not be
43 stored on any other machine, and authentication passphrases never go over the
44 network. However, if the connection to the agent is forwarded over \fBSSH\fR
45 remote logins, the user can use the privileges given by the identities anywhere
46 in the network in a secure way.
47 .sp
48 .LP
49 There are two main ways to get an agent setup. Either you let the agent start a
50 new subcommand into which some environment variables are exported, or you let
51 the agent print the needed shell commands (either \fBsh\fR(1) or \fBcsh\fR(1)
52 syntax can be generated) which can be evalled in the calling shell. Later, use
53 \fBssh\fR(1) to look at these variables and use them to establish a connection
54 to the agent.
55 .sp
56 .LP
57 A unix-domain socket is created (\fB/tmp/ssh-XXXXXXXX/agent.\fIpid\fR\fR) and
58 the name of this socket is stored in the \fBSSH_AUTH_SOCK\fR environment
59 variable. The socket is made accessible only to the current user. This method
60 is easily abused by root or another instance of the same user.
61 .sp
62 .LP
63 The \fBSSH_AGENT_PID\fR environment variable holds the agent's \fBPID\fR.
64 .sp
65 .LP
66 The agent exits automatically when the command given on the command line
67 terminates.
68 .SH OPTIONS
69 .LP
70 The following options are supported:
71 .sp
72 .ne 2
73 .na
74 \fB\fB-a\fR \fIbind_address\fR\fR
75 .ad
76 .RS 19n
77 Binds the agent to the unix-domain socket bind_address. The default is
78 \fB/tmp/ssh-XXXXXXXX/agent.\fIpid\fR\fR.
79 .RE
81 .sp
82 .ne 2
83 .na
84 \fB\fB-c\fR\fR
85 .ad
86 .RS 19n
87 Generates C-shell commands on stdout. This is the default if \fBSHELL\fR
88 indicates that it is a csh style of shell.
89 .RE
91 .sp
92 .ne 2
93 .na
94 \fB\fB-d\fR\fR
95 .ad
96 .RS 19n
97 Debug mode. When this option is specified, \fBssh-agent\fR does not fork.
98 .RE
101 .ne 2
103 \fB\fB-k\fR\fR
105 .RS 19n
106 Kills the current agent (given by the \fBSSH_AGENT_PID\fR environment
107 variable).
111 .ne 2
113 \fB\fB-s\fR\fR
115 .RS 19n
116 Generates Bourne shell commands on stdout. This is the default if \fBSHELL\fR
117 does not indicate that it is a csh style of shell.
121 .ne 2
123 \fB\fB-t\fR \fIlife\fR\fR
125 .RS 19n
126 Set a default value for the maximum lifetime (\fIlife\fR) of identities added
127 to the agent. \fIlife\fR can be specified in seconds or in a time format
128 specified in \fBsshd_config\fR(4). \fIlife\fR specified for an identity with
129 \fBssh-add\fR(1) overrides this value. Without this option the default maximum
130 \fIlife\fR is forever.
133 .SH EXIT STATUS
135 The following exit values are returned:
137 .ne 2
139 \fB\fB0\fR\fR
141 .RS 5n
142 Successful completion.
146 .ne 2
148 \fB\fB1\fR\fR
150 .RS 5n
151 An error occurred.
154 .SH FILES
155 .ne 2
157 \fB\fB/tmp/ssh-XXXXXXXX/agent.\fIpid\fR\fR\fR
159 .sp .6
160 .RS 4n
161 Unix-domain sockets used to contain the connection to the authentication agent.
162 These sockets should only be readable by the owner. The sockets are removed
163 when the agent exits.
166 .SH ATTRIBUTES
168 See \fBattributes\fR(5) for descriptions of the following attributes:
173 box;
174 c | c
175 l | l .
176 ATTRIBUTE TYPE  ATTRIBUTE VALUE
178 Interface Stability     Committed
181 .SH SEE ALSO
183 \fBssh\fR(1), \fBssh-add\fR(1), \fBssh-keygen\fR(1), \fBsshd\fR(1M),
184 \fBsshd_config\fR(4), \fBattributes\fR(5)
187 \fISystem Administration Guide: Security Services\fR