xref: /freebsd/crypto/openssh/ssh-agent.1 (revision b66f2d16a0435b7e7f3edde6101797004ae8d3b9)
1b66f2d16SKris Kennaway.\" $OpenBSD: ssh-agent.1,v 1.16 2000/09/07 20:27:54 deraadt Exp $
2511b41d2SMark Murray.\"
3511b41d2SMark Murray.\" Author: Tatu Ylonen <ylo@cs.hut.fi>
4511b41d2SMark Murray.\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
5511b41d2SMark Murray.\"                    All rights reserved
6511b41d2SMark Murray.\"
7b66f2d16SKris Kennaway.\" As far as I am concerned, the code I have written for this software
8b66f2d16SKris Kennaway.\" can be used freely for any purpose.  Any derived versions of this
9b66f2d16SKris Kennaway.\" software must be clearly marked as such, and if the derived work is
10b66f2d16SKris Kennaway.\" incompatible with the protocol description in the RFC file, it must be
11b66f2d16SKris Kennaway.\" called by a name other than "ssh" or "Secure Shell".
12b66f2d16SKris Kennaway.\"
13b66f2d16SKris Kennaway.\" Copyright (c) 1999,2000 Markus Friedl. All rights reserved.
14b66f2d16SKris Kennaway.\" Copyright (c) 1999 Aaron Campbell. All rights reserved.
15b66f2d16SKris Kennaway.\" Copyright (c) 1999 Theo de Raadt. All rights reserved.
16b66f2d16SKris Kennaway.\"
17b66f2d16SKris Kennaway.\" Redistribution and use in source and binary forms, with or without
18b66f2d16SKris Kennaway.\" modification, are permitted provided that the following conditions
19b66f2d16SKris Kennaway.\" are met:
20b66f2d16SKris Kennaway.\" 1. Redistributions of source code must retain the above copyright
21b66f2d16SKris Kennaway.\"    notice, this list of conditions and the following disclaimer.
22b66f2d16SKris Kennaway.\" 2. Redistributions in binary form must reproduce the above copyright
23b66f2d16SKris Kennaway.\"    notice, this list of conditions and the following disclaimer in the
24b66f2d16SKris Kennaway.\"    documentation and/or other materials provided with the distribution.
25b66f2d16SKris Kennaway.\"
26b66f2d16SKris Kennaway.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
27b66f2d16SKris Kennaway.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
28b66f2d16SKris Kennaway.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
29b66f2d16SKris Kennaway.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
30b66f2d16SKris Kennaway.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
31b66f2d16SKris Kennaway.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32b66f2d16SKris Kennaway.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33b66f2d16SKris Kennaway.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34b66f2d16SKris Kennaway.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
35b66f2d16SKris Kennaway.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36511b41d2SMark Murray.\"
37511b41d2SMark Murray.Dd September 25, 1999
38511b41d2SMark Murray.Dt SSH-AGENT 1
39511b41d2SMark Murray.Os
40511b41d2SMark Murray.Sh NAME
41511b41d2SMark Murray.Nm ssh-agent
42511b41d2SMark Murray.Nd authentication agent
43511b41d2SMark Murray.Sh SYNOPSIS
44511b41d2SMark Murray.Nm ssh-agent
45511b41d2SMark Murray.Op Fl c Li | Fl s
46511b41d2SMark Murray.Op Fl k
47511b41d2SMark Murray.Oo
48511b41d2SMark Murray.Ar command
49511b41d2SMark Murray.Op Ar args ...
50511b41d2SMark Murray.Oc
51511b41d2SMark Murray.Sh DESCRIPTION
52511b41d2SMark Murray.Nm
53b66f2d16SKris Kennawayis a program to hold private keys used for public key authentication
54b66f2d16SKris Kennaway(RSA, DSA).
55a8f6863aSKris KennawayThe idea is that
56511b41d2SMark Murray.Nm
57511b41d2SMark Murrayis started in the beginning of an X-session or a login session, and
58511b41d2SMark Murrayall other windows or programs are started as clients to the ssh-agent
59a8f6863aSKris Kennawayprogram.
60a8f6863aSKris KennawayThrough use of environment variables the agent can be located
61b66f2d16SKris Kennawayand automatically used for authentication when logging in to other
62511b41d2SMark Murraymachines using
63511b41d2SMark Murray.Xr ssh 1 .
64511b41d2SMark Murray.Pp
65511b41d2SMark MurrayThe options are as follows:
66511b41d2SMark Murray.Bl -tag -width Ds
67511b41d2SMark Murray.It Fl c
68511b41d2SMark MurrayGenerate C-shell commands on
69511b41d2SMark Murray.Dv stdout .
70511b41d2SMark MurrayThis is the default if
71511b41d2SMark Murray.Ev SHELL
72511b41d2SMark Murraylooks like it's a csh style of shell.
73511b41d2SMark Murray.It Fl s
74511b41d2SMark MurrayGenerate Bourne shell commands on
75511b41d2SMark Murray.Dv stdout .
76511b41d2SMark MurrayThis is the default if
77511b41d2SMark Murray.Ev SHELL
78511b41d2SMark Murraydoes not look like it's a csh style of shell.
79511b41d2SMark Murray.It Fl k
80511b41d2SMark MurrayKill the current agent (given by the
81511b41d2SMark Murray.Ev SSH_AGENT_PID
82511b41d2SMark Murrayenvironment variable).
83511b41d2SMark Murray.El
84511b41d2SMark Murray.Pp
85511b41d2SMark MurrayIf a commandline is given, this is executed as a subprocess of the agent.
86511b41d2SMark MurrayWhen the command dies, so does the agent.
87511b41d2SMark Murray.Pp
88a8f6863aSKris KennawayThe agent initially does not have any private keys.
89a8f6863aSKris KennawayKeys are added using
90511b41d2SMark Murray.Xr ssh-add 1 .
91511b41d2SMark MurrayWhen executed without arguments,
92511b41d2SMark Murray.Xr ssh-add 1
93511b41d2SMark Murrayadds the
94511b41d2SMark Murray.Pa $HOME/.ssh/identity
95a8f6863aSKris Kennawayfile.
96a8f6863aSKris KennawayIf the identity has a passphrase,
97511b41d2SMark Murray.Xr ssh-add 1
98511b41d2SMark Murrayasks for the passphrase (using a small X11 application if running
99a8f6863aSKris Kennawayunder X11, or from the terminal if running without X).
100a8f6863aSKris KennawayIt then sends the identity to the agent.
101a8f6863aSKris KennawaySeveral identities can be stored in the
102511b41d2SMark Murrayagent; the agent can automatically use any of these identities.
103511b41d2SMark Murray.Ic ssh-add -l
104511b41d2SMark Murraydisplays the identities currently held by the agent.
105511b41d2SMark Murray.Pp
106511b41d2SMark MurrayThe idea is that the agent is run in the user's local PC, laptop, or
107a8f6863aSKris Kennawayterminal.
108a8f6863aSKris KennawayAuthentication data need not be stored on any other
109511b41d2SMark Murraymachine, and authentication passphrases never go over the network.
110511b41d2SMark MurrayHowever, the connection to the agent is forwarded over SSH
111511b41d2SMark Murrayremote logins, and the user can thus use the privileges given by the
112511b41d2SMark Murrayidentities anywhere in the network in a secure way.
113511b41d2SMark Murray.Pp
114a8f6863aSKris KennawayThere are two main ways to get an agent setup:
115a8f6863aSKris KennawayEither you let the agent
116511b41d2SMark Murraystart a new subcommand into which some environment variables are exported, or
117511b41d2SMark Murrayyou let the agent print the needed shell commands (either
118511b41d2SMark Murray.Xr sh 1
119511b41d2SMark Murrayor
120511b41d2SMark Murray.Xr csh 1
121511b41d2SMark Murraysyntax can be generated) which can be evalled in the calling shell.
122511b41d2SMark MurrayLater
123511b41d2SMark Murray.Xr ssh 1
124511b41d2SMark Murraylook at these variables and use them to establish a connection to the agent.
125511b41d2SMark Murray.Pp
126511b41d2SMark MurrayA unix-domain socket is created
127511b41d2SMark Murray.Pq Pa /tmp/ssh-XXXXXXXX/agent.<pid> ,
128511b41d2SMark Murrayand the name of this socket is stored in the
129511b41d2SMark Murray.Ev SSH_AUTH_SOCK
130511b41d2SMark Murrayenvironment
131a8f6863aSKris Kennawayvariable.
132a8f6863aSKris KennawayThe socket is made accessible only to the current user.
133511b41d2SMark MurrayThis method is easily abused by root or another instance of the same
134511b41d2SMark Murrayuser.
135511b41d2SMark Murray.Pp
136511b41d2SMark MurrayThe
137511b41d2SMark Murray.Ev SSH_AGENT_PID
138511b41d2SMark Murrayenvironment variable holds the agent's PID.
139511b41d2SMark Murray.Pp
140511b41d2SMark MurrayThe agent exits automatically when the command given on the command
141511b41d2SMark Murrayline terminates.
142511b41d2SMark Murray.Sh FILES
143511b41d2SMark Murray.Bl -tag -width Ds
144511b41d2SMark Murray.It Pa $HOME/.ssh/identity
145a8f6863aSKris KennawayContains the RSA authentication identity of the user.
146a8f6863aSKris KennawayThis file should not be readable by anyone but the user.
147a8f6863aSKris KennawayIt is possible to
148511b41d2SMark Murrayspecify a passphrase when generating the key; that passphrase will be
149a8f6863aSKris Kennawayused to encrypt the private part of this file.
150a8f6863aSKris KennawayThis file is not used by
151511b41d2SMark Murray.Nm
152511b41d2SMark Murraybut is normally added to the agent using
153511b41d2SMark Murray.Xr ssh-add 1
154511b41d2SMark Murrayat login time.
155b66f2d16SKris Kennaway.It Pa $HOME/.ssh/id_dsa
156b66f2d16SKris KennawayContains the DSA authentication identity of the user.
157b66f2d16SKris Kennaway.Pq Pa /tmp/ssh-XXXXXXXX/agent.<pid> ,
158511b41d2SMark MurrayUnix-domain sockets used to contain the connection to the
159a8f6863aSKris Kennawayauthentication agent.
160a8f6863aSKris KennawayThese sockets should only be readable by the owner.
161a8f6863aSKris KennawayThe sockets should get automatically removed when the agent exits.
162b66f2d16SKris Kennaway.El
163511b41d2SMark Murray.Sh AUTHOR
164511b41d2SMark MurrayTatu Ylonen <ylo@cs.hut.fi>
165511b41d2SMark Murray.Pp
166511b41d2SMark MurrayOpenSSH
167511b41d2SMark Murrayis a derivative of the original (free) ssh 1.2.12 release, but with bugs
168a8f6863aSKris Kennawayremoved and newer features re-added.
169a8f6863aSKris KennawayRapidly after the 1.2.12 release,
170a8f6863aSKris Kennawaynewer versions bore successively more restrictive licenses.
171a8f6863aSKris KennawayThis version of OpenSSH
172511b41d2SMark Murray.Bl -bullet
173511b41d2SMark Murray.It
174511b41d2SMark Murrayhas all components of a restrictive nature (i.e., patents, see
175511b41d2SMark Murray.Xr ssl 8 )
176511b41d2SMark Murraydirectly removed from the source code; any licensed or patented components
177511b41d2SMark Murrayare chosen from
178511b41d2SMark Murrayexternal libraries.
179511b41d2SMark Murray.It
180511b41d2SMark Murrayhas been updated to support ssh protocol 1.5.
181511b41d2SMark Murray.It
182511b41d2SMark Murraycontains added support for
183511b41d2SMark Murray.Xr kerberos 8
184511b41d2SMark Murrayauthentication and ticket passing.
185511b41d2SMark Murray.It
186511b41d2SMark Murraysupports one-time password authentication with
187511b41d2SMark Murray.Xr skey 1 .
188511b41d2SMark Murray.El
189511b41d2SMark Murray.Sh SEE ALSO
190511b41d2SMark Murray.Xr ssh 1 ,
191511b41d2SMark Murray.Xr ssh-add 1 ,
192511b41d2SMark Murray.Xr ssh-keygen 1 ,
193511b41d2SMark Murray.Xr sshd 8 ,
194511b41d2SMark Murray.Xr ssl 8
195