diff options
author | Colin Watson <cjwatson@debian.org> | 2020-02-21 11:57:14 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2020-02-21 11:57:14 +0000 |
commit | f0de78bd4f29fa688c5df116f3f9cd43543a76d0 (patch) | |
tree | 856b0dee3f2764c13a32dad5ffe2424fab7fef41 /ssh-agent.1 | |
parent | 4213eec74e74de6310c27a40c3e9759a08a73996 (diff) | |
parent | 8aa3455b16fddea4c0144a7c4a1edb10ec67dcc8 (diff) |
Import openssh_8.2p1.orig.tar.gz
Diffstat (limited to 'ssh-agent.1')
-rw-r--r-- | ssh-agent.1 | 170 |
1 files changed, 83 insertions, 87 deletions
diff --git a/ssh-agent.1 b/ssh-agent.1 index 83b2b41c8..fff0db6bc 100644 --- a/ssh-agent.1 +++ b/ssh-agent.1 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: ssh-agent.1,v 1.64 2016/11/30 06:54:26 jmc Exp $ | 1 | .\" $OpenBSD: ssh-agent.1,v 1.70 2019/12/21 20:22:34 naddy Exp $ |
2 | .\" | 2 | .\" |
3 | .\" Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | .\" Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | .\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | .\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -34,19 +34,19 @@ | |||
34 | .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 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. | 35 | .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
36 | .\" | 36 | .\" |
37 | .Dd $Mdocdate: November 30 2016 $ | 37 | .Dd $Mdocdate: December 21 2019 $ |
38 | .Dt SSH-AGENT 1 | 38 | .Dt SSH-AGENT 1 |
39 | .Os | 39 | .Os |
40 | .Sh NAME | 40 | .Sh NAME |
41 | .Nm ssh-agent | 41 | .Nm ssh-agent |
42 | .Nd authentication agent | 42 | .Nd OpenSSH authentication agent |
43 | .Sh SYNOPSIS | 43 | .Sh SYNOPSIS |
44 | .Nm ssh-agent | 44 | .Nm ssh-agent |
45 | .Op Fl c | s | 45 | .Op Fl c | s |
46 | .Op Fl \&Dd | 46 | .Op Fl \&Dd |
47 | .Op Fl a Ar bind_address | 47 | .Op Fl a Ar bind_address |
48 | .Op Fl E Ar fingerprint_hash | 48 | .Op Fl E Ar fingerprint_hash |
49 | .Op Fl P Ar pkcs11_whitelist | 49 | .Op Fl P Ar provider_whitelist |
50 | .Op Fl t Ar life | 50 | .Op Fl t Ar life |
51 | .Op Ar command Op Ar arg ... | 51 | .Op Ar command Op Ar arg ... |
52 | .Nm ssh-agent | 52 | .Nm ssh-agent |
@@ -54,37 +54,12 @@ | |||
54 | .Fl k | 54 | .Fl k |
55 | .Sh DESCRIPTION | 55 | .Sh DESCRIPTION |
56 | .Nm | 56 | .Nm |
57 | is a program to hold private keys used for public key authentication | 57 | is a program to hold private keys used for public key authentication. |
58 | (RSA, DSA, ECDSA, Ed25519). | ||
59 | .Nm | ||
60 | is usually started in the beginning of an X-session or a login session, and | ||
61 | all other windows or programs are started as clients to the ssh-agent | ||
62 | program. | ||
63 | Through use of environment variables the agent can be located | 58 | Through use of environment variables the agent can be located |
64 | and automatically used for authentication when logging in to other | 59 | and automatically used for authentication when logging in to other |
65 | machines using | 60 | machines using |
66 | .Xr ssh 1 . | 61 | .Xr ssh 1 . |
67 | .Pp | 62 | .Pp |
68 | The agent initially does not have any private keys. | ||
69 | Keys are added using | ||
70 | .Xr ssh 1 | ||
71 | (see | ||
72 | .Cm AddKeysToAgent | ||
73 | in | ||
74 | .Xr ssh_config 5 | ||
75 | for details) | ||
76 | or | ||
77 | .Xr ssh-add 1 . | ||
78 | Multiple identities may be stored in | ||
79 | .Nm | ||
80 | concurrently and | ||
81 | .Xr ssh 1 | ||
82 | will automatically use them if present. | ||
83 | .Xr ssh-add 1 | ||
84 | is also used to remove keys from | ||
85 | .Nm | ||
86 | and to query the keys that are held in one. | ||
87 | .Pp | ||
88 | The options are as follows: | 63 | The options are as follows: |
89 | .Bl -tag -width Ds | 64 | .Bl -tag -width Ds |
90 | .It Fl a Ar bind_address | 65 | .It Fl a Ar bind_address |
@@ -122,18 +97,20 @@ The default is | |||
122 | Kill the current agent (given by the | 97 | Kill the current agent (given by the |
123 | .Ev SSH_AGENT_PID | 98 | .Ev SSH_AGENT_PID |
124 | environment variable). | 99 | environment variable). |
125 | .It Fl P Ar pkcs11_whitelist | 100 | .It Fl P Ar provider_whitelist |
126 | Specify a pattern-list of acceptable paths for PKCS#11 shared libraries | 101 | Specify a pattern-list of acceptable paths for PKCS#11 and FIDO authenticator |
127 | that may be added using the | 102 | shared libraries that may be used with the |
103 | .Fl S | ||
104 | or | ||
128 | .Fl s | 105 | .Fl s |
129 | option to | 106 | options to |
130 | .Xr ssh-add 1 . | 107 | .Xr ssh-add 1 . |
131 | The default is to allow loading PKCS#11 libraries from | 108 | Libraries that do not match the whitelist will be refused. |
132 | .Dq /usr/lib/*,/usr/local/lib/* . | ||
133 | PKCS#11 libraries that do not match the whitelist will be refused. | ||
134 | See PATTERNS in | 109 | See PATTERNS in |
135 | .Xr ssh_config 5 | 110 | .Xr ssh_config 5 |
136 | for a description of pattern-list syntax. | 111 | for a description of pattern-list syntax. |
112 | The default whitelist is | ||
113 | .Dq /usr/lib/*,/usr/local/lib/* . | ||
137 | .It Fl s | 114 | .It Fl s |
138 | Generate Bourne shell commands on | 115 | Generate Bourne shell commands on |
139 | .Dv stdout . | 116 | .Dv stdout . |
@@ -148,64 +125,82 @@ A lifetime specified for an identity with | |||
148 | .Xr ssh-add 1 | 125 | .Xr ssh-add 1 |
149 | overrides this value. | 126 | overrides this value. |
150 | Without this option the default maximum lifetime is forever. | 127 | Without this option the default maximum lifetime is forever. |
128 | .It Ar command Op Ar arg ... | ||
129 | If a command (and optional arguments) is given, | ||
130 | this is executed as a subprocess of the agent. | ||
131 | The agent exits automatically when the command given on the command | ||
132 | line terminates. | ||
151 | .El | 133 | .El |
152 | .Pp | 134 | .Pp |
153 | If a command line is given, this is executed as a subprocess of the agent. | 135 | There are two main ways to get an agent set up. |
154 | When the command dies, so does the agent. | 136 | The first is at the start of an X session, |
155 | .Pp | 137 | where all other windows or programs are started as children of the |
156 | The idea is that the agent is run in the user's local PC, laptop, or | 138 | .Nm |
157 | terminal. | 139 | program. |
158 | Authentication data need not be stored on any other | 140 | The agent starts a command under which its environment |
159 | machine, and authentication passphrases never go over the network. | 141 | variables are exported, for example |
160 | However, the connection to the agent is forwarded over SSH | ||
161 | remote logins, and the user can thus use the privileges given by the | ||
162 | identities anywhere in the network in a secure way. | ||
163 | .Pp | ||
164 | There are two main ways to get an agent set up: | ||
165 | The first is that the agent starts a new subcommand into which some environment | ||
166 | variables are exported, eg | ||
167 | .Cm ssh-agent xterm & . | 142 | .Cm ssh-agent xterm & . |
168 | The second is that the agent prints the needed shell commands (either | 143 | When the command terminates, so does the agent. |
169 | .Xr sh 1 | 144 | .Pp |
170 | or | 145 | The second method is used for a login session. |
171 | .Xr csh 1 | 146 | When |
172 | syntax can be generated) which can be evaluated in the calling shell, eg | 147 | .Nm |
173 | .Cm eval `ssh-agent -s` | 148 | is started, |
174 | for Bourne-type shells such as | 149 | it prints the shell commands required to set its environment variables, |
175 | .Xr sh 1 | 150 | which in turn can be evaluated in the calling shell, for example |
176 | or | 151 | .Cm eval `ssh-agent -s` . |
177 | .Xr ksh 1 | ||
178 | and | ||
179 | .Cm eval `ssh-agent -c` | ||
180 | for | ||
181 | .Xr csh 1 | ||
182 | and derivatives. | ||
183 | .Pp | 152 | .Pp |
184 | Later | 153 | In both cases, |
185 | .Xr ssh 1 | 154 | .Xr ssh 1 |
186 | looks at these variables and uses them to establish a connection to the agent. | 155 | looks at these environment variables and uses them to establish a connection to the agent. |
187 | .Pp | 156 | .Pp |
188 | The agent will never send a private key over its request channel. | 157 | The agent initially does not have any private keys. |
189 | Instead, operations that require a private key will be performed | 158 | Keys are added using |
190 | by the agent, and the result will be returned to the requester. | 159 | .Xr ssh-add 1 |
191 | This way, private keys are not exposed to clients using the agent. | 160 | or by |
161 | .Xr ssh 1 | ||
162 | when | ||
163 | .Cm AddKeysToAgent | ||
164 | is set in | ||
165 | .Xr ssh_config 5 . | ||
166 | Multiple identities may be stored in | ||
167 | .Nm | ||
168 | concurrently and | ||
169 | .Xr ssh 1 | ||
170 | will automatically use them if present. | ||
171 | .Xr ssh-add 1 | ||
172 | is also used to remove keys from | ||
173 | .Nm | ||
174 | and to query the keys that are held in one. | ||
192 | .Pp | 175 | .Pp |
193 | A | 176 | Connections to |
177 | .Nm | ||
178 | may be forwarded from further remote hosts using the | ||
179 | .Fl A | ||
180 | option to | ||
181 | .Xr ssh 1 | ||
182 | (but see the caveats documented therein), | ||
183 | avoiding the need for authentication data to be stored on other machines. | ||
184 | Authentication passphrases and private keys never go over the network: | ||
185 | the connection to the agent is forwarded over SSH remote connections | ||
186 | and the result is returned to the requester, | ||
187 | allowing the user access to their identities anywhere in the network | ||
188 | in a secure fashion. | ||
189 | .Sh ENVIRONMENT | ||
190 | .Bl -tag -width "SSH_AGENT_PID" | ||
191 | .It Ev SSH_AGENT_PID | ||
192 | When | ||
193 | .Nm | ||
194 | starts, it stores the name of the agent's process ID (PID) in this variable. | ||
195 | .It Ev SSH_AUTH_SOCK | ||
196 | When | ||
197 | .Nm | ||
198 | starts, it creates a | ||
194 | .Ux Ns -domain | 199 | .Ux Ns -domain |
195 | socket is created and the name of this socket is stored in the | 200 | socket and stores its pathname in this variable. |
196 | .Ev SSH_AUTH_SOCK | 201 | It is accessible only to the current user, |
197 | environment | 202 | but is easily abused by root or another instance of the same user. |
198 | variable. | 203 | .El |
199 | The socket is made accessible only to the current user. | ||
200 | This method is easily abused by root or another instance of the same | ||
201 | user. | ||
202 | .Pp | ||
203 | The | ||
204 | .Ev SSH_AGENT_PID | ||
205 | environment variable holds the agent's process ID. | ||
206 | .Pp | ||
207 | The agent exits automatically when the command given on the command | ||
208 | line terminates. | ||
209 | .Sh FILES | 204 | .Sh FILES |
210 | .Bl -tag -width Ds | 205 | .Bl -tag -width Ds |
211 | .It Pa $TMPDIR/ssh-XXXXXXXXXX/agent.<ppid> | 206 | .It Pa $TMPDIR/ssh-XXXXXXXXXX/agent.<ppid> |
@@ -218,6 +213,7 @@ The sockets should get automatically removed when the agent exits. | |||
218 | .Xr ssh 1 , | 213 | .Xr ssh 1 , |
219 | .Xr ssh-add 1 , | 214 | .Xr ssh-add 1 , |
220 | .Xr ssh-keygen 1 , | 215 | .Xr ssh-keygen 1 , |
216 | .Xr ssh_config 5 , | ||
221 | .Xr sshd 8 | 217 | .Xr sshd 8 |
222 | .Sh AUTHORS | 218 | .Sh AUTHORS |
223 | .An -nosplit | 219 | .An -nosplit |