Blob


1 .TH SSH-AGENT 1
2 .SH NAME
3 ssh-agent \- SSH authentication agent
4 .SH SYNOPSIS
5 .B ssh-agent
6 [
7 .B -l
8 ]
9 .I factotum-service
10 .SH DESCRIPTION
11 .I Ssh-agent
12 presents
13 .IR factotum (4)
14 using the interface that
15 .IR ssh (1)
16 requires.
17 .PP
18 Once
19 .I ssh-agent
20 and
21 .I factotum
22 are running, the standard Unix SSH client
23 can use
24 .I ssh-agent
25 (and, indirectly,
26 .IR factotum )
27 to authenticate to remote systems using RSA or DSA keys.
28 .PP
29 .I Ssh
30 accesses
31 .I ssh-agent
32 via a Unix socket posted in a private subdirectory of
33 .B /tmp .
34 .I Ssh
35 expects this socket to be in the environment as
36 .BR $SSH_AGENT_SOCK ,
37 and expects the agent to be running with process id
38 .BR $SSH_AGENT_PID .
39 .I Ssh-agent
40 prints shell commands to set these two variables
41 before forking itself into the background.
42 It is typically invoked inside a shell
43 .B eval
44 construct; see the examples below.
45 The
46 .B -e
47 option causes
48 .I ssh-agent
49 to include
50 .B export
51 commands to put the variables into the environment of future programs.
52 .PP
53 If the
54 .B -l
55 option is given,
56 .I ssh-agent
57 lists the usable
58 .I factotum
59 keys in the standard SSH format, suitable for creating an
60 .B authorized_keys
61 file.
62 .PP
63 .I Ssh-agent
64 connects to
65 .I factotum
66 by accessing
67 .I factotum-service
68 (default
69 .RB ` factotum ')
70 in the current name space.
71 .PP
72 There is a Unix program called
73 .I ssh-agent
74 that manages SSH keys itself.
75 Invoke this one with
76 .B 9
77 .BR ssh-agent ;
78 see
79 .IR 9 (1).
80 .SH EXAMPLES
81 Assume
82 .IR factotum (4)
83 is already running and initialized with keys.
84 .PP
85 Start a new agent, copying the commands by hand:
86 .IP
87 .EX
88 $ 9 ssh-agent -e
89 SSH_AUTH_SOCK=/tmp/ssh-405795003d7ee27a/agent.4233;
90 export SSH_AUTH_SOCK;
91 SSH_AGENT_PID=4233;
92 export SSH_AGENT_PID;
93 $ SSH_AUTH_SOCK=/tmp/ssh-405795003d7ee27a/agent.4233;
94 $ export SSH_AUTH_SOCK;
95 $ SSH_AGENT_PID=4233;
96 $ export SSH_AGENT_PID;
97 $
98 .EE
99 .PP
100 Start the agent from
101 .IR sh (1):
102 .IP
103 .EX
104 $ eval `9 ssh-agent -e`
106 .EE
107 .PP
108 Start the agent from
109 .IR rc (1):
110 .IP
111 .EX
112 % eval `{9 ssh-agent}
114 .EE
115 .PP
116 Use the agent to connect to a remote system:
117 .IP
118 .EX
119 % ssh tux
120 tux% ^D
122 .EE
123 .SH SOURCE
124 .B \*9/src/cmd/auth/ssh-agent.c
125 .SH SEE ALSO
126 .IR ssh (1),
127 .IR rsa (1),
128 .IR factotum (4)
129 .SH BUGS
130 A surprise rather than a bug:
131 .I ssh-agent
132 connects to factotum on demand, so it can be
133 started before
134 .I factotum
135 is running and need not be restarted just because
136 .I factotum
137 is.