]> andersk Git - openssh.git/blame - ssh-agent.1
- Merged OpenBSD CVS changes
[openssh.git] / ssh-agent.1
CommitLineData
f095fcc7 1.\" $OpenBSD: ssh-agent.1,v 1.8 1999/11/16 23:59:21 deraadt Exp $
bf740959 2.\"
3.\" -*- nroff -*-
4.\"
5.\" ssh-agent.1
6.\"
7.\" Author: Tatu Ylonen <ylo@cs.hut.fi>
f095fcc7 8.\"
bf740959 9.\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
10.\" All rights reserved
11.\"
12.\" Created: Sat Apr 23 20:10:43 1995 ylo
13.\"
14.Dd September 25, 1999
15.Dt SSH-AGENT 1
16.Os
17.Sh NAME
18.Nm ssh-agent
19.Nd authentication agent
20.Sh SYNOPSIS
21.Nm ssh-agent
22.Op Fl c Li | Fl s
23.Op Fl k
24.Oo
25.Ar command
26.Op Ar args ...
27.Oc
28.Sh DESCRIPTION
29.Nm
30is a program to hold authentication private keys. The
31idea is that
32.Nm
33is started in the beginning of an X-session or a login session, and
34all other windows or programs are started as clients to the ssh-agent
35program. Through use of environment variables the agent can be located
36and automatically used for RSA authentication when logging in to other
37machines using
38.Xr ssh 1 .
39.Pp
40The options are as follows:
41.Bl -tag -width Ds
42.It Fl c
43Generate C-shell commands on
44.Dv stdout .
45This is the default if
46.Ev SHELL
47looks like it's a csh style of shell.
48.It Fl s
49Generate Bourne shell commands on
50.Dv stdout .
51This is the default if
52.Ev SHELL
53does not look like it's a csh style of shell.
54.It Fl k
55Kill the current agent (given by the
56.Ev SSH_AGENT_PID
57environment variable).
58.El
59.Pp
60If a commandline is given, this is executed as a subprocess of the agent.
61When the command dies, so does the agent.
62.Pp
63The agent initially does not have any private keys. Keys are added
64using
65.Xr ssh-add 1 .
66When executed without arguments,
67.Xr ssh-add 1
68adds the
69.Pa $HOME/.ssh/identity
70file. If the identity has a passphrase,
71.Xr ssh-add 1
72asks for the passphrase (using a small X11 application if running
73under X11, or from the terminal if running without X). It then sends
74the identity to the agent. Several identities can be stored in the
75agent; the agent can automatically use any of these identities.
76.Ic ssh-add -l
77displays the identities currently held by the agent.
78.Pp
79The idea is that the agent is run in the user's local PC, laptop, or
80terminal. Authentication data need not be stored on any other
81machine, and authentication passphrases never go over the network.
82However, the connection to the agent is forwarded over SSH
83remote logins, and the user can thus use the privileges given by the
84identities anywhere in the network in a secure way.
85.Pp
86There are two main ways to get an agent setup: Either you let the agent
87start a new subcommand into which some environment variables are exported, or
88you let the agent print the needed shell commands (either
89.Xr sh 1
90or
91.Xr csh 1
92syntax can be generated) which can be evalled in the calling shell.
93Later
94.Xr ssh 1
95look at these variables and use them to establish a connection to the agent.
96.Pp
97A unix-domain socket is created
98.Pq Pa /tmp/ssh-XXXXXXXX/agent.<pid> ,
99and the name of this socket is stored in the
100.Ev SSH_AUTH_SOCK
101environment
102variable. The socket is made accessible only to the current user.
103This method is easily abused by root or another instance of the same
104user.
105.Pp
106The
107.Ev SSH_AGENT_PID
108environment variable holds the agent's PID.
109.Pp
110The agent exits automatically when the command given on the command
111line terminates.
e1a9c08d 112.Pp
113Here's a trick that will allow you to start this up from your .bash_profile (just put it in as the first thing that happens):
114.Sp
115.Vb 1
116
117\& [ ! "$SSH_AGENT_PID" ] && exec ssh-agent -- bash --login
118\& ssh-add
119.Ve
bf740959 120.Sh FILES
121.Bl -tag -width Ds
122.It Pa $HOME/.ssh/identity
123Contains the RSA authentication identity of the user. This file
124should not be readable by anyone but the user. It is possible to
125specify a passphrase when generating the key; that passphrase will be
126used to encrypt the private part of this file. This file
127is not used by
128.Nm
129but is normally added to the agent using
130.Xr ssh-add 1
131at login time.
132.It Pa /tmp/ssh-XXXX/agent.<pid> ,
133Unix-domain sockets used to contain the connection to the
134authentication agent. These sockets should only be readable by the
135owner. The sockets should get automatically removed when the agent
136exits.
137.Sh AUTHOR
138Tatu Ylonen <ylo@cs.hut.fi>
139.Pp
140OpenSSH
141is a derivative of the original (free) ssh 1.2.12 release, but with bugs
142removed and newer features re-added. Rapidly after the 1.2.12 release,
143newer versions bore successively more restrictive licenses. This version
144of OpenSSH
145.Bl -bullet
146.It
147has all components of a restrictive nature (ie. patents, see
148.Xr ssl 8 )
149directly removed from the source code; any licensed or patented components
150are chosen from
151external libraries.
152.It
153has been updated to support ssh protocol 1.5.
154.It
155contains added support for
156.Xr kerberos 8
157authentication and ticket passing.
158.It
159supports one-time password authentication with
160.Xr skey 1 .
161.El
162.Pp
163The libraries described in
164.Xr ssl 8
165are required for proper operation.
166.Sh SEE ALSO
167.Xr ssh 1 ,
168.Xr ssh-add 1 ,
169.Xr ssh-keygen 1 ,
170.Xr sshd 8 ,
171.Xr ssl 8
This page took 0.317476 seconds and 5 git commands to generate.