1 .\" $OpenBSD: ssh-agent.1,v 1.81 2024/11/06 22:51:26 djm Exp $
3 .\" Author: Tatu Ylonen <ylo@cs.hut.fi>
4 .\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
5 .\" All rights reserved
7 .\" As far as I am concerned, the code I have written for this software
8 .\" can be used freely for any purpose. Any derived versions of this
9 .\" software must be clearly marked as such, and if the derived work is
10 .\" incompatible with the protocol description in the RFC file, it must be
11 .\" called by a name other than "ssh" or "Secure Shell".
13 .\" Copyright (c) 1999,2000 Markus Friedl. All rights reserved.
14 .\" Copyright (c) 1999 Aaron Campbell. All rights reserved.
15 .\" Copyright (c) 1999 Theo de Raadt. All rights reserved.
17 .\" Redistribution and use in source and binary forms, with or without
18 .\" modification, are permitted provided that the following conditions
20 .\" 1. Redistributions of source code must retain the above copyright
21 .\" notice, this list of conditions and the following disclaimer.
22 .\" 2. Redistributions in binary form must reproduce the above copyright
23 .\" notice, this list of conditions and the following disclaimer in the
24 .\" documentation and/or other materials provided with the distribution.
26 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
27 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
28 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
29 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
30 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
31 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
35 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 .Dd $Mdocdate: November 6 2024 $
42 .Nd OpenSSH authentication agent
47 .Op Fl a Ar bind_address
48 .Op Fl E Ar fingerprint_hash
50 .Op Fl P Ar allowed_providers
53 .Op Fl a Ar bind_address
54 .Op Fl E Ar fingerprint_hash
56 .Op Fl P Ar allowed_providers
58 .Ar command Op Ar arg ...
64 is a program to hold private keys used for public key authentication.
65 Through use of environment variables the agent can be located
66 and automatically used for authentication when logging in to other
70 The options are as follows:
72 .It Fl a Ar bind_address
78 .Pa $TMPDIR/ssh-XXXXXXXXXX/agent.\*(Ltppid\*(Gt .
80 Generate C-shell commands on
82 This is the default if
84 looks like it's a csh style of shell.
87 When this option is specified,
92 When this option is specified,
94 will not fork and will write debug information to standard error.
95 .It Fl E Ar fingerprint_hash
96 Specifies the hash algorithm used when displaying key fingerprints.
104 Kill the current agent (given by the
106 environment variable).
108 Specify an option when starting
110 The supported options are:
111 .Cm allow-remote-pkcs11 ,
112 .Cm no-restrict-websafe
117 .Cm allow-remote-pkcs11
118 option allows clients of a forwarded
120 to load PKCS#11 or FIDO provider libraries.
121 By default only local clients may perform this operation.
122 Note that signalling that an
124 client is remote is performed by
126 and use of other tools to forward access to the agent socket may circumvent
130 .Cm no-restrict-websafe
133 to permit signatures using FIDO keys that might be web authentication
137 refuses signature requests for FIDO keys where the key application string
140 and when the data to be signed does not appear to be a
142 user authentication request or a
145 The default behaviour prevents forwarded access to a FIDO key from also
146 implicitly forwarding the ability to authenticate to websites.
150 option allows specifying a pattern-list of key application strings to
151 replace the default application allow-list, for example:
152 .Dq websafe-allow=ssh:*,example.org,*.example.com
156 for a description of pattern-list syntax.
157 .It Fl P Ar allowed_providers
158 Specify a pattern-list of acceptable paths for PKCS#11 provider and FIDO
159 authenticator middleware shared libraries that may be used with the
165 Libraries that do not match the pattern list will be refused.
167 .Dq usr/lib*/*,/usr/local/lib*/* .
171 for a description of pattern-list syntax.
173 Generate Bourne shell commands on
175 This is the default if
177 does not look like it's a csh style of shell.
179 Set a default value for the maximum lifetime of identities added to the agent.
180 The lifetime may be specified in seconds or in a time format specified in
182 A lifetime specified for an identity with
184 overrides this value.
185 Without this option the default maximum lifetime is forever.
186 .It Ar command Op Ar arg ...
187 If a command (and optional arguments) is given,
188 this is executed as a subprocess of the agent.
189 The agent exits automatically when the command given on the command
193 There are three main ways to get an agent set up.
194 The first is at the start of an X session,
195 where all other windows or programs are started as children of the
198 The agent starts a command under which its environment
199 variables are exported, for example
200 .Cm ssh-agent xterm & .
201 When the command terminates, so does the agent.
203 The second method is used for a login session.
207 it prints the shell commands required to set its environment variables,
208 which in turn can be evaluated in the calling shell, for example
209 .Cm eval `ssh-agent -s` .
211 In both of these cases,
213 looks at these environment variables
214 and uses them to establish a connection to the agent.
218 is via socket activation from a supervising process, such as systemd.
219 In this mode, the supervising process creates the listening socket and
220 is responsible for starting
222 as needed, and also for communicating the location of the socket listener
223 to other programs in the user's session.
224 Socket activation is used when
226 is started with either of the
230 flags, no socket listening address specified by the
236 environment variables correctly supplied by the supervising process.
238 The agent initially does not have any private keys.
247 Multiple identities may be stored in
251 will automatically use them if present.
253 is also used to remove keys from
255 and to query the keys that are held in one.
259 may be forwarded from further remote hosts using the
263 (but see the caveats documented therein),
264 avoiding the need for authentication data to be stored on other machines.
265 Authentication passphrases and private keys never go over the network:
266 the connection to the agent is forwarded over SSH remote connections
267 and the result is returned to the requester,
268 allowing the user access to their identities anywhere in the network
272 will delete all keys it has loaded upon receiving
275 .Bl -tag -width "SSH_AGENT_PID"
279 starts, it stores the name of the agent's process ID (PID) in this variable.
285 socket and stores its pathname in this variable.
286 It is accessible only to the current user,
287 but is easily abused by root or another instance of the same user.
291 .It Pa $TMPDIR/ssh-XXXXXXXXXX/agent.<ppid>
293 sockets used to contain the connection to the authentication agent.
294 These sockets should only be readable by the owner.
295 The sockets should get automatically removed when the agent exits.
305 OpenSSH is a derivative of the original and free ssh 1.2.12 release by
307 .An Aaron Campbell , Bob Beck , Markus Friedl , Niels Provos , Theo de Raadt
310 removed many bugs, re-added newer features and created OpenSSH.
312 contributed the support for SSH protocol versions 1.5 and 2.0.