xref: /freebsd/crypto/openssh/ssh-agent.1 (revision 511b41d2a18c00a5f0db1a67a87ef8d831b19f2a)
1511b41d2SMark Murray.\" $OpenBSD: ssh-agent.1,v 1.9 2000/01/22 02:17:50 aaron Exp $
2511b41d2SMark Murray.\"
3511b41d2SMark Murray.\"  -*- nroff -*-
4511b41d2SMark Murray.\"
5511b41d2SMark Murray.\" ssh-agent.1
6511b41d2SMark Murray.\"
7511b41d2SMark Murray.\" Author: Tatu Ylonen <ylo@cs.hut.fi>
8511b41d2SMark Murray.\"
9511b41d2SMark Murray.\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
10511b41d2SMark Murray.\"                    All rights reserved
11511b41d2SMark Murray.\"
12511b41d2SMark Murray.\" Created: Sat Apr 23 20:10:43 1995 ylo
13511b41d2SMark Murray.\"
14511b41d2SMark Murray.Dd September 25, 1999
15511b41d2SMark Murray.Dt SSH-AGENT 1
16511b41d2SMark Murray.Os
17511b41d2SMark Murray.Sh NAME
18511b41d2SMark Murray.Nm ssh-agent
19511b41d2SMark Murray.Nd authentication agent
20511b41d2SMark Murray.Sh SYNOPSIS
21511b41d2SMark Murray.Nm ssh-agent
22511b41d2SMark Murray.Op Fl c Li | Fl s
23511b41d2SMark Murray.Op Fl k
24511b41d2SMark Murray.Oo
25511b41d2SMark Murray.Ar command
26511b41d2SMark Murray.Op Ar args ...
27511b41d2SMark Murray.Oc
28511b41d2SMark Murray.Sh DESCRIPTION
29511b41d2SMark Murray.Nm
30511b41d2SMark Murrayis a program to hold authentication private keys.  The
31511b41d2SMark Murrayidea is that
32511b41d2SMark Murray.Nm
33511b41d2SMark Murrayis started in the beginning of an X-session or a login session, and
34511b41d2SMark Murrayall other windows or programs are started as clients to the ssh-agent
35511b41d2SMark Murrayprogram.  Through use of environment variables the agent can be located
36511b41d2SMark Murrayand automatically used for RSA authentication when logging in to other
37511b41d2SMark Murraymachines using
38511b41d2SMark Murray.Xr ssh 1 .
39511b41d2SMark Murray.Pp
40511b41d2SMark MurrayThe options are as follows:
41511b41d2SMark Murray.Bl -tag -width Ds
42511b41d2SMark Murray.It Fl c
43511b41d2SMark MurrayGenerate C-shell commands on
44511b41d2SMark Murray.Dv stdout .
45511b41d2SMark MurrayThis is the default if
46511b41d2SMark Murray.Ev SHELL
47511b41d2SMark Murraylooks like it's a csh style of shell.
48511b41d2SMark Murray.It Fl s
49511b41d2SMark MurrayGenerate Bourne shell commands on
50511b41d2SMark Murray.Dv stdout .
51511b41d2SMark MurrayThis is the default if
52511b41d2SMark Murray.Ev SHELL
53511b41d2SMark Murraydoes not look like it's a csh style of shell.
54511b41d2SMark Murray.It Fl k
55511b41d2SMark MurrayKill the current agent (given by the
56511b41d2SMark Murray.Ev SSH_AGENT_PID
57511b41d2SMark Murrayenvironment variable).
58511b41d2SMark Murray.El
59511b41d2SMark Murray.Pp
60511b41d2SMark MurrayIf a commandline is given, this is executed as a subprocess of the agent.
61511b41d2SMark MurrayWhen the command dies, so does the agent.
62511b41d2SMark Murray.Pp
63511b41d2SMark MurrayThe agent initially does not have any private keys.  Keys are added
64511b41d2SMark Murrayusing
65511b41d2SMark Murray.Xr ssh-add 1 .
66511b41d2SMark MurrayWhen executed without arguments,
67511b41d2SMark Murray.Xr ssh-add 1
68511b41d2SMark Murrayadds the
69511b41d2SMark Murray.Pa $HOME/.ssh/identity
70511b41d2SMark Murrayfile.  If the identity has a passphrase,
71511b41d2SMark Murray.Xr ssh-add 1
72511b41d2SMark Murrayasks for the passphrase (using a small X11 application if running
73511b41d2SMark Murrayunder X11, or from the terminal if running without X).  It then sends
74511b41d2SMark Murraythe identity to the agent.  Several identities can be stored in the
75511b41d2SMark Murrayagent; the agent can automatically use any of these identities.
76511b41d2SMark Murray.Ic ssh-add -l
77511b41d2SMark Murraydisplays the identities currently held by the agent.
78511b41d2SMark Murray.Pp
79511b41d2SMark MurrayThe idea is that the agent is run in the user's local PC, laptop, or
80511b41d2SMark Murrayterminal.  Authentication data need not be stored on any other
81511b41d2SMark Murraymachine, and authentication passphrases never go over the network.
82511b41d2SMark MurrayHowever, the connection to the agent is forwarded over SSH
83511b41d2SMark Murrayremote logins, and the user can thus use the privileges given by the
84511b41d2SMark Murrayidentities anywhere in the network in a secure way.
85511b41d2SMark Murray.Pp
86511b41d2SMark MurrayThere are two main ways to get an agent setup:  Either you let the agent
87511b41d2SMark Murraystart a new subcommand into which some environment variables are exported, or
88511b41d2SMark Murrayyou let the agent print the needed shell commands (either
89511b41d2SMark Murray.Xr sh 1
90511b41d2SMark Murrayor
91511b41d2SMark Murray.Xr csh 1
92511b41d2SMark Murraysyntax can be generated) which can be evalled in the calling shell.
93511b41d2SMark MurrayLater
94511b41d2SMark Murray.Xr ssh 1
95511b41d2SMark Murraylook at these variables and use them to establish a connection to the agent.
96511b41d2SMark Murray.Pp
97511b41d2SMark MurrayA unix-domain socket is created
98511b41d2SMark Murray.Pq Pa /tmp/ssh-XXXXXXXX/agent.<pid> ,
99511b41d2SMark Murrayand the name of this socket is stored in the
100511b41d2SMark Murray.Ev SSH_AUTH_SOCK
101511b41d2SMark Murrayenvironment
102511b41d2SMark Murrayvariable.  The socket is made accessible only to the current user.
103511b41d2SMark MurrayThis method is easily abused by root or another instance of the same
104511b41d2SMark Murrayuser.
105511b41d2SMark Murray.Pp
106511b41d2SMark MurrayThe
107511b41d2SMark Murray.Ev SSH_AGENT_PID
108511b41d2SMark Murrayenvironment variable holds the agent's PID.
109511b41d2SMark Murray.Pp
110511b41d2SMark MurrayThe agent exits automatically when the command given on the command
111511b41d2SMark Murrayline terminates.
112511b41d2SMark Murray.Sh FILES
113511b41d2SMark Murray.Bl -tag -width Ds
114511b41d2SMark Murray.It Pa $HOME/.ssh/identity
115511b41d2SMark MurrayContains the RSA authentication identity of the user.  This file
116511b41d2SMark Murrayshould not be readable by anyone but the user.  It is possible to
117511b41d2SMark Murrayspecify a passphrase when generating the key; that passphrase will be
118511b41d2SMark Murrayused to encrypt the private part of this file.  This file
119511b41d2SMark Murrayis not used by
120511b41d2SMark Murray.Nm
121511b41d2SMark Murraybut is normally added to the agent using
122511b41d2SMark Murray.Xr ssh-add 1
123511b41d2SMark Murrayat login time.
124511b41d2SMark Murray.It Pa /tmp/ssh-XXXX/agent.<pid> ,
125511b41d2SMark MurrayUnix-domain sockets used to contain the connection to the
126511b41d2SMark Murrayauthentication agent.  These sockets should only be readable by the
127511b41d2SMark Murrayowner.  The sockets should get automatically removed when the agent
128511b41d2SMark Murrayexits.
129511b41d2SMark Murray.Sh AUTHOR
130511b41d2SMark MurrayTatu Ylonen <ylo@cs.hut.fi>
131511b41d2SMark Murray.Pp
132511b41d2SMark MurrayOpenSSH
133511b41d2SMark Murrayis a derivative of the original (free) ssh 1.2.12 release, but with bugs
134511b41d2SMark Murrayremoved and newer features re-added.   Rapidly after the 1.2.12 release,
135511b41d2SMark Murraynewer versions bore successively more restrictive licenses.  This version
136511b41d2SMark Murrayof OpenSSH
137511b41d2SMark Murray.Bl -bullet
138511b41d2SMark Murray.It
139511b41d2SMark Murrayhas all components of a restrictive nature (i.e., patents, see
140511b41d2SMark Murray.Xr ssl 8 )
141511b41d2SMark Murraydirectly removed from the source code; any licensed or patented components
142511b41d2SMark Murrayare chosen from
143511b41d2SMark Murrayexternal libraries.
144511b41d2SMark Murray.It
145511b41d2SMark Murrayhas been updated to support ssh protocol 1.5.
146511b41d2SMark Murray.It
147511b41d2SMark Murraycontains added support for
148511b41d2SMark Murray.Xr kerberos 8
149511b41d2SMark Murrayauthentication and ticket passing.
150511b41d2SMark Murray.It
151511b41d2SMark Murraysupports one-time password authentication with
152511b41d2SMark Murray.Xr skey 1 .
153511b41d2SMark Murray.El
154511b41d2SMark Murray.Pp
155511b41d2SMark MurrayThe libraries described in
156511b41d2SMark Murray.Xr ssl 8
157511b41d2SMark Murrayare required for proper operation.
158511b41d2SMark Murray.Sh SEE ALSO
159511b41d2SMark Murray.Xr ssh 1 ,
160511b41d2SMark Murray.Xr ssh-add 1 ,
161511b41d2SMark Murray.Xr ssh-keygen 1 ,
162511b41d2SMark Murray.Xr sshd 8 ,
163511b41d2SMark Murray.Xr ssl 8
164