]>
Commit | Line | Data |
---|---|---|
9f04903c BL |
1 | .\" |
2 | .\" Author: Tatu Ylonen <ylo@cs.hut.fi> | |
3 | .\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | |
4 | .\" All rights reserved | |
5 | .\" | |
6 | .\" As far as I am concerned, the code I have written for this software | |
7 | .\" can be used freely for any purpose. Any derived versions of this | |
8 | .\" software must be clearly marked as such, and if the derived work is | |
9 | .\" incompatible with the protocol description in the RFC file, it must be | |
10 | .\" called by a name other than "ssh" or "Secure Shell". | |
11 | .\" | |
12 | .\" Copyright (c) 1999,2000 Markus Friedl. All rights reserved. | |
13 | .\" Copyright (c) 1999 Aaron Campbell. All rights reserved. | |
14 | .\" Copyright (c) 1999 Theo de Raadt. All rights reserved. | |
15 | .\" | |
16 | .\" Redistribution and use in source and binary forms, with or without | |
17 | .\" modification, are permitted provided that the following conditions | |
18 | .\" are met: | |
19 | .\" 1. Redistributions of source code must retain the above copyright | |
20 | .\" notice, this list of conditions and the following disclaimer. | |
21 | .\" 2. Redistributions in binary form must reproduce the above copyright | |
22 | .\" notice, this list of conditions and the following disclaimer in the | |
23 | .\" documentation and/or other materials provided with the distribution. | |
24 | .\" | |
25 | .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | |
26 | .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | |
27 | .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | |
28 | .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | |
29 | .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | |
30 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
31 | .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
32 | .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
33 | .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | |
34 | .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
35 | .\" | |
afcc9028 | 36 | .\" $OpenBSD: sshd_config.5,v 1.352 2024/01/10 06:33:13 jmc Exp $ |
37 | .Dd $Mdocdate: January 10 2024 $ | |
9f04903c BL |
38 | .Dt SSHD_CONFIG 5 |
39 | .Os | |
40 | .Sh NAME | |
41 | .Nm sshd_config | |
483cc723 | 42 | .Nd OpenSSH daemon configuration file |
9f04903c | 43 | .Sh DESCRIPTION |
f4f22b54 | 44 | .Xr sshd 8 |
9f04903c BL |
45 | reads configuration data from |
46 | .Pa /etc/ssh/sshd_config | |
47 | (or the file specified with | |
48 | .Fl f | |
49 | on the command line). | |
50 | The file contains keyword-argument pairs, one per line. | |
78571a5f | 51 | Unless noted otherwise, for each keyword, the first obtained value will be used. |
9f04903c BL |
52 | Lines starting with |
53 | .Ql # | |
54 | and empty lines are interpreted as comments. | |
306d118f DM |
55 | Arguments may optionally be enclosed in double quotes |
56 | .Pq \&" | |
57 | in order to represent arguments containing spaces. | |
9f04903c BL |
58 | .Pp |
59 | The possible | |
60 | keywords and their meanings are as follows (note that | |
61 | keywords are case-insensitive and arguments are case-sensitive): | |
62 | .Bl -tag -width Ds | |
46bc0754 DT |
63 | .It Cm AcceptEnv |
64 | Specifies what environment variables sent by the client will be copied into | |
65 | the session's | |
66 | .Xr environ 7 . | |
67 | See | |
68 | .Cm SendEnv | |
7082bb58 | 69 | and |
70 | .Cm SetEnv | |
46bc0754 DT |
71 | in |
72 | .Xr ssh_config 5 | |
73 | for how to configure the client. | |
a685ae8d | 74 | The |
85b96ef4 | 75 | .Ev TERM |
1678d423 | 76 | environment variable is always accepted whenever the client |
732d61f4 | 77 | requests a pseudo-terminal as it is required by the protocol. |
46bc0754 | 78 | Variables are specified by name, which may contain the wildcard characters |
208f1ed6 | 79 | .Ql * |
46bc0754 DT |
80 | and |
81 | .Ql \&? . | |
1e0c9bf9 | 82 | Multiple environment variables may be separated by whitespace or spread |
46bc0754 DT |
83 | across multiple |
84 | .Cm AcceptEnv | |
85 | directives. | |
1e0c9bf9 | 86 | Be warned that some environment variables could be used to bypass restricted |
46bc0754 DT |
87 | user environments. |
88 | For this reason, care should be taken in the use of this directive. | |
89 | The default is not to accept any environment variables. | |
0f383232 DT |
90 | .It Cm AddressFamily |
91 | Specifies which address family should be used by | |
f4f22b54 | 92 | .Xr sshd 8 . |
0f383232 | 93 | Valid arguments are |
aae4dbd4 | 94 | .Cm any |
95 | (the default), | |
96 | .Cm inet | |
5b0d63f8 | 97 | (use IPv4 only), or |
aae4dbd4 | 98 | .Cm inet6 |
0f383232 | 99 | (use IPv6 only). |
e9890193 DM |
100 | .It Cm AllowAgentForwarding |
101 | Specifies whether | |
102 | .Xr ssh-agent 1 | |
103 | forwarding is permitted. | |
104 | The default is | |
aae4dbd4 | 105 | .Cm yes . |
e9890193 DM |
106 | Note that disabling agent forwarding does not improve security |
107 | unless users are also denied shell access, as they can always install | |
108 | their own forwarders. | |
9f04903c BL |
109 | .It Cm AllowGroups |
110 | This keyword can be followed by a list of group name patterns, separated | |
111 | by spaces. | |
112 | If specified, login is allowed only for users whose primary | |
113 | group or supplementary group list matches one of the patterns. | |
9f04903c BL |
114 | Only group names are valid; a numerical group ID is not recognized. |
115 | By default, login is allowed for all groups. | |
bf986a9e | 116 | The allow/deny groups directives are processed in the following order: |
ac73e513 | 117 | .Cm DenyGroups , |
ac73e513 | 118 | .Cm AllowGroups . |
0c2079d8 | 119 | .Pp |
fecfd118 | 120 | See PATTERNS in |
0c2079d8 DM |
121 | .Xr ssh_config 5 |
122 | for more information on patterns. | |
78571a5f | 123 | This keyword may appear multiple times in |
124 | .Nm | |
125 | with each instance appending to the list. | |
f219fc8f | 126 | .It Cm AllowStreamLocalForwarding |
127 | Specifies whether StreamLocal (Unix-domain socket) forwarding is permitted. | |
aa5b3f83 | 128 | The available options are |
aae4dbd4 | 129 | .Cm yes |
130 | (the default) | |
aa5b3f83 | 131 | or |
aae4dbd4 | 132 | .Cm all |
f219fc8f | 133 | to allow StreamLocal forwarding, |
aae4dbd4 | 134 | .Cm no |
f219fc8f | 135 | to prevent all StreamLocal forwarding, |
aae4dbd4 | 136 | .Cm local |
aa5b3f83 | 137 | to allow local (from the perspective of |
f9333d52 DT |
138 | .Xr ssh 1 ) |
139 | forwarding only or | |
aae4dbd4 | 140 | .Cm remote |
aa5b3f83 | 141 | to allow remote forwarding only. |
f219fc8f | 142 | Note that disabling StreamLocal forwarding does not improve security unless |
9f04903c BL |
143 | users are also denied shell access, as they can always install their |
144 | own forwarders. | |
f219fc8f | 145 | .It Cm AllowTcpForwarding |
146 | Specifies whether TCP forwarding is permitted. | |
7acefbbc | 147 | The available options are |
aae4dbd4 | 148 | .Cm yes |
149 | (the default) | |
7acefbbc | 150 | or |
aae4dbd4 | 151 | .Cm all |
f219fc8f | 152 | to allow TCP forwarding, |
aae4dbd4 | 153 | .Cm no |
f219fc8f | 154 | to prevent all TCP forwarding, |
aae4dbd4 | 155 | .Cm local |
7acefbbc DM |
156 | to allow local (from the perspective of |
157 | .Xr ssh 1 ) | |
158 | forwarding only or | |
aae4dbd4 | 159 | .Cm remote |
7acefbbc | 160 | to allow remote forwarding only. |
f219fc8f | 161 | Note that disabling TCP forwarding does not improve security unless |
7acefbbc DM |
162 | users are also denied shell access, as they can always install their |
163 | own forwarders. | |
9f04903c BL |
164 | .It Cm AllowUsers |
165 | This keyword can be followed by a list of user name patterns, separated | |
166 | by spaces. | |
5a93add6 | 167 | If specified, login is allowed only for user names that |
9f04903c | 168 | match one of the patterns. |
9f04903c BL |
169 | Only user names are valid; a numerical user ID is not recognized. |
170 | By default, login is allowed for all users. | |
171 | If the pattern takes the form USER@HOST then USER and HOST | |
172 | are separately checked, restricting logins to particular | |
173 | users from particular hosts. | |
ee1e0a16 | 174 | HOST criteria may additionally contain addresses to match in CIDR |
175 | address/masklen format. | |
bf986a9e | 176 | The allow/deny users directives are processed in the following order: |
ac73e513 | 177 | .Cm DenyUsers , |
bf986a9e | 178 | .Cm AllowUsers . |
0c2079d8 | 179 | .Pp |
fecfd118 | 180 | See PATTERNS in |
0c2079d8 DM |
181 | .Xr ssh_config 5 |
182 | for more information on patterns. | |
78571a5f | 183 | This keyword may appear multiple times in |
184 | .Nm | |
185 | with each instance appending to the list. | |
a6e3f01d DM |
186 | .It Cm AuthenticationMethods |
187 | Specifies the authentication methods that must be successfully completed | |
188 | for a user to be granted access. | |
472269f8 | 189 | This option must be followed by one or more lists of comma-separated |
b64faeb5 | 190 | authentication method names, or by the single string |
aae4dbd4 | 191 | .Cm any |
b64faeb5 | 192 | to indicate the default behaviour of accepting any single authentication |
ad23a755 | 193 | method. |
aae4dbd4 | 194 | If the default is overridden, then successful authentication requires |
b64faeb5 | 195 | completion of every method in at least one of these lists. |
a6e3f01d | 196 | .Pp |
aae4dbd4 | 197 | For example, |
198 | .Qq publickey,password publickey,keyboard-interactive | |
a6e3f01d DM |
199 | would require the user to complete public key authentication, followed by |
200 | either password or keyboard interactive authentication. | |
201 | Only methods that are next in one or more lists are offered at each stage, | |
aae4dbd4 | 202 | so for this example it would not be possible to attempt password or |
a6e3f01d DM |
203 | keyboard-interactive authentication before public key. |
204 | .Pp | |
91a55f28 DM |
205 | For keyboard interactive authentication it is also possible to |
206 | restrict authentication to a specific device by appending a | |
207 | colon followed by the device identifier | |
87f08be0 | 208 | .Cm bsdauth |
91a55f28 | 209 | or |
87f08be0 | 210 | .Cm pam . |
91a55f28 DM |
211 | depending on the server configuration. |
212 | For example, | |
aae4dbd4 | 213 | .Qq keyboard-interactive:bsdauth |
91a55f28 | 214 | would restrict keyboard interactive authentication to the |
aae4dbd4 | 215 | .Cm bsdauth |
91a55f28 DM |
216 | device. |
217 | .Pp | |
aae4dbd4 | 218 | If the publickey method is listed more than once, |
f69b69b8 | 219 | .Xr sshd 8 |
220 | verifies that keys that have been used successfully are not reused for | |
221 | subsequent authentications. | |
aae4dbd4 | 222 | For example, |
223 | .Qq publickey,publickey | |
224 | requires successful authentication using two different public keys. | |
f69b69b8 | 225 | .Pp |
a6e3f01d DM |
226 | Note that each authentication method listed should also be explicitly enabled |
227 | in the configuration. | |
8042bad9 | 228 | .Pp |
229 | The available authentication methods are: | |
230 | .Qq gssapi-with-mic , | |
231 | .Qq hostbased , | |
232 | .Qq keyboard-interactive , | |
233 | .Qq none | |
234 | (used for access to password-less accounts when | |
f41bcd70 | 235 | .Cm PermitEmptyPasswords |
8042bad9 | 236 | is enabled), |
237 | .Qq password | |
238 | and | |
239 | .Qq publickey . | |
09d3e125 | 240 | .It Cm AuthorizedKeysCommand |
f33580ee | 241 | Specifies a program to be used to look up the user's public keys. |
24232a3e | 242 | The program must be owned by root, not writable by group or others and |
243 | specified by an absolute path. | |
24232a3e | 244 | Arguments to |
245 | .Cm AuthorizedKeysCommand | |
de6a175a | 246 | accept the tokens described in the |
247 | .Sx TOKENS | |
248 | section. | |
249 | If no arguments are specified then the username of the target user is used. | |
24232a3e | 250 | .Pp |
251 | The program should produce on standard output zero or | |
de6a175a | 252 | more lines of authorized_keys output (see |
253 | .Sx AUTHORIZED_KEYS | |
254 | in | |
f33580ee | 255 | .Xr sshd 8 ) . |
de6a175a | 256 | .Cm AuthorizedKeysCommand |
44ae009a | 257 | is tried after the usual |
09d3e125 | 258 | .Cm AuthorizedKeysFile |
44ae009a | 259 | files and will not be executed if a matching key is found there. |
aae4dbd4 | 260 | By default, no |
261 | .Cm AuthorizedKeysCommand | |
262 | is run. | |
09d3e125 | 263 | .It Cm AuthorizedKeysCommandUser |
aae4dbd4 | 264 | Specifies the user under whose account the |
265 | .Cm AuthorizedKeysCommand | |
266 | is run. | |
09d3e125 DM |
267 | It is recommended to use a dedicated user that has no other role on the host |
268 | than running authorized keys commands. | |
f1c4d8ec | 269 | If |
d663bea3 | 270 | .Cm AuthorizedKeysCommand |
f1c4d8ec | 271 | is specified but |
272 | .Cm AuthorizedKeysCommandUser | |
273 | is not, then | |
274 | .Xr sshd 8 | |
275 | will refuse to start. | |
9f04903c | 276 | .It Cm AuthorizedKeysFile |
de6a175a | 277 | Specifies the file that contains the public keys used for user authentication. |
db7606d4 | 278 | The format is described in the AUTHORIZED_KEYS FILE FORMAT section of |
6018a368 | 279 | .Xr sshd 8 . |
de6a175a | 280 | Arguments to |
9f04903c | 281 | .Cm AuthorizedKeysFile |
de6a175a | 282 | accept the tokens described in the |
283 | .Sx TOKENS | |
284 | section. | |
9f04903c BL |
285 | After expansion, |
286 | .Cm AuthorizedKeysFile | |
287 | is taken to be an absolute path or one relative to the user's home | |
288 | directory. | |
b9132fc4 | 289 | Multiple files may be listed, separated by whitespace. |
2bca8a43 | 290 | Alternately this option may be set to |
aae4dbd4 | 291 | .Cm none |
2bca8a43 | 292 | to skip checking for user keys in files. |
b9132fc4 | 293 | The default is |
aae4dbd4 | 294 | .Qq .ssh/authorized_keys .ssh/authorized_keys2 . |
bcc50d81 | 295 | .It Cm AuthorizedPrincipalsCommand |
296 | Specifies a program to be used to generate the list of allowed | |
297 | certificate principals as per | |
298 | .Cm AuthorizedPrincipalsFile . | |
299 | The program must be owned by root, not writable by group or others and | |
300 | specified by an absolute path. | |
bcc50d81 | 301 | Arguments to |
302 | .Cm AuthorizedPrincipalsCommand | |
de6a175a | 303 | accept the tokens described in the |
304 | .Sx TOKENS | |
305 | section. | |
306 | If no arguments are specified then the username of the target user is used. | |
bcc50d81 | 307 | .Pp |
308 | The program should produce on standard output zero or | |
309 | more lines of | |
310 | .Cm AuthorizedPrincipalsFile | |
311 | output. | |
312 | If either | |
313 | .Cm AuthorizedPrincipalsCommand | |
314 | or | |
315 | .Cm AuthorizedPrincipalsFile | |
316 | is specified, then certificates offered by the client for authentication | |
317 | must contain a principal that is listed. | |
de6a175a | 318 | By default, no |
319 | .Cm AuthorizedPrincipalsCommand | |
320 | is run. | |
bcc50d81 | 321 | .It Cm AuthorizedPrincipalsCommandUser |
de6a175a | 322 | Specifies the user under whose account the |
323 | .Cm AuthorizedPrincipalsCommand | |
324 | is run. | |
bcc50d81 | 325 | It is recommended to use a dedicated user that has no other role on the host |
326 | than running authorized principals commands. | |
327 | If | |
328 | .Cm AuthorizedPrincipalsCommand | |
329 | is specified but | |
330 | .Cm AuthorizedPrincipalsCommandUser | |
331 | is not, then | |
332 | .Xr sshd 8 | |
333 | will refuse to start. | |
30da3447 DM |
334 | .It Cm AuthorizedPrincipalsFile |
335 | Specifies a file that lists principal names that are accepted for | |
336 | certificate authentication. | |
337 | When using certificates signed by a key listed in | |
338 | .Cm TrustedUserCAKeys , | |
339 | this file lists names, one of which must appear in the certificate for it | |
340 | to be accepted for authentication. | |
de6a175a | 341 | Names are listed one per line preceded by key options (as described in |
342 | .Sx AUTHORIZED_KEYS FILE FORMAT | |
343 | in | |
d59dab83 | 344 | .Xr sshd 8 ) . |
6018a368 | 345 | Empty lines and comments starting with |
30da3447 DM |
346 | .Ql # |
347 | are ignored. | |
348 | .Pp | |
de6a175a | 349 | Arguments to |
30da3447 | 350 | .Cm AuthorizedPrincipalsFile |
de6a175a | 351 | accept the tokens described in the |
352 | .Sx TOKENS | |
353 | section. | |
30da3447 DM |
354 | After expansion, |
355 | .Cm AuthorizedPrincipalsFile | |
de6a175a | 356 | is taken to be an absolute path or one relative to the user's home directory. |
8fef9ebb | 357 | The default is |
aae4dbd4 | 358 | .Cm none , |
8fef9ebb | 359 | i.e. not to use a principals file \(en in this case, the username |
30da3447 DM |
360 | of the user must appear in a certificate's principals list for it to be |
361 | accepted. | |
de6a175a | 362 | .Pp |
30da3447 DM |
363 | Note that |
364 | .Cm AuthorizedPrincipalsFile | |
365 | is only used when authentication proceeds using a CA listed in | |
366 | .Cm TrustedUserCAKeys | |
367 | and is not consulted for certification authorities trusted via | |
368 | .Pa ~/.ssh/authorized_keys , | |
369 | though the | |
370 | .Cm principals= | |
371 | key option offers a similar facility (see | |
372 | .Xr sshd 8 | |
373 | for details). | |
9f04903c | 374 | .It Cm Banner |
9f04903c BL |
375 | The contents of the specified file are sent to the remote user before |
376 | authentication is allowed. | |
4890e539 | 377 | If the argument is |
aae4dbd4 | 378 | .Cm none |
4890e539 | 379 | then no banner is displayed. |
9f04903c | 380 | By default, no banner is displayed. |
86e5737c | 381 | .It Cm CASignatureAlgorithms |
382 | Specifies which algorithms are allowed for signing of certificates | |
383 | by certificate authorities (CAs). | |
384 | The default is: | |
385 | .Bd -literal -offset indent | |
dcce2a2b | 386 | ssh-ed25519,ecdsa-sha2-nistp256, |
387 | ecdsa-sha2-nistp384,ecdsa-sha2-nistp521, | |
388 | sk-ssh-ed25519@openssh.com, | |
389 | sk-ecdsa-sha2-nistp256@openssh.com, | |
53ea05e0 | 390 | rsa-sha2-512,rsa-sha2-256 |
86e5737c | 391 | .Ed |
392 | .Pp | |
dcce2a2b | 393 | If the specified list begins with a |
394 | .Sq + | |
395 | character, then the specified algorithms will be appended to the default set | |
396 | instead of replacing them. | |
397 | If the specified list begins with a | |
398 | .Sq - | |
399 | character, then the specified algorithms (including wildcards) will be removed | |
400 | from the default set instead of replacing them. | |
401 | .Pp | |
86e5737c | 402 | Certificates signed using other algorithms will not be accepted for |
403 | public key or host-based authentication. | |
2d1ff2b9 | 404 | .It Cm ChannelTimeout |
405 | Specifies whether and how quickly | |
406 | .Xr sshd 8 | |
407 | should close inactive channels. | |
d213d126 | 408 | Timeouts are specified as one or more |
2d1ff2b9 | 409 | .Dq type=interval |
410 | pairs separated by whitespace, where the | |
411 | .Dq type | |
b31b12d2 | 412 | must be the special keyword |
413 | .Dq global | |
414 | or a channel type name from the list below, optionally containing | |
415 | wildcard characters. | |
2d1ff2b9 | 416 | .Pp |
417 | The timeout value | |
418 | .Dq interval | |
419 | is specified in seconds or may use any of the units documented in the | |
420 | .Sx TIME FORMATS | |
421 | section. | |
422 | For example, | |
b31b12d2 | 423 | .Dq session=5m |
424 | would cause interactive sessions to terminate after five minutes of | |
425 | inactivity. | |
2d1ff2b9 | 426 | Specifying a zero value disables the inactivity timeout. |
427 | .Pp | |
b31b12d2 | 428 | The special timeout |
429 | .Dq global | |
afcc9028 | 430 | applies to all active channels, taken together. |
b31b12d2 | 431 | Traffic on any active channel will reset the timeout, but when the timeout |
432 | expires then all open channels will be closed. | |
433 | Note that this global timeout is not matched by wildcards and must be | |
434 | specified explicitly. | |
435 | .Pp | |
436 | The available channel type names include: | |
2d1ff2b9 | 437 | .Bl -tag -width Ds |
438 | .It Cm agent-connection | |
439 | Open connections to | |
440 | .Xr ssh-agent 1 . | |
d213d126 | 441 | .It Cm direct-tcpip , Cm direct-streamlocal@openssh.com |
2d1ff2b9 | 442 | Open TCP or Unix socket (respectively) connections that have |
443 | been established from a | |
444 | .Xr ssh 1 | |
d213d126 | 445 | local forwarding, i.e.\& |
446 | .Cm LocalForward | |
447 | or | |
2d1ff2b9 | 448 | .Cm DynamicForward . |
d213d126 | 449 | .It Cm forwarded-tcpip , Cm forwarded-streamlocal@openssh.com |
2d1ff2b9 | 450 | Open TCP or Unix socket (respectively) connections that have been |
451 | established to a | |
452 | .Xr sshd 8 | |
453 | listening on behalf of a | |
454 | .Xr ssh 1 | |
d213d126 | 455 | remote forwarding, i.e.\& |
2d1ff2b9 | 456 | .Cm RemoteForward . |
b31b12d2 | 457 | .It Cm session |
458 | The interactive main session, including shell session, command execution, | |
459 | .Xr scp 1 , | |
2d1ff2b9 | 460 | .Xr sftp 1 , |
b31b12d2 | 461 | etc. |
462 | .It Cm tun-connection | |
463 | Open | |
464 | .Cm TunnelForward | |
465 | connections. | |
2d1ff2b9 | 466 | .It Cm x11-connection |
467 | Open X11 forwarding sessions. | |
468 | .El | |
469 | .Pp | |
d213d126 | 470 | Note that in all the above cases, terminating an inactive session does not |
2d1ff2b9 | 471 | guarantee to remove all resources associated with the session, e.g. shell |
472 | processes or X11 clients relating to the session may continue to execute. | |
473 | .Pp | |
d213d126 | 474 | Moreover, terminating an inactive channel or session does not necessarily |
2d1ff2b9 | 475 | close the SSH connection, nor does it prevent a client from |
476 | requesting another channel of the same type. | |
477 | In particular, expiring an inactive forwarding session does not prevent | |
478 | another identical forwarding from being subsequently created. | |
479 | .Pp | |
480 | The default is not to expire channels of any type for inactivity. | |
d8cb1f18 | 481 | .It Cm ChrootDirectory |
b8c884a0 | 482 | Specifies the pathname of a directory to |
d8cb1f18 DM |
483 | .Xr chroot 2 |
484 | to after authentication. | |
dcff5810 | 485 | At session startup |
486 | .Xr sshd 8 | |
487 | checks that all components of the pathname are root-owned directories | |
488 | which are not writable by any other user or group. | |
51dbe503 DT |
489 | After the chroot, |
490 | .Xr sshd 8 | |
491 | changes the working directory to the user's home directory. | |
de6a175a | 492 | Arguments to |
493 | .Cm ChrootDirectory | |
494 | accept the tokens described in the | |
495 | .Sx TOKENS | |
496 | section. | |
d8cb1f18 DM |
497 | .Pp |
498 | The | |
499 | .Cm ChrootDirectory | |
500 | must contain the necessary files and directories to support the | |
af501cfc | 501 | user's session. |
d8cb1f18 DM |
502 | For an interactive session this requires at least a shell, typically |
503 | .Xr sh 1 , | |
504 | and basic | |
505 | .Pa /dev | |
506 | nodes such as | |
507 | .Xr null 4 , | |
508 | .Xr zero 4 , | |
509 | .Xr stdin 4 , | |
510 | .Xr stdout 4 , | |
511 | .Xr stderr 4 , | |
08c0eebf | 512 | and |
d8cb1f18 DM |
513 | .Xr tty 4 |
514 | devices. | |
aae4dbd4 | 515 | For file transfer sessions using SFTP |
516 | no additional configuration of the environment is necessary if the in-process | |
517 | sftp-server is used, | |
426117b2 | 518 | though sessions which use logging may require |
00fcd719 | 519 | .Pa /dev/log |
426117b2 | 520 | inside the chroot directory on some operating systems (see |
00fcd719 DT |
521 | .Xr sftp-server 8 |
522 | for details). | |
d8cb1f18 | 523 | .Pp |
a5a3e332 | 524 | For safety, it is very important that the directory hierarchy be |
dcff5810 | 525 | prevented from modification by other processes on the system (especially |
526 | those outside the jail). | |
527 | Misconfiguration can lead to unsafe environments which | |
528 | .Xr sshd 8 | |
529 | cannot detect. | |
530 | .Pp | |
9fd04681 | 531 | The default is |
aae4dbd4 | 532 | .Cm none , |
9fd04681 | 533 | indicating not to |
d8cb1f18 | 534 | .Xr chroot 2 . |
9f04903c | 535 | .It Cm Ciphers |
a685ae8d | 536 | Specifies the ciphers allowed. |
9f04903c | 537 | Multiple ciphers must be comma-separated. |
4f9d75fb | 538 | If the specified list begins with a |
f9eca249 | 539 | .Sq + |
540 | character, then the specified ciphers will be appended to the default set | |
541 | instead of replacing them. | |
4f9d75fb | 542 | If the specified list begins with a |
68bc8cfa | 543 | .Sq - |
544 | character, then the specified ciphers (including wildcards) will be removed | |
545 | from the default set instead of replacing them. | |
91a2135f | 546 | If the specified list begins with a |
547 | .Sq ^ | |
548 | character, then the specified ciphers will be placed at the head of the | |
549 | default set. | |
f9eca249 | 550 | .Pp |
0fde8acd DM |
551 | The supported ciphers are: |
552 | .Pp | |
c1621c84 DM |
553 | .Bl -item -compact -offset indent |
554 | .It | |
555 | 3des-cbc | |
556 | .It | |
557 | aes128-cbc | |
558 | .It | |
559 | aes192-cbc | |
560 | .It | |
561 | aes256-cbc | |
562 | .It | |
563 | aes128-ctr | |
564 | .It | |
565 | aes192-ctr | |
566 | .It | |
567 | aes256-ctr | |
568 | .It | |
569 | aes128-gcm@openssh.com | |
570 | .It | |
571 | aes256-gcm@openssh.com | |
572 | .It | |
c1621c84 DM |
573 | chacha20-poly1305@openssh.com |
574 | .El | |
0fde8acd | 575 | .Pp |
5b0d63f8 | 576 | The default is: |
c1621c84 | 577 | .Bd -literal -offset indent |
1f8d3d62 | 578 | chacha20-poly1305@openssh.com, |
c1621c84 | 579 | aes128-ctr,aes192-ctr,aes256-ctr, |
1f8d3d62 | 580 | aes128-gcm@openssh.com,aes256-gcm@openssh.com |
9f04903c | 581 | .Ed |
0fde8acd | 582 | .Pp |
aae4dbd4 | 583 | The list of available ciphers may also be obtained using |
584 | .Qq ssh -Q cipher . | |
9f04903c | 585 | .It Cm ClientAliveCountMax |
aae4dbd4 | 586 | Sets the number of client alive messages which may be sent without |
5b0d63f8 | 587 | .Xr sshd 8 |
fbf486b4 DM |
588 | receiving any messages back from the client. |
589 | If this threshold is reached while client alive messages are being sent, | |
5b0d63f8 | 590 | sshd will disconnect the client, terminating the session. |
fbf486b4 DM |
591 | It is important to note that the use of client alive messages is very |
592 | different from | |
aae4dbd4 | 593 | .Cm TCPKeepAlive . |
fbf486b4 DM |
594 | The client alive messages are sent through the encrypted channel |
595 | and therefore will not be spoofable. | |
596 | The TCP keepalive option enabled by | |
12c150e7 | 597 | .Cm TCPKeepAlive |
fbf486b4 DM |
598 | is spoofable. |
599 | The client alive mechanism is valuable when the client or | |
8fdbc724 | 600 | server depend on knowing when a connection has become unresponsive. |
9f04903c | 601 | .Pp |
fbf486b4 DM |
602 | The default value is 3. |
603 | If | |
9f04903c | 604 | .Cm ClientAliveInterval |
aae4dbd4 | 605 | is set to 15, and |
9f04903c | 606 | .Cm ClientAliveCountMax |
5b0d63f8 | 607 | is left at the default, unresponsive SSH clients |
9f04903c | 608 | will be disconnected after approximately 45 seconds. |
69334996 | 609 | Setting a zero |
610 | .Cm ClientAliveCountMax | |
611 | disables connection termination. | |
1594ad5a DM |
612 | .It Cm ClientAliveInterval |
613 | Sets a timeout interval in seconds after which if no data has been received | |
614 | from the client, | |
5b0d63f8 | 615 | .Xr sshd 8 |
1594ad5a DM |
616 | will send a message through the encrypted |
617 | channel to request a response from the client. | |
618 | The default | |
619 | is 0, indicating that these messages will not be sent to the client. | |
9f04903c | 620 | .It Cm Compression |
4577adea | 621 | Specifies whether compression is enabled after |
9786e6e2 | 622 | the user has authenticated successfully. |
9f04903c | 623 | The argument must be |
aae4dbd4 | 624 | .Cm yes , |
625 | .Cm delayed | |
4577adea | 626 | (a legacy synonym for |
aae4dbd4 | 627 | .Cm yes ) |
9f04903c | 628 | or |
aae4dbd4 | 629 | .Cm no . |
9f04903c | 630 | The default is |
aae4dbd4 | 631 | .Cm yes . |
9f04903c BL |
632 | .It Cm DenyGroups |
633 | This keyword can be followed by a list of group name patterns, separated | |
634 | by spaces. | |
635 | Login is disallowed for users whose primary group or supplementary | |
636 | group list matches one of the patterns. | |
9f04903c BL |
637 | Only group names are valid; a numerical group ID is not recognized. |
638 | By default, login is allowed for all groups. | |
bf986a9e | 639 | The allow/deny groups directives are processed in the following order: |
ac73e513 | 640 | .Cm DenyGroups , |
ac73e513 | 641 | .Cm AllowGroups . |
0c2079d8 | 642 | .Pp |
fecfd118 | 643 | See PATTERNS in |
0c2079d8 DM |
644 | .Xr ssh_config 5 |
645 | for more information on patterns. | |
78571a5f | 646 | This keyword may appear multiple times in |
647 | .Nm | |
648 | with each instance appending to the list. | |
9f04903c BL |
649 | .It Cm DenyUsers |
650 | This keyword can be followed by a list of user name patterns, separated | |
651 | by spaces. | |
652 | Login is disallowed for user names that match one of the patterns. | |
9f04903c BL |
653 | Only user names are valid; a numerical user ID is not recognized. |
654 | By default, login is allowed for all users. | |
655 | If the pattern takes the form USER@HOST then USER and HOST | |
656 | are separately checked, restricting logins to particular | |
657 | users from particular hosts. | |
ee1e0a16 | 658 | HOST criteria may additionally contain addresses to match in CIDR |
659 | address/masklen format. | |
bf986a9e | 660 | The allow/deny users directives are processed in the following order: |
ac73e513 | 661 | .Cm DenyUsers , |
bf986a9e | 662 | .Cm AllowUsers . |
0c2079d8 | 663 | .Pp |
fecfd118 | 664 | See PATTERNS in |
0c2079d8 DM |
665 | .Xr ssh_config 5 |
666 | for more information on patterns. | |
78571a5f | 667 | This keyword may appear multiple times in |
668 | .Nm | |
669 | with each instance appending to the list. | |
7844f357 | 670 | .It Cm DisableForwarding |
671 | Disables all forwarding features, including X11, | |
672 | .Xr ssh-agent 1 , | |
673 | TCP and StreamLocal. | |
674 | This option overrides all other forwarding-related options and may | |
675 | simplify restricted configurations. | |
8f574959 | 676 | .It Cm ExposeAuthInfo |
5fa1407e | 677 | Writes a temporary file containing a list of authentication methods and |
8f574959 | 678 | public credentials (e.g. keys) used to authenticate the user. |
40962198 | 679 | The location of the file is exposed to the user session through the |
f17ee61c | 680 | .Ev SSH_USER_AUTH |
40962198 | 681 | environment variable. |
5fa1407e | 682 | The default is |
683 | .Cm no . | |
56d1c83c | 684 | .It Cm FingerprintHash |
685 | Specifies the hash algorithm used when logging key fingerprints. | |
686 | Valid options are: | |
aae4dbd4 | 687 | .Cm md5 |
56d1c83c | 688 | and |
aae4dbd4 | 689 | .Cm sha256 . |
56d1c83c | 690 | The default is |
aae4dbd4 | 691 | .Cm sha256 . |
e275443f DM |
692 | .It Cm ForceCommand |
693 | Forces the execution of the command specified by | |
694 | .Cm ForceCommand , | |
a1b48ccf DM |
695 | ignoring any command supplied by the client and |
696 | .Pa ~/.ssh/rc | |
697 | if present. | |
e275443f DM |
698 | The command is invoked by using the user's login shell with the -c option. |
699 | This applies to shell, command, or subsystem execution. | |
700 | It is most useful inside a | |
701 | .Cm Match | |
702 | block. | |
703 | The command originally supplied by the client is available in the | |
704 | .Ev SSH_ORIGINAL_COMMAND | |
705 | environment variable. | |
cdb6e651 | 706 | Specifying a command of |
aae4dbd4 | 707 | .Cm internal-sftp |
708 | will force the use of an in-process SFTP server that requires no support | |
cdb6e651 DM |
709 | files when used with |
710 | .Cm ChrootDirectory . | |
9fd04681 | 711 | The default is |
aae4dbd4 | 712 | .Cm none . |
9f04903c BL |
713 | .It Cm GatewayPorts |
714 | Specifies whether remote hosts are allowed to connect to ports | |
715 | forwarded for the client. | |
716 | By default, | |
5b0d63f8 | 717 | .Xr sshd 8 |
495dca35 DM |
718 | binds remote port forwardings to the loopback address. |
719 | This prevents other remote hosts from connecting to forwarded ports. | |
9f04903c | 720 | .Cm GatewayPorts |
5b0d63f8 | 721 | can be used to specify that sshd |
f91ee4c3 DM |
722 | should allow remote port forwardings to bind to non-loopback addresses, thus |
723 | allowing other hosts to connect. | |
724 | The argument may be | |
aae4dbd4 | 725 | .Cm no |
f91ee4c3 | 726 | to force remote port forwardings to be available to the local host only, |
aae4dbd4 | 727 | .Cm yes |
f91ee4c3 | 728 | to force remote port forwardings to bind to the wildcard address, or |
aae4dbd4 | 729 | .Cm clientspecified |
f91ee4c3 | 730 | to allow the client to select the address to which the forwarding is bound. |
9f04903c | 731 | The default is |
aae4dbd4 | 732 | .Cm no . |
0efd155c | 733 | .It Cm GSSAPIAuthentication |
9b7b03b2 | 734 | Specifies whether user authentication based on GSSAPI is allowed. |
a8e06cef | 735 | The default is |
aae4dbd4 | 736 | .Cm no . |
0efd155c DT |
737 | .It Cm GSSAPICleanupCredentials |
738 | Specifies whether to automatically destroy the user's credentials cache | |
739 | on logout. | |
740 | The default is | |
aae4dbd4 | 741 | .Cm yes . |
d7c31da4 | 742 | .It Cm GSSAPIStrictAcceptorCheck |
743 | Determines whether to be strict about the identity of the GSSAPI acceptor | |
744 | a client authenticates against. | |
745 | If set to | |
aae4dbd4 | 746 | .Cm yes |
747 | then the client must authenticate against the host | |
d7c31da4 | 748 | service on the current hostname. |
749 | If set to | |
aae4dbd4 | 750 | .Cm no |
d7c31da4 | 751 | then the client may authenticate against any service key stored in the |
752 | machine's default store. | |
753 | This facility is provided to assist with operation on multi homed machines. | |
754 | The default is | |
aae4dbd4 | 755 | .Cm yes . |
e9f78d6b | 756 | .It Cm HostbasedAcceptedAlgorithms |
8b8b6054 | 757 | Specifies the signature algorithms that will be accepted for hostbased |
758 | authentication as a list of comma-separated patterns. | |
4f9d75fb | 759 | Alternately if the specified list begins with a |
f9eca249 | 760 | .Sq + |
8b8b6054 | 761 | character, then the specified signature algorithms will be appended to |
762 | the default set instead of replacing them. | |
4f9d75fb | 763 | If the specified list begins with a |
68bc8cfa | 764 | .Sq - |
8b8b6054 | 765 | character, then the specified signature algorithms (including wildcards) |
766 | will be removed from the default set instead of replacing them. | |
91a2135f | 767 | If the specified list begins with a |
768 | .Sq ^ | |
8b8b6054 | 769 | character, then the specified signature algorithms will be placed at |
770 | the head of the default set. | |
3a1638dd | 771 | The default for this option is: |
772 | .Bd -literal -offset 3n | |
12ae8f95 | 773 | ssh-ed25519-cert-v01@openssh.com, |
3a1638dd | 774 | ecdsa-sha2-nistp256-cert-v01@openssh.com, |
775 | ecdsa-sha2-nistp384-cert-v01@openssh.com, | |
776 | ecdsa-sha2-nistp521-cert-v01@openssh.com, | |
ae024b22 | 777 | sk-ssh-ed25519-cert-v01@openssh.com, |
12ae8f95 | 778 | sk-ecdsa-sha2-nistp256-cert-v01@openssh.com, |
aa4c640d | 779 | rsa-sha2-512-cert-v01@openssh.com, |
780 | rsa-sha2-256-cert-v01@openssh.com, | |
12ae8f95 | 781 | ssh-ed25519, |
3a1638dd | 782 | ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521, |
12ae8f95 | 783 | sk-ssh-ed25519@openssh.com, |
ae024b22 | 784 | sk-ecdsa-sha2-nistp256@openssh.com, |
da403552 | 785 | rsa-sha2-512,rsa-sha2-256 |
3a1638dd | 786 | .Ed |
787 | .Pp | |
8b8b6054 | 788 | The list of available signature algorithms may also be obtained using |
e9f78d6b | 789 | .Qq ssh -Q HostbasedAcceptedAlgorithms . |
790 | This was formerly named HostbasedAcceptedKeyTypes. | |
9f04903c BL |
791 | .It Cm HostbasedAuthentication |
792 | Specifies whether rhosts or /etc/hosts.equiv authentication together | |
793 | with successful public key client host authentication is allowed | |
1faa7133 | 794 | (host-based authentication). |
9f04903c | 795 | The default is |
aae4dbd4 | 796 | .Cm no . |
b594f38b DM |
797 | .It Cm HostbasedUsesNameFromPacketOnly |
798 | Specifies whether or not the server will attempt to perform a reverse | |
799 | name lookup when matching the name in the | |
800 | .Pa ~/.shosts , | |
801 | .Pa ~/.rhosts , | |
802 | and | |
803 | .Pa /etc/hosts.equiv | |
804 | files during | |
805 | .Cm HostbasedAuthentication . | |
806 | A setting of | |
aae4dbd4 | 807 | .Cm yes |
b594f38b DM |
808 | means that |
809 | .Xr sshd 8 | |
810 | uses the name supplied by the client rather than | |
811 | attempting to resolve the name from the TCP connection itself. | |
812 | The default is | |
aae4dbd4 | 813 | .Cm no . |
0a80ca19 DM |
814 | .It Cm HostCertificate |
815 | Specifies a file containing a public host certificate. | |
816 | The certificate's public key must match a private host key already specified | |
817 | by | |
818 | .Cm HostKey . | |
819 | The default behaviour of | |
820 | .Xr sshd 8 | |
821 | is not to load any certificates. | |
9f04903c BL |
822 | .It Cm HostKey |
823 | Specifies a file containing a private host key | |
824 | used by SSH. | |
ffe6549c | 825 | The defaults are |
8ba0ead6 DM |
826 | .Pa /etc/ssh/ssh_host_ecdsa_key , |
827 | .Pa /etc/ssh/ssh_host_ed25519_key | |
9f04903c | 828 | and |
ffe6549c | 829 | .Pa /etc/ssh/ssh_host_rsa_key . |
3a1638dd | 830 | .Pp |
9f04903c | 831 | Note that |
5b0d63f8 | 832 | .Xr sshd 8 |
3a1638dd | 833 | will refuse to use a file if it is group/world-accessible |
834 | and that the | |
835 | .Cm HostKeyAlgorithms | |
836 | option restricts which of the keys are actually used by | |
837 | .Xr sshd 8 . | |
838 | .Pp | |
9f04903c | 839 | It is possible to have multiple host key files. |
85b45e09 DM |
840 | It is also possible to specify public host key files instead. |
841 | In this case operations on the private key will be delegated | |
842 | to an | |
843 | .Xr ssh-agent 1 . | |
844 | .It Cm HostKeyAgent | |
845 | Identifies the UNIX-domain socket used to communicate | |
846 | with an agent that has access to the private host keys. | |
1a75d14d | 847 | If the string |
aae4dbd4 | 848 | .Qq SSH_AUTH_SOCK |
85b45e09 DM |
849 | is specified, the location of the socket will be read from the |
850 | .Ev SSH_AUTH_SOCK | |
851 | environment variable. | |
3a1638dd | 852 | .It Cm HostKeyAlgorithms |
8b8b6054 | 853 | Specifies the host key signature algorithms |
3a1638dd | 854 | that the server offers. |
855 | The default for this option is: | |
856 | .Bd -literal -offset 3n | |
12ae8f95 | 857 | ssh-ed25519-cert-v01@openssh.com, |
3a1638dd | 858 | ecdsa-sha2-nistp256-cert-v01@openssh.com, |
859 | ecdsa-sha2-nistp384-cert-v01@openssh.com, | |
860 | ecdsa-sha2-nistp521-cert-v01@openssh.com, | |
ae024b22 | 861 | sk-ssh-ed25519-cert-v01@openssh.com, |
12ae8f95 | 862 | sk-ecdsa-sha2-nistp256-cert-v01@openssh.com, |
aa4c640d | 863 | rsa-sha2-512-cert-v01@openssh.com, |
864 | rsa-sha2-256-cert-v01@openssh.com, | |
12ae8f95 | 865 | ssh-ed25519, |
3a1638dd | 866 | ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521, |
12ae8f95 | 867 | sk-ssh-ed25519@openssh.com, |
ae024b22 | 868 | sk-ecdsa-sha2-nistp256@openssh.com, |
da403552 | 869 | rsa-sha2-512,rsa-sha2-256 |
3a1638dd | 870 | .Ed |
871 | .Pp | |
8b8b6054 | 872 | The list of available signature algorithms may also be obtained using |
d4d9e1d4 | 873 | .Qq ssh -Q HostKeyAlgorithms . |
9f04903c | 874 | .It Cm IgnoreRhosts |
c90f72d2 | 875 | Specifies whether to ignore per-user |
9f04903c BL |
876 | .Pa .rhosts |
877 | and | |
878 | .Pa .shosts | |
c90f72d2 | 879 | files during |
9f04903c | 880 | .Cm HostbasedAuthentication . |
c90f72d2 | 881 | The system-wide |
9f04903c BL |
882 | .Pa /etc/hosts.equiv |
883 | and | |
884 | .Pa /etc/shosts.equiv | |
c90f72d2 | 885 | are still used regardless of this setting. |
886 | .Pp | |
887 | Accepted values are | |
888 | .Cm yes | |
889 | (the default) to ignore all per-user files, | |
890 | .Cm shosts-only | |
891 | to allow the use of | |
892 | .Pa .shosts | |
893 | but to ignore | |
894 | .Pa .rhosts | |
895 | or | |
896 | .Cm no | |
897 | to allow both | |
898 | .Pa .shosts | |
899 | and | |
4e04f46f | 900 | .Pa rhosts . |
9f04903c BL |
901 | .It Cm IgnoreUserKnownHosts |
902 | Specifies whether | |
5b0d63f8 | 903 | .Xr sshd 8 |
9f04903c | 904 | should ignore the user's |
167ea5d0 | 905 | .Pa ~/.ssh/known_hosts |
9f04903c | 906 | during |
62562cea | 907 | .Cm HostbasedAuthentication |
908 | and use only the system-wide known hosts file | |
21042a05 | 909 | .Pa /etc/ssh/ssh_known_hosts . |
9f04903c | 910 | The default is |
c2bd7f74 | 911 | .Dq no . |
912 | .It Cm Include | |
913 | Include the specified configuration file(s). | |
6fb3dd0c | 914 | Multiple pathnames may be specified and each pathname may contain |
c2bd7f74 | 915 | .Xr glob 7 |
188e332d | 916 | wildcards that will be expanded and processed in lexical order. |
c2bd7f74 | 917 | Files without absolute paths are assumed to be in |
918 | .Pa /etc/ssh . | |
6fb3dd0c | 919 | An |
c2bd7f74 | 920 | .Cm Include |
921 | directive may appear inside a | |
922 | .Cm Match | |
923 | block | |
924 | to perform conditional inclusion. | |
0dac6fb6 DM |
925 | .It Cm IPQoS |
926 | Specifies the IPv4 type-of-service or DSCP class for the connection. | |
927 | Accepted values are | |
aae4dbd4 | 928 | .Cm af11 , |
929 | .Cm af12 , | |
930 | .Cm af13 , | |
931 | .Cm af21 , | |
932 | .Cm af22 , | |
933 | .Cm af23 , | |
934 | .Cm af31 , | |
935 | .Cm af32 , | |
936 | .Cm af33 , | |
937 | .Cm af41 , | |
938 | .Cm af42 , | |
939 | .Cm af43 , | |
940 | .Cm cs0 , | |
941 | .Cm cs1 , | |
942 | .Cm cs2 , | |
943 | .Cm cs3 , | |
944 | .Cm cs4 , | |
945 | .Cm cs5 , | |
946 | .Cm cs6 , | |
947 | .Cm cs7 , | |
948 | .Cm ef , | |
4594c762 | 949 | .Cm le , |
aae4dbd4 | 950 | .Cm lowdelay , |
951 | .Cm throughput , | |
952 | .Cm reliability , | |
51676ec6 | 953 | a numeric value, or |
954 | .Cm none | |
955 | to use the operating system default. | |
928362dc | 956 | This option may take one or two arguments, separated by whitespace. |
0dac6fb6 DM |
957 | If one argument is specified, it is used as the packet class unconditionally. |
958 | If two values are specified, the first is automatically selected for | |
959 | interactive sessions and the second for non-interactive sessions. | |
960 | The default is | |
5ee8448a | 961 | .Cm af21 |
3e36f281 | 962 | (Low-Latency Data) |
0dac6fb6 | 963 | for interactive sessions and |
5ee8448a | 964 | .Cm cs1 |
3e36f281 | 965 | (Lower Effort) |
0dac6fb6 | 966 | for non-interactive sessions. |
e1e480ae DM |
967 | .It Cm KbdInteractiveAuthentication |
968 | Specifies whether to allow keyboard-interactive authentication. | |
c73b02d9 | 969 | All authentication styles from |
970 | .Xr login.conf 5 | |
971 | are supported. | |
972 | The default is | |
973 | .Cm yes . | |
e1e480ae | 974 | The argument to this keyword must be |
aae4dbd4 | 975 | .Cm yes |
e1e480ae | 976 | or |
aae4dbd4 | 977 | .Cm no . |
e1e480ae | 978 | .Cm ChallengeResponseAuthentication |
c73b02d9 | 979 | is a deprecated alias for this. |
9f04903c | 980 | .It Cm KerberosAuthentication |
1a0c0b96 | 981 | Specifies whether the password provided by the user for |
9f04903c | 982 | .Cm PasswordAuthentication |
1a0c0b96 | 983 | will be validated through the Kerberos KDC. |
9f04903c BL |
984 | To use this option, the server needs a |
985 | Kerberos servtab which allows the verification of the KDC's identity. | |
5b0d63f8 | 986 | The default is |
aae4dbd4 | 987 | .Cm no . |
8448e667 | 988 | .It Cm KerberosGetAFSToken |
e2dd2d5b | 989 | If AFS is active and the user has a Kerberos 5 TGT, attempt to acquire |
8448e667 | 990 | an AFS token before accessing the user's home directory. |
5b0d63f8 | 991 | The default is |
aae4dbd4 | 992 | .Cm no . |
9f04903c | 993 | .It Cm KerberosOrLocalPasswd |
5b0d63f8 | 994 | If password authentication through Kerberos fails then |
9f04903c BL |
995 | the password will be validated via any additional local mechanism |
996 | such as | |
997 | .Pa /etc/passwd . | |
5b0d63f8 | 998 | The default is |
aae4dbd4 | 999 | .Cm yes . |
9f04903c BL |
1000 | .It Cm KerberosTicketCleanup |
1001 | Specifies whether to automatically destroy the user's ticket cache | |
1002 | file on logout. | |
5b0d63f8 | 1003 | The default is |
aae4dbd4 | 1004 | .Cm yes . |
d5f62bf2 DM |
1005 | .It Cm KexAlgorithms |
1006 | Specifies the available KEX (Key Exchange) algorithms. | |
1007 | Multiple algorithms must be comma-separated. | |
4f9d75fb | 1008 | Alternately if the specified list begins with a |
f9eca249 | 1009 | .Sq + |
eb4362e5 | 1010 | character, then the specified algorithms will be appended to the default set |
f9eca249 | 1011 | instead of replacing them. |
4f9d75fb | 1012 | If the specified list begins with a |
68bc8cfa | 1013 | .Sq - |
eb4362e5 | 1014 | character, then the specified algorithms (including wildcards) will be removed |
68bc8cfa | 1015 | from the default set instead of replacing them. |
91a2135f | 1016 | If the specified list begins with a |
1017 | .Sq ^ | |
eb4362e5 | 1018 | character, then the specified algorithms will be placed at the head of the |
91a2135f | 1019 | default set. |
c1621c84 DM |
1020 | The supported algorithms are: |
1021 | .Pp | |
1022 | .Bl -item -compact -offset indent | |
1023 | .It | |
16277fc4 | 1024 | curve25519-sha256 |
1025 | .It | |
c1621c84 DM |
1026 | curve25519-sha256@libssh.org |
1027 | .It | |
1028 | diffie-hellman-group1-sha1 | |
1029 | .It | |
1030 | diffie-hellman-group14-sha1 | |
1031 | .It | |
680321f3 | 1032 | diffie-hellman-group14-sha256 |
1033 | .It | |
1034 | diffie-hellman-group16-sha512 | |
1035 | .It | |
1036 | diffie-hellman-group18-sha512 | |
1037 | .It | |
c1621c84 DM |
1038 | diffie-hellman-group-exchange-sha1 |
1039 | .It | |
1040 | diffie-hellman-group-exchange-sha256 | |
1041 | .It | |
1042 | ecdh-sha2-nistp256 | |
1043 | .It | |
1044 | ecdh-sha2-nistp384 | |
1045 | .It | |
1046 | ecdh-sha2-nistp521 | |
56bced43 | 1047 | .It |
2c71cec0 | 1048 | sntrup761x25519-sha512@openssh.com |
c1621c84 DM |
1049 | .El |
1050 | .Pp | |
1051 | The default is: | |
6575c3ac | 1052 | .Bd -literal -offset indent |
a9f23ea2 | 1053 | sntrup761x25519-sha512@openssh.com, |
16277fc4 | 1054 | curve25519-sha256,curve25519-sha256@libssh.org, |
6575c3ac DM |
1055 | ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521, |
1056 | diffie-hellman-group-exchange-sha256, | |
680321f3 | 1057 | diffie-hellman-group16-sha512,diffie-hellman-group18-sha512, |
0b813436 | 1058 | diffie-hellman-group14-sha256 |
6575c3ac | 1059 | .Ed |
8f6784f0 | 1060 | .Pp |
aae4dbd4 | 1061 | The list of available key exchange algorithms may also be obtained using |
d4d9e1d4 | 1062 | .Qq ssh -Q KexAlgorithms . |
9f04903c BL |
1063 | .It Cm ListenAddress |
1064 | Specifies the local addresses | |
5b0d63f8 | 1065 | .Xr sshd 8 |
9f04903c BL |
1066 | should listen on. |
1067 | The following forms may be used: | |
1068 | .Pp | |
1069 | .Bl -item -offset indent -compact | |
1070 | .It | |
1071 | .Cm ListenAddress | |
1072 | .Sm off | |
7530e77b | 1073 | .Ar hostname | address |
9f04903c | 1074 | .Sm on |
68d3bbb2 | 1075 | .Op Cm rdomain Ar domain |
9f04903c BL |
1076 | .It |
1077 | .Cm ListenAddress | |
1078 | .Sm off | |
7530e77b | 1079 | .Ar hostname : port |
9f04903c | 1080 | .Sm on |
68d3bbb2 | 1081 | .Op Cm rdomain Ar domain |
acf559e1 | 1082 | .It |
1083 | .Cm ListenAddress | |
1084 | .Sm off | |
7530e77b | 1085 | .Ar IPv4_address : port |
acf559e1 | 1086 | .Sm on |
68d3bbb2 | 1087 | .Op Cm rdomain Ar domain |
9f04903c BL |
1088 | .It |
1089 | .Cm ListenAddress | |
1090 | .Sm off | |
7530e77b | 1091 | .Oo Ar hostname | address Oc : Ar port |
9f04903c | 1092 | .Sm on |
68d3bbb2 | 1093 | .Op Cm rdomain Ar domain |
9f04903c BL |
1094 | .El |
1095 | .Pp | |
acf559e1 | 1096 | The optional |
1097 | .Cm rdomain | |
1098 | qualifier requests | |
1099 | .Xr sshd 8 | |
1100 | listen in an explicit routing domain. | |
9f04903c BL |
1101 | If |
1102 | .Ar port | |
1103 | is not specified, | |
531a57a3 | 1104 | sshd will listen on the address and all |
9f04903c | 1105 | .Cm Port |
fbf486b4 | 1106 | options specified. |
acf559e1 | 1107 | The default is to listen on all local addresses on the current default |
1108 | routing domain. | |
495dca35 | 1109 | Multiple |
9f04903c | 1110 | .Cm ListenAddress |
fbf486b4 | 1111 | options are permitted. |
acf559e1 | 1112 | For more information on routing domains, see |
7530e77b | 1113 | .Xr rdomain 4 . |
9f04903c BL |
1114 | .It Cm LoginGraceTime |
1115 | The server disconnects after this time if the user has not | |
1116 | successfully logged in. | |
1117 | If the value is 0, there is no time limit. | |
c1348630 | 1118 | The default is 120 seconds. |
9f04903c BL |
1119 | .It Cm LogLevel |
1120 | Gives the verbosity level that is used when logging messages from | |
f4f22b54 | 1121 | .Xr sshd 8 . |
9f04903c | 1122 | The possible values are: |
5b0d63f8 | 1123 | QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3. |
495dca35 DM |
1124 | The default is INFO. |
1125 | DEBUG and DEBUG1 are equivalent. | |
1126 | DEBUG2 and DEBUG3 each specify higher levels of debugging output. | |
1127 | Logging with a DEBUG level violates the privacy of users and is not recommended. | |
793b583d | 1128 | .It Cm LogVerbose |
1129 | Specify one or more overrides to LogLevel. | |
1130 | An override consists of a pattern lists that matches the source file, function | |
1131 | and line number to force detailed logging for. | |
1132 | For example, an override pattern of: | |
1133 | .Bd -literal -offset indent | |
1134 | kex.c:*:1000,*:kex_exchange_identification():*,packet.c:* | |
1135 | .Ed | |
1136 | .Pp | |
1137 | would enable detailed logging for line 1000 of | |
616029a8 | 1138 | .Pa kex.c , |
793b583d | 1139 | everything in the |
1140 | .Fn kex_exchange_identification | |
1141 | function, and all code in the | |
1142 | .Pa packet.c | |
1143 | file. | |
1144 | This option is intended for debugging and no overrides are enabled by default. | |
9f04903c BL |
1145 | .It Cm MACs |
1146 | Specifies the available MAC (message authentication code) algorithms. | |
a685ae8d | 1147 | The MAC algorithm is used for data integrity protection. |
9f04903c | 1148 | Multiple algorithms must be comma-separated. |
4f9d75fb | 1149 | If the specified list begins with a |
f9eca249 | 1150 | .Sq + |
1151 | character, then the specified algorithms will be appended to the default set | |
1152 | instead of replacing them. | |
4f9d75fb | 1153 | If the specified list begins with a |
68bc8cfa | 1154 | .Sq - |
1155 | character, then the specified algorithms (including wildcards) will be removed | |
1156 | from the default set instead of replacing them. | |
91a2135f | 1157 | If the specified list begins with a |
1158 | .Sq ^ | |
1159 | character, then the specified algorithms will be placed at the head of the | |
1160 | default set. | |
f9eca249 | 1161 | .Pp |
af43a7ac | 1162 | The algorithms that contain |
aae4dbd4 | 1163 | .Qq -etm |
af43a7ac DM |
1164 | calculate the MAC after encryption (encrypt-then-mac). |
1165 | These are considered safer and their use recommended. | |
c1621c84 DM |
1166 | The supported MACs are: |
1167 | .Pp | |
1168 | .Bl -item -compact -offset indent | |
1169 | .It | |
1170 | hmac-md5 | |
1171 | .It | |
1172 | hmac-md5-96 | |
1173 | .It | |
c1621c84 DM |
1174 | hmac-sha1 |
1175 | .It | |
1176 | hmac-sha1-96 | |
1177 | .It | |
1178 | hmac-sha2-256 | |
1179 | .It | |
1180 | hmac-sha2-512 | |
1181 | .It | |
1182 | umac-64@openssh.com | |
1183 | .It | |
1184 | umac-128@openssh.com | |
1185 | .It | |
1186 | hmac-md5-etm@openssh.com | |
1187 | .It | |
1188 | hmac-md5-96-etm@openssh.com | |
1189 | .It | |
c1621c84 DM |
1190 | hmac-sha1-etm@openssh.com |
1191 | .It | |
1192 | hmac-sha1-96-etm@openssh.com | |
1193 | .It | |
1194 | hmac-sha2-256-etm@openssh.com | |
1195 | .It | |
1196 | hmac-sha2-512-etm@openssh.com | |
1197 | .It | |
1198 | umac-64-etm@openssh.com | |
1199 | .It | |
1200 | umac-128-etm@openssh.com | |
1201 | .El | |
1202 | .Pp | |
5b0d63f8 | 1203 | The default is: |
22b7b493 | 1204 | .Bd -literal -offset indent |
af43a7ac DM |
1205 | umac-64-etm@openssh.com,umac-128-etm@openssh.com, |
1206 | hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com, | |
e4c918a6 | 1207 | hmac-sha1-etm@openssh.com, |
c1621c84 | 1208 | umac-64@openssh.com,umac-128@openssh.com, |
e4c918a6 | 1209 | hmac-sha2-256,hmac-sha2-512,hmac-sha1 |
22b7b493 | 1210 | .Ed |
8f6784f0 | 1211 | .Pp |
aae4dbd4 | 1212 | The list of available MAC algorithms may also be obtained using |
1213 | .Qq ssh -Q mac . | |
4515047e | 1214 | .It Cm Match |
d04f357a | 1215 | Introduces a conditional block. |
8c23403b | 1216 | If all of the criteria on the |
4515047e | 1217 | .Cm Match |
8c23403b DM |
1218 | line are satisfied, the keywords on the following lines override those |
1219 | set in the global section of the config file, until either another | |
4515047e | 1220 | .Cm Match |
8c23403b | 1221 | line or the end of the file. |
fc5d6759 DM |
1222 | If a keyword appears in multiple |
1223 | .Cm Match | |
180bcb40 | 1224 | blocks that are satisfied, only the first instance of the keyword is |
fc5d6759 | 1225 | applied. |
7a3935de | 1226 | .Pp |
d04f357a | 1227 | The arguments to |
4515047e | 1228 | .Cm Match |
cf31f386 DM |
1229 | are one or more criteria-pattern pairs or the single token |
1230 | .Cm All | |
1231 | which matches all criteria. | |
4515047e DT |
1232 | The available criteria are |
1233 | .Cm User , | |
565ca3f6 | 1234 | .Cm Group , |
4515047e | 1235 | .Cm Host , |
fbcf8275 DT |
1236 | .Cm LocalAddress , |
1237 | .Cm LocalPort , | |
68af80e6 | 1238 | .Cm RDomain , |
4515047e | 1239 | and |
68af80e6 | 1240 | .Cm Address |
1241 | (with | |
1242 | .Cm RDomain | |
1243 | representing the | |
1244 | .Xr rdomain 4 | |
62949c5b | 1245 | on which the connection was received). |
68af80e6 | 1246 | .Pp |
7a3935de DT |
1247 | The match patterns may consist of single entries or comma-separated |
1248 | lists and may use the wildcard and negation operators described in the | |
aae4dbd4 | 1249 | .Sx PATTERNS |
1250 | section of | |
b06cc4ab | 1251 | .Xr ssh_config 5 . |
7a3935de DT |
1252 | .Pp |
1253 | The patterns in an | |
1254 | .Cm Address | |
1255 | criteria may additionally contain addresses to match in CIDR | |
aae4dbd4 | 1256 | address/masklen format, |
1257 | such as 192.0.2.0/24 or 2001:db8::/32. | |
7a3935de DT |
1258 | Note that the mask length provided must be consistent with the address - |
1259 | it is an error to specify a mask length that is too long for the address | |
6a2a400f | 1260 | or one with bits set in this host portion of the address. |
aae4dbd4 | 1261 | For example, 192.0.2.0/33 and 192.0.2.0/8, respectively. |
7a3935de | 1262 | .Pp |
4515047e DT |
1263 | Only a subset of keywords may be used on the lines following a |
1264 | .Cm Match | |
1265 | keyword. | |
1266 | Available keywords are | |
f8268503 | 1267 | .Cm AcceptEnv , |
17819015 | 1268 | .Cm AllowAgentForwarding , |
f8268503 | 1269 | .Cm AllowGroups , |
18a208d6 | 1270 | .Cm AllowStreamLocalForwarding , |
9b439df1 | 1271 | .Cm AllowTcpForwarding , |
c24da770 | 1272 | .Cm AllowUsers , |
a6e3f01d | 1273 | .Cm AuthenticationMethods , |
09d3e125 DM |
1274 | .Cm AuthorizedKeysCommand , |
1275 | .Cm AuthorizedKeysCommandUser , | |
f33580ee | 1276 | .Cm AuthorizedKeysFile , |
b6b9108f | 1277 | .Cm AuthorizedPrincipalsCommand , |
1278 | .Cm AuthorizedPrincipalsCommandUser , | |
ab6de351 | 1279 | .Cm AuthorizedPrincipalsFile , |
1629c07c | 1280 | .Cm Banner , |
002d65b0 | 1281 | .Cm CASignatureAlgorithms , |
0293c198 | 1282 | .Cm ChannelTimeout , |
797e3d11 | 1283 | .Cm ChrootDirectory , |
f0ddedee | 1284 | .Cm ClientAliveCountMax , |
1285 | .Cm ClientAliveInterval , | |
c24da770 DM |
1286 | .Cm DenyGroups , |
1287 | .Cm DenyUsers , | |
16448ff5 | 1288 | .Cm DisableForwarding , |
002d65b0 | 1289 | .Cm ExposeAuthInfo , |
e275443f | 1290 | .Cm ForceCommand , |
18a208d6 | 1291 | .Cm GatewayPorts , |
bd49da2e | 1292 | .Cm GSSAPIAuthentication , |
e9f78d6b | 1293 | .Cm HostbasedAcceptedAlgorithms , |
25434de4 | 1294 | .Cm HostbasedAuthentication , |
ab6de351 | 1295 | .Cm HostbasedUsesNameFromPacketOnly , |
321c7147 | 1296 | .Cm IgnoreRhosts , |
a6ac5d36 | 1297 | .Cm Include , |
18a208d6 | 1298 | .Cm IPQoS , |
1d75f22c | 1299 | .Cm KbdInteractiveAuthentication , |
5737e363 | 1300 | .Cm KerberosAuthentication , |
54cd41a4 | 1301 | .Cm LogLevel , |
307c1d10 | 1302 | .Cm MaxAuthTries , |
c62a5af2 | 1303 | .Cm MaxSessions , |
1629c07c | 1304 | .Cm PasswordAuthentication , |
51bde600 | 1305 | .Cm PermitEmptyPasswords , |
04df4320 | 1306 | .Cm PermitListen , |
d1de9950 | 1307 | .Cm PermitOpen , |
15f94271 | 1308 | .Cm PermitRootLogin , |
5ff30c6b | 1309 | .Cm PermitTTY , |
ab6de351 | 1310 | .Cm PermitTunnel , |
72e6b5c9 | 1311 | .Cm PermitUserRC , |
ee9c0da8 | 1312 | .Cm PubkeyAcceptedAlgorithms , |
1477ea16 | 1313 | .Cm PubkeyAuthentication , |
002d65b0 | 1314 | .Cm PubkeyAuthOptions , |
5f96f3b4 | 1315 | .Cm RekeyLimit , |
18a208d6 | 1316 | .Cm RevokedKeys , |
35eb33fb | 1317 | .Cm RDomain , |
28013759 | 1318 | .Cm SetEnv , |
18a208d6 | 1319 | .Cm StreamLocalBindMask , |
1320 | .Cm StreamLocalBindUnlink , | |
1321 | .Cm TrustedUserCAKeys , | |
0293c198 | 1322 | .Cm UnusedConnectionTimeout , |
d1de9950 | 1323 | .Cm X11DisplayOffset , |
19913847 | 1324 | .Cm X11Forwarding |
4515047e | 1325 | and |
76af9c57 | 1326 | .Cm X11UseLocalhost . |
89413dba DT |
1327 | .It Cm MaxAuthTries |
1328 | Specifies the maximum number of authentication attempts permitted per | |
26213e55 DM |
1329 | connection. |
1330 | Once the number of failures reaches half this value, | |
1331 | additional failures are logged. | |
1332 | The default is 6. | |
7207f64a | 1333 | .It Cm MaxSessions |
cac3b666 | 1334 | Specifies the maximum number of open shell, login or subsystem (e.g. sftp) |
1335 | sessions permitted per network connection. | |
1336 | Multiple sessions may be established by clients that support connection | |
1337 | multiplexing. | |
1338 | Setting | |
1339 | .Cm MaxSessions | |
1340 | to 1 will effectively disable session multiplexing, whereas setting it to 0 | |
1341 | will prevent all shell, login and subsystem sessions while still permitting | |
1342 | forwarding. | |
7207f64a | 1343 | The default is 10. |
9f04903c BL |
1344 | .It Cm MaxStartups |
1345 | Specifies the maximum number of concurrent unauthenticated connections to the | |
5b0d63f8 | 1346 | SSH daemon. |
9f04903c BL |
1347 | Additional connections will be dropped until authentication succeeds or the |
1348 | .Cm LoginGraceTime | |
1349 | expires for a connection. | |
1f583df8 | 1350 | The default is 10:30:100. |
9f04903c BL |
1351 | .Pp |
1352 | Alternatively, random early drop can be enabled by specifying | |
1353 | the three colon separated values | |
aae4dbd4 | 1354 | start:rate:full (e.g. "10:30:60"). |
f4f22b54 | 1355 | .Xr sshd 8 |
aae4dbd4 | 1356 | will refuse connection attempts with a probability of rate/100 (30%) |
1357 | if there are currently start (10) unauthenticated connections. | |
9f04903c | 1358 | The probability increases linearly and all connection attempts |
aae4dbd4 | 1359 | are refused if the number of unauthenticated connections reaches full (60). |
88057eb6 | 1360 | .It Cm ModuliFile |
1361 | Specifies the | |
1362 | .Xr moduli 5 | |
1363 | file that contains the Diffie-Hellman groups used for the | |
1364 | .Dq diffie-hellman-group-exchange-sha1 | |
1365 | and | |
1366 | .Dq diffie-hellman-group-exchange-sha256 | |
1367 | key exchange methods. | |
1368 | The default is | |
1369 | .Pa /etc/moduli . | |
9f04903c BL |
1370 | .It Cm PasswordAuthentication |
1371 | Specifies whether password authentication is allowed. | |
1372 | The default is | |
aae4dbd4 | 1373 | .Cm yes . |
9f04903c BL |
1374 | .It Cm PermitEmptyPasswords |
1375 | When password authentication is allowed, it specifies whether the | |
1376 | server allows login to accounts with empty password strings. | |
1377 | The default is | |
aae4dbd4 | 1378 | .Cm no . |
04df4320 | 1379 | .It Cm PermitListen |
1380 | Specifies the addresses/ports on which a remote TCP port forwarding may listen. | |
1381 | The listen specification must be one of the following forms: | |
1382 | .Pp | |
1383 | .Bl -item -offset indent -compact | |
1384 | .It | |
1385 | .Cm PermitListen | |
1386 | .Sm off | |
87ddd676 | 1387 | .Ar port |
04df4320 | 1388 | .Sm on |
1389 | .It | |
1390 | .Cm PermitListen | |
1391 | .Sm off | |
87ddd676 | 1392 | .Ar host : port |
04df4320 | 1393 | .Sm on |
1394 | .El | |
1395 | .Pp | |
1396 | Multiple permissions may be specified by separating them with whitespace. | |
1397 | An argument of | |
1398 | .Cm any | |
1399 | can be used to remove all restrictions and permit any listen requests. | |
1400 | An argument of | |
1401 | .Cm none | |
1402 | can be used to prohibit all listen requests. | |
1403 | The host name may contain wildcards as described in the PATTERNS section in | |
1404 | .Xr ssh_config 5 . | |
1405 | The wildcard | |
1406 | .Sq * | |
1407 | can also be used in place of a port number to allow all ports. | |
1408 | By default all port forwarding listen requests are permitted. | |
6ff6fda7 | 1409 | Note that the |
04df4320 | 1410 | .Cm GatewayPorts |
1411 | option may further restrict which addresses may be listened on. | |
87ddd676 | 1412 | Note also that |
1413 | .Xr ssh 1 | |
1414 | will request a listen host of | |
1415 | .Dq localhost | |
177d6c80 | 1416 | if no listen host was specifically requested, and this name is |
f535ff92 | 1417 | treated differently to explicit localhost addresses of |
87ddd676 | 1418 | .Dq 127.0.0.1 |
1419 | and | |
1420 | .Dq ::1 . | |
9b439df1 DM |
1421 | .It Cm PermitOpen |
1422 | Specifies the destinations to which TCP port forwarding is permitted. | |
1423 | The forwarding specification must be one of the following forms: | |
1424 | .Pp | |
1425 | .Bl -item -offset indent -compact | |
1426 | .It | |
1427 | .Cm PermitOpen | |
1428 | .Sm off | |
1429 | .Ar host : port | |
1430 | .Sm on | |
1431 | .It | |
1432 | .Cm PermitOpen | |
1433 | .Sm off | |
1434 | .Ar IPv4_addr : port | |
1435 | .Sm on | |
1436 | .It | |
1437 | .Cm PermitOpen | |
1438 | .Sm off | |
1439 | .Ar \&[ IPv6_addr \&] : port | |
1440 | .Sm on | |
1441 | .El | |
1442 | .Pp | |
a765cf4b | 1443 | Multiple forwards may be specified by separating them with whitespace. |
9b439df1 | 1444 | An argument of |
aae4dbd4 | 1445 | .Cm any |
9b439df1 | 1446 | can be used to remove all restrictions and permit any forwarding requests. |
ba9ea320 | 1447 | An argument of |
aae4dbd4 | 1448 | .Cm none |
ba9ea320 | 1449 | can be used to prohibit all forwarding requests. |
32d921c3 | 1450 | The wildcard |
aae4dbd4 | 1451 | .Sq * |
734f2f83 | 1452 | can be used for host or port to allow all hosts or ports respectively. |
1453 | Otherwise, no pattern matching or address lookups are performed on supplied | |
1454 | names. | |
65bc2c40 | 1455 | By default all port forwarding requests are permitted. |
9f04903c | 1456 | .It Cm PermitRootLogin |
b3509014 | 1457 | Specifies whether root can log in using |
9f04903c BL |
1458 | .Xr ssh 1 . |
1459 | The argument must be | |
aae4dbd4 | 1460 | .Cm yes , |
1461 | .Cm prohibit-password , | |
aae4dbd4 | 1462 | .Cm forced-commands-only , |
9f04903c | 1463 | or |
aae4dbd4 | 1464 | .Cm no . |
9f04903c | 1465 | The default is |
aae4dbd4 | 1466 | .Cm prohibit-password . |
9f04903c BL |
1467 | .Pp |
1468 | If this option is set to | |
aae4dbd4 | 1469 | .Cm prohibit-password |
071325f4 | 1470 | (or its deprecated alias, |
1471 | .Cm without-password ) , | |
1dc8d93c | 1472 | password and keyboard-interactive authentication are disabled for root. |
9f04903c BL |
1473 | .Pp |
1474 | If this option is set to | |
aae4dbd4 | 1475 | .Cm forced-commands-only , |
9f04903c BL |
1476 | root login with public key authentication will be allowed, |
1477 | but only if the | |
1478 | .Ar command | |
1479 | option has been specified | |
1480 | (which may be useful for taking remote backups even if root login is | |
fbf486b4 DM |
1481 | normally not allowed). |
1482 | All other authentication methods are disabled for root. | |
9f04903c BL |
1483 | .Pp |
1484 | If this option is set to | |
aae4dbd4 | 1485 | .Cm no , |
b3509014 | 1486 | root is not allowed to log in. |
f219fc8f | 1487 | .It Cm PermitTTY |
1488 | Specifies whether | |
1489 | .Xr pty 4 | |
1490 | allocation is permitted. | |
1491 | The default is | |
aae4dbd4 | 1492 | .Cm yes . |
d27b9471 DM |
1493 | .It Cm PermitTunnel |
1494 | Specifies whether | |
1495 | .Xr tun 4 | |
1496 | device forwarding is allowed. | |
7b58e800 | 1497 | The argument must be |
aae4dbd4 | 1498 | .Cm yes , |
1499 | .Cm point-to-point | |
991dba43 | 1500 | (layer 3), |
aae4dbd4 | 1501 | .Cm ethernet |
991dba43 | 1502 | (layer 2), or |
aae4dbd4 | 1503 | .Cm no . |
991dba43 | 1504 | Specifying |
aae4dbd4 | 1505 | .Cm yes |
991dba43 | 1506 | permits both |
aae4dbd4 | 1507 | .Cm point-to-point |
991dba43 | 1508 | and |
aae4dbd4 | 1509 | .Cm ethernet . |
d27b9471 | 1510 | The default is |
aae4dbd4 | 1511 | .Cm no . |
48dffd5b | 1512 | .Pp |
1513 | Independent of this setting, the permissions of the selected | |
1514 | .Xr tun 4 | |
1515 | device must allow access to the user. | |
5d860f02 BL |
1516 | .It Cm PermitUserEnvironment |
1517 | Specifies whether | |
1518 | .Pa ~/.ssh/environment | |
bd9bf38b | 1519 | and |
5d860f02 BL |
1520 | .Cm environment= |
1521 | options in | |
1522 | .Pa ~/.ssh/authorized_keys | |
bd9bf38b | 1523 | are processed by |
5b0d63f8 | 1524 | .Xr sshd 8 . |
95344c25 | 1525 | Valid options are |
1526 | .Cm yes , | |
1527 | .Cm no | |
1528 | or a pattern-list specifying which environment variable names to accept | |
1529 | (for example | |
1530 | .Qq LANG,LC_* ) . | |
5d860f02 | 1531 | The default is |
aae4dbd4 | 1532 | .Cm no . |
bd9bf38b BL |
1533 | Enabling environment processing may enable users to bypass access |
1534 | restrictions in some configurations using mechanisms such as | |
1535 | .Ev LD_PRELOAD . | |
72e6b5c9 DM |
1536 | .It Cm PermitUserRC |
1537 | Specifies whether any | |
1538 | .Pa ~/.ssh/rc | |
1539 | file is executed. | |
1540 | The default is | |
aae4dbd4 | 1541 | .Cm yes . |
3a923129 | 1542 | .It Cm PerSourceMaxStartups |
1543 | Specifies the number of unauthenticated connections allowed from a | |
1544 | given source address, or | |
1545 | .Dq none | |
1546 | if there is no limit. | |
1547 | This limit is applied in addition to | |
1548 | .Cm MaxStartups , | |
1549 | whichever is lower. | |
1550 | The default is | |
1551 | .Cm none . | |
1552 | .It Cm PerSourceNetBlockSize | |
1553 | Specifies the number of bits of source address that are grouped together | |
1554 | for the purposes of applying PerSourceMaxStartups limits. | |
1555 | Values for IPv4 and optionally IPv6 may be specified, separated by a colon. | |
1556 | The default is | |
7a57adb8 | 1557 | .Cm 32:128 , |
3a923129 | 1558 | which means each address is considered individually. |
351c5dbb | 1559 | .It Cm PidFile |
1560 | Specifies the file that contains the process ID of the | |
1561 | SSH daemon, or | |
1562 | .Cm none | |
1563 | to not write one. | |
1564 | The default is | |
1565 | .Pa /var/run/sshd.pid . | |
9f04903c BL |
1566 | .It Cm Port |
1567 | Specifies the port number that | |
5b0d63f8 | 1568 | .Xr sshd 8 |
9f04903c BL |
1569 | listens on. |
1570 | The default is 22. | |
1571 | Multiple options of this type are permitted. | |
1572 | See also | |
1573 | .Cm ListenAddress . | |
1574 | .It Cm PrintLastLog | |
1575 | Specifies whether | |
5b0d63f8 | 1576 | .Xr sshd 8 |
7cc5c238 DT |
1577 | should print the date and time of the last user login when a user logs |
1578 | in interactively. | |
9f04903c | 1579 | The default is |
aae4dbd4 | 1580 | .Cm yes . |
9f04903c BL |
1581 | .It Cm PrintMotd |
1582 | Specifies whether | |
5b0d63f8 | 1583 | .Xr sshd 8 |
9f04903c BL |
1584 | should print |
1585 | .Pa /etc/motd | |
1586 | when a user logs in interactively. | |
1587 | (On some systems it is also printed by the shell, | |
1588 | .Pa /etc/profile , | |
1589 | or equivalent.) | |
1590 | The default is | |
aae4dbd4 | 1591 | .Cm yes . |
ee9c0da8 | 1592 | .It Cm PubkeyAcceptedAlgorithms |
1593 | Specifies the signature algorithms that will be accepted for public key | |
1594 | authentication as a list of comma-separated patterns. | |
4f9d75fb | 1595 | Alternately if the specified list begins with a |
f9eca249 | 1596 | .Sq + |
ee9c0da8 | 1597 | character, then the specified algorithms will be appended to the default set |
f9eca249 | 1598 | instead of replacing them. |
4f9d75fb | 1599 | If the specified list begins with a |
68bc8cfa | 1600 | .Sq - |
ee9c0da8 | 1601 | character, then the specified algorithms (including wildcards) will be removed |
68bc8cfa | 1602 | from the default set instead of replacing them. |
91a2135f | 1603 | If the specified list begins with a |
1604 | .Sq ^ | |
ee9c0da8 | 1605 | character, then the specified algorithms will be placed at the head of the |
91a2135f | 1606 | default set. |
3a1638dd | 1607 | The default for this option is: |
1608 | .Bd -literal -offset 3n | |
12ae8f95 | 1609 | ssh-ed25519-cert-v01@openssh.com, |
3a1638dd | 1610 | ecdsa-sha2-nistp256-cert-v01@openssh.com, |
1611 | ecdsa-sha2-nistp384-cert-v01@openssh.com, | |
1612 | ecdsa-sha2-nistp521-cert-v01@openssh.com, | |
ae024b22 | 1613 | sk-ssh-ed25519-cert-v01@openssh.com, |
12ae8f95 | 1614 | sk-ecdsa-sha2-nistp256-cert-v01@openssh.com, |
aa4c640d | 1615 | rsa-sha2-512-cert-v01@openssh.com, |
1616 | rsa-sha2-256-cert-v01@openssh.com, | |
12ae8f95 | 1617 | ssh-ed25519, |
3a1638dd | 1618 | ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521, |
12ae8f95 | 1619 | sk-ssh-ed25519@openssh.com, |
ae024b22 | 1620 | sk-ecdsa-sha2-nistp256@openssh.com, |
b711bc01 | 1621 | rsa-sha2-512,rsa-sha2-256 |
3a1638dd | 1622 | .Ed |
1623 | .Pp | |
0aeb508a | 1624 | The list of available signature algorithms may also be obtained using |
ee9c0da8 | 1625 | .Qq ssh -Q PubkeyAcceptedAlgorithms . |
0fddf296 | 1626 | .It Cm PubkeyAuthOptions |
1627 | Sets one or more public key authentication options. | |
801c9f09 | 1628 | The supported keywords are: |
8635afa1 | 1629 | .Cm none |
801c9f09 | 1630 | (the default; indicating no additional options are enabled), |
1631 | .Cm touch-required | |
0fddf296 | 1632 | and |
801c9f09 | 1633 | .Cm verify-required . |
0fddf296 | 1634 | .Pp |
1635 | The | |
1636 | .Cm touch-required | |
141df487 | 1637 | option causes public key authentication using a FIDO authenticator algorithm |
8635afa1 | 1638 | (i.e.\& |
0fddf296 | 1639 | .Cm ecdsa-sk |
1640 | or | |
1641 | .Cm ed25519-sk ) | |
1642 | to always require the signature to attest that a physically present user | |
141df487 | 1643 | explicitly confirmed the authentication (usually by touching the authenticator). |
0fddf296 | 1644 | By default, |
1645 | .Xr sshd 8 | |
141df487 | 1646 | requires user presence unless overridden with an authorized_keys option. |
0fddf296 | 1647 | The |
1648 | .Cm touch-required | |
1649 | flag disables this override. | |
801c9f09 | 1650 | .Pp |
1651 | The | |
1652 | .Cm verify-required | |
2a3a9822 | 1653 | option requires a FIDO key signature attest that the user was verified, |
744df42a | 1654 | e.g. via a PIN. |
801c9f09 | 1655 | .Pp |
1656 | Neither the | |
1657 | .Cm touch-required | |
1658 | or | |
1659 | .Cm verify-required | |
744df42a | 1660 | options have any effect for other, non-FIDO, public key types. |
9f04903c BL |
1661 | .It Cm PubkeyAuthentication |
1662 | Specifies whether public key authentication is allowed. | |
1663 | The default is | |
aae4dbd4 | 1664 | .Cm yes . |
5f96f3b4 | 1665 | .It Cm RekeyLimit |
455cee8d | 1666 | Specifies the maximum amount of data that may be transmitted or received |
1667 | before the session key is renegotiated, optionally followed by a maximum | |
1668 | amount of time that may pass before the session key is renegotiated. | |
5f96f3b4 DT |
1669 | The first argument is specified in bytes and may have a suffix of |
1670 | .Sq K , | |
1671 | .Sq M , | |
1672 | or | |
1673 | .Sq G | |
1674 | to indicate Kilobytes, Megabytes, or Gigabytes, respectively. | |
1675 | The default is between | |
1676 | .Sq 1G | |
1677 | and | |
1678 | .Sq 4G , | |
1679 | depending on the cipher. | |
1680 | The optional second value is specified in seconds and may use any of the | |
1681 | units documented in the | |
1682 | .Sx TIME FORMATS | |
64d22946 | 1683 | section. |
5f96f3b4 DT |
1684 | The default value for |
1685 | .Cm RekeyLimit | |
1686 | is | |
aae4dbd4 | 1687 | .Cm default none , |
5f96f3b4 DT |
1688 | which means that rekeying is performed after the cipher's default amount |
1689 | of data has been sent or received and no time based rekeying is done. | |
1875042c | 1690 | .It Cm RequiredRSASize |
1691 | Specifies the minimum RSA key size (in bits) that | |
1692 | .Xr sshd 8 | |
1693 | will accept. | |
1694 | User and host-based authentication keys smaller than this limit will be | |
1695 | refused. | |
1696 | The default is | |
1697 | .Cm 1024 | |
1698 | bits. | |
1699 | Note that this limit may only be raised from the default. | |
1aed65eb | 1700 | .It Cm RevokedKeys |
6cc7cfa9 | 1701 | Specifies revoked public keys file, or |
aae4dbd4 | 1702 | .Cm none |
6cc7cfa9 | 1703 | to not use one. |
1aed65eb DM |
1704 | Keys listed in this file will be refused for public key authentication. |
1705 | Note that if this file is not readable, then public key authentication will | |
1706 | be refused for all users. | |
f3747bf4 DM |
1707 | Keys may be specified as a text file, listing one public key per line, or as |
1708 | an OpenSSH Key Revocation List (KRL) as generated by | |
72abeb70 | 1709 | .Xr ssh-keygen 1 . |
fecfd118 | 1710 | For more information on KRLs, see the KEY REVOCATION LISTS section in |
f3747bf4 | 1711 | .Xr ssh-keygen 1 . |
35eb33fb | 1712 | .It Cm RDomain |
1713 | Specifies an explicit routing domain that is applied after authentication | |
1714 | has completed. | |
bec42933 | 1715 | The user session, as well as any forwarded or listening IP sockets, |
7530e77b | 1716 | will be bound to this |
35eb33fb | 1717 | .Xr rdomain 4 . |
1718 | If the routing domain is set to | |
1719 | .Cm \&%D , | |
7530e77b | 1720 | then the domain in which the incoming connection was received will be applied. |
ae024b22 | 1721 | .It Cm SecurityKeyProvider |
141df487 | 1722 | Specifies a path to a library that will be used when loading |
1723 | FIDO authenticator-hosted keys, overriding the default of using | |
1724 | the built-in USB HID support. | |
28013759 | 1725 | .It Cm SetEnv |
1726 | Specifies one or more environment variables to set in child sessions started | |
1727 | by | |
1728 | .Xr sshd 8 | |
1729 | as | |
1730 | .Dq NAME=VALUE . | |
1731 | The environment value may be quoted (e.g. if it contains whitespace | |
1732 | characters). | |
1733 | Environment variables set by | |
1734 | .Cm SetEnv | |
1735 | override the default environment and any variables specified by the user | |
1736 | via | |
1737 | .Cm AcceptEnv | |
1738 | or | |
1739 | .Cm PermitUserEnvironment . | |
7acefbbc DM |
1740 | .It Cm StreamLocalBindMask |
1741 | Sets the octal file creation mode mask | |
1742 | .Pq umask | |
1743 | used when creating a Unix-domain socket file for local or remote | |
1744 | port forwarding. | |
1745 | This option is only used for port forwarding to a Unix-domain socket file. | |
1746 | .Pp | |
1747 | The default value is 0177, which creates a Unix-domain socket file that is | |
1748 | readable and writable only by the owner. | |
1749 | Note that not all operating systems honor the file mode on Unix-domain | |
1750 | socket files. | |
1751 | .It Cm StreamLocalBindUnlink | |
1752 | Specifies whether to remove an existing Unix-domain socket file for local | |
1753 | or remote port forwarding before creating a new one. | |
1754 | If the socket file already exists and | |
1755 | .Cm StreamLocalBindUnlink | |
1756 | is not enabled, | |
1757 | .Nm sshd | |
1758 | will be unable to forward the port to the Unix-domain socket file. | |
1759 | This option is only used for port forwarding to a Unix-domain socket file. | |
1760 | .Pp | |
1761 | The argument must be | |
aae4dbd4 | 1762 | .Cm yes |
7acefbbc | 1763 | or |
aae4dbd4 | 1764 | .Cm no . |
7acefbbc | 1765 | The default is |
aae4dbd4 | 1766 | .Cm no . |
9f04903c BL |
1767 | .It Cm StrictModes |
1768 | Specifies whether | |
5b0d63f8 | 1769 | .Xr sshd 8 |
9f04903c BL |
1770 | should check file modes and ownership of the |
1771 | user's files and home directory before accepting login. | |
1772 | This is normally desirable because novices sometimes accidentally leave their | |
1773 | directory or files world-writable. | |
1774 | The default is | |
aae4dbd4 | 1775 | .Cm yes . |
f788a916 DT |
1776 | Note that this does not apply to |
1777 | .Cm ChrootDirectory , | |
1778 | whose permissions and ownership are checked unconditionally. | |
9f04903c | 1779 | .It Cm Subsystem |
208f1ed6 | 1780 | Configures an external subsystem (e.g. file transfer daemon). |
917f9b6b DM |
1781 | Arguments should be a subsystem name and a command (with optional arguments) |
1782 | to execute upon subsystem request. | |
d8cb1f18 | 1783 | .Pp |
9f04903c | 1784 | The command |
aae4dbd4 | 1785 | .Cm sftp-server |
1786 | implements the SFTP file transfer subsystem. | |
d8cb1f18 DM |
1787 | .Pp |
1788 | Alternately the name | |
aae4dbd4 | 1789 | .Cm internal-sftp |
1790 | implements an in-process SFTP server. | |
d8cb1f18 DM |
1791 | This may simplify configurations using |
1792 | .Cm ChrootDirectory | |
1793 | to force a different filesystem root on clients. | |
1794 | .Pp | |
9f04903c | 1795 | By default no subsystems are defined. |
9f04903c BL |
1796 | .It Cm SyslogFacility |
1797 | Gives the facility code that is used when logging messages from | |
f4f22b54 | 1798 | .Xr sshd 8 . |
9f04903c BL |
1799 | The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2, |
1800 | LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7. | |
1801 | The default is AUTH. | |
12c150e7 DM |
1802 | .It Cm TCPKeepAlive |
1803 | Specifies whether the system should send TCP keepalive messages to the | |
1804 | other side. | |
1805 | If they are sent, death of the connection or crash of one | |
1806 | of the machines will be properly noticed. | |
1807 | However, this means that | |
1808 | connections will die if the route is down temporarily, and some people | |
1809 | find it annoying. | |
1810 | On the other hand, if TCP keepalives are not sent, | |
1811 | sessions may hang indefinitely on the server, leaving | |
aae4dbd4 | 1812 | .Qq ghost |
12c150e7 DM |
1813 | users and consuming server resources. |
1814 | .Pp | |
1815 | The default is | |
aae4dbd4 | 1816 | .Cm yes |
12c150e7 DM |
1817 | (to send TCP keepalive messages), and the server will notice |
1818 | if the network goes down or the client host crashes. | |
1819 | This avoids infinitely hanging sessions. | |
1820 | .Pp | |
1821 | To disable TCP keepalive messages, the value should be set to | |
aae4dbd4 | 1822 | .Cm no . |
1aed65eb DM |
1823 | .It Cm TrustedUserCAKeys |
1824 | Specifies a file containing public keys of certificate authorities that are | |
6cc7cfa9 | 1825 | trusted to sign user certificates for authentication, or |
aae4dbd4 | 1826 | .Cm none |
6cc7cfa9 | 1827 | to not use one. |
72b33820 | 1828 | Keys are listed one per line; empty lines and comments starting with |
1aed65eb DM |
1829 | .Ql # |
1830 | are allowed. | |
1831 | If a certificate is presented for authentication and has its signing CA key | |
1832 | listed in this file, then it may be used for authentication for any user | |
1833 | listed in the certificate's principals list. | |
1834 | Note that certificates that lack a list of principals will not be permitted | |
1835 | for authentication using | |
1836 | .Cm TrustedUserCAKeys . | |
fecfd118 | 1837 | For more details on certificates, see the CERTIFICATES section in |
1aed65eb | 1838 | .Xr ssh-keygen 1 . |
0293c198 | 1839 | .It Cm UnusedConnectionTimeout |
1840 | Specifies whether and how quickly | |
1841 | .Xr sshd 8 | |
1842 | should close client connections with no open channels. | |
1843 | Open channels include active shell, command execution or subsystem | |
bc7de6f9 | 1844 | sessions, connected network, socket, agent or X11 forwardings. |
0293c198 | 1845 | Forwarding listeners, such as those from the |
1846 | .Xr ssh 1 | |
1847 | .Fl R | |
bc7de6f9 | 1848 | flag, are not considered as open channels and do not prevent the timeout. |
0293c198 | 1849 | The timeout value |
1850 | is specified in seconds or may use any of the units documented in the | |
1851 | .Sx TIME FORMATS | |
1852 | section. | |
1853 | .Pp | |
1854 | Note that this timeout starts when the client connection completes | |
1855 | user authentication but before the client has an opportunity to open any | |
1856 | channels. | |
1857 | Caution should be used when using short timeout values, as they may not | |
1858 | provide sufficient time for the client to request and open its channels | |
1859 | before terminating the connection. | |
1860 | .Pp | |
1861 | The default | |
1862 | .Cm none | |
1863 | is to never expire connections for having no open channels. | |
1864 | This option may be useful in conjunction with | |
1865 | .Cm ChannelTimeout . | |
3a961dc0 DM |
1866 | .It Cm UseDNS |
1867 | Specifies whether | |
5b0d63f8 | 1868 | .Xr sshd 8 |
c63c9a69 | 1869 | should look up the remote host name, and to check that |
3a961dc0 DM |
1870 | the resolved host name for the remote IP address maps back to the |
1871 | very same IP address. | |
c63c9a69 | 1872 | .Pp |
1873 | If this option is set to | |
aae4dbd4 | 1874 | .Cm no |
c63c9a69 | 1875 | (the default) then only addresses and not host names may be used in |
0235a5fa | 1876 | .Pa ~/.ssh/authorized_keys |
c63c9a69 | 1877 | .Cm from |
1878 | and | |
1f8d3d62 | 1879 | .Nm |
c63c9a69 | 1880 | .Cm Match |
1881 | .Cm Host | |
1882 | directives. | |
2e193e29 | 1883 | .It Cm UsePAM |
1dcff9a3 DT |
1884 | Enables the Pluggable Authentication Module interface. |
1885 | If set to | |
aae4dbd4 | 1886 | .Cm yes |
1dcff9a3 | 1887 | this will enable PAM authentication using |
4d2d4d47 | 1888 | .Cm KbdInteractiveAuthentication |
a4904f7b DT |
1889 | and |
1890 | .Cm PasswordAuthentication | |
1891 | in addition to PAM account and session module processing for all | |
1892 | authentication types. | |
1dcff9a3 | 1893 | .Pp |
4d2d4d47 | 1894 | Because PAM keyboard-interactive authentication usually serves an equivalent |
1dcff9a3 DT |
1895 | role to password authentication, you should disable either |
1896 | .Cm PasswordAuthentication | |
1897 | or | |
9ebd1828 | 1898 | .Cm KbdInteractiveAuthentication . |
1dcff9a3 DT |
1899 | .Pp |
1900 | If | |
1901 | .Cm UsePAM | |
1902 | is enabled, you will not be able to run | |
1903 | .Xr sshd 8 | |
1904 | as a non-root user. | |
1905 | The default is | |
aae4dbd4 | 1906 | .Cm no . |
23528816 DM |
1907 | .It Cm VersionAddendum |
1908 | Optionally specifies additional text to append to the SSH protocol banner | |
1909 | sent by the server upon connection. | |
1910 | The default is | |
aae4dbd4 | 1911 | .Cm none . |
9f04903c BL |
1912 | .It Cm X11DisplayOffset |
1913 | Specifies the first display number available for | |
5b0d63f8 | 1914 | .Xr sshd 8 Ns 's |
9f04903c | 1915 | X11 forwarding. |
5b0d63f8 | 1916 | This prevents sshd from interfering with real X11 servers. |
9f04903c BL |
1917 | The default is 10. |
1918 | .It Cm X11Forwarding | |
1919 | Specifies whether X11 forwarding is permitted. | |
101c4a7b | 1920 | The argument must be |
aae4dbd4 | 1921 | .Cm yes |
101c4a7b | 1922 | or |
aae4dbd4 | 1923 | .Cm no . |
9f04903c | 1924 | The default is |
aae4dbd4 | 1925 | .Cm no . |
101c4a7b DM |
1926 | .Pp |
1927 | When X11 forwarding is enabled, there may be additional exposure to | |
1928 | the server and to client displays if the | |
5b0d63f8 | 1929 | .Xr sshd 8 |
101c4a7b | 1930 | proxy display is configured to listen on the wildcard address (see |
aae4dbd4 | 1931 | .Cm X11UseLocalhost ) , |
1932 | though this is not the default. | |
101c4a7b DM |
1933 | Additionally, the authentication spoofing and authentication data |
1934 | verification and substitution occur on the client side. | |
1935 | The security risk of using X11 forwarding is that the client's X11 | |
5b0d63f8 | 1936 | display server may be exposed to attack when the SSH client requests |
101c4a7b DM |
1937 | forwarding (see the warnings for |
1938 | .Cm ForwardX11 | |
1939 | in | |
f1ce505d | 1940 | .Xr ssh_config 5 ) . |
101c4a7b DM |
1941 | A system administrator may have a stance in which they want to |
1942 | protect clients that may expose themselves to attack by unwittingly | |
1943 | requesting X11 forwarding, which can warrant a | |
aae4dbd4 | 1944 | .Cm no |
101c4a7b DM |
1945 | setting. |
1946 | .Pp | |
1947 | Note that disabling X11 forwarding does not prevent users from | |
1948 | forwarding X11 traffic, as users can always install their own forwarders. | |
9f04903c BL |
1949 | .It Cm X11UseLocalhost |
1950 | Specifies whether | |
5b0d63f8 | 1951 | .Xr sshd 8 |
9f04903c | 1952 | should bind the X11 forwarding server to the loopback address or to |
495dca35 DM |
1953 | the wildcard address. |
1954 | By default, | |
5b0d63f8 | 1955 | sshd binds the forwarding server to the loopback address and sets the |
9f04903c BL |
1956 | hostname part of the |
1957 | .Ev DISPLAY | |
1958 | environment variable to | |
aae4dbd4 | 1959 | .Cm localhost . |
15b6120e | 1960 | This prevents remote hosts from connecting to the proxy display. |
9f04903c BL |
1961 | However, some older X11 clients may not function with this |
1962 | configuration. | |
1963 | .Cm X11UseLocalhost | |
1964 | may be set to | |
aae4dbd4 | 1965 | .Cm no |
9f04903c BL |
1966 | to specify that the forwarding server should be bound to the wildcard |
1967 | address. | |
1968 | The argument must be | |
aae4dbd4 | 1969 | .Cm yes |
9f04903c | 1970 | or |
aae4dbd4 | 1971 | .Cm no . |
9f04903c | 1972 | The default is |
aae4dbd4 | 1973 | .Cm yes . |
9f04903c | 1974 | .It Cm XAuthLocation |
05913bad | 1975 | Specifies the full pathname of the |
9f04903c | 1976 | .Xr xauth 1 |
6cc7cfa9 | 1977 | program, or |
aae4dbd4 | 1978 | .Cm none |
6cc7cfa9 | 1979 | to not use one. |
9f04903c BL |
1980 | The default is |
1981 | .Pa /usr/X11R6/bin/xauth . | |
1982 | .El | |
e3beba23 | 1983 | .Sh TIME FORMATS |
f4f22b54 | 1984 | .Xr sshd 8 |
9f04903c BL |
1985 | command-line arguments and configuration file options that specify time |
1986 | may be expressed using a sequence of the form: | |
1987 | .Sm off | |
1f8cf4f4 | 1988 | .Ar time Op Ar qualifier , |
9f04903c BL |
1989 | .Sm on |
1990 | where | |
1991 | .Ar time | |
1992 | is a positive integer value and | |
1993 | .Ar qualifier | |
1994 | is one of the following: | |
1995 | .Pp | |
1996 | .Bl -tag -width Ds -compact -offset indent | |
393821ad | 1997 | .It Aq Cm none |
9f04903c BL |
1998 | seconds |
1999 | .It Cm s | Cm S | |
2000 | seconds | |
2001 | .It Cm m | Cm M | |
2002 | minutes | |
2003 | .It Cm h | Cm H | |
2004 | hours | |
2005 | .It Cm d | Cm D | |
2006 | days | |
2007 | .It Cm w | Cm W | |
2008 | weeks | |
2009 | .El | |
2010 | .Pp | |
2011 | Each member of the sequence is added together to calculate | |
2012 | the total time value. | |
2013 | .Pp | |
2014 | Time format examples: | |
2015 | .Pp | |
2016 | .Bl -tag -width Ds -compact -offset indent | |
2017 | .It 600 | |
2018 | 600 seconds (10 minutes) | |
2019 | .It 10m | |
2020 | 10 minutes | |
2021 | .It 1h30m | |
2022 | 1 hour 30 minutes (90 minutes) | |
2023 | .El | |
de6a175a | 2024 | .Sh TOKENS |
2025 | Arguments to some keywords can make use of tokens, | |
2026 | which are expanded at runtime: | |
2027 | .Pp | |
2028 | .Bl -tag -width XXXX -offset indent -compact | |
2029 | .It %% | |
2030 | A literal | |
2031 | .Sq % . | |
77b8b865 | 2032 | .It \&%C |
d1ffde6b | 2033 | Identifies the connection endpoints, containing |
2034 | four space-separated values: client address, client port number, | |
2035 | server address, and server port number. | |
35eb33fb | 2036 | .It \&%D |
2037 | The routing domain in which the incoming connection was received. | |
de6a175a | 2038 | .It %F |
2039 | The fingerprint of the CA key. | |
2040 | .It %f | |
2041 | The fingerprint of the key or certificate. | |
2042 | .It %h | |
2043 | The home directory of the user. | |
2044 | .It %i | |
2045 | The key ID in the certificate. | |
2046 | .It %K | |
2047 | The base64-encoded CA key. | |
2048 | .It %k | |
2049 | The base64-encoded key or certificate for authentication. | |
2050 | .It %s | |
2051 | The serial number of the certificate. | |
2052 | .It \&%T | |
2053 | The type of the CA key. | |
2054 | .It %t | |
2055 | The key or certificate type. | |
29402849 | 2056 | .It \&%U |
2057 | The numeric user ID of the target user. | |
de6a175a | 2058 | .It %u |
2059 | The username. | |
2060 | .El | |
2061 | .Pp | |
2062 | .Cm AuthorizedKeysCommand | |
d1ffde6b | 2063 | accepts the tokens %%, %C, %D, %f, %h, %k, %t, %U, and %u. |
de6a175a | 2064 | .Pp |
2065 | .Cm AuthorizedKeysFile | |
e8d59fef | 2066 | accepts the tokens %%, %h, %U, and %u. |
de6a175a | 2067 | .Pp |
2068 | .Cm AuthorizedPrincipalsCommand | |
d1ffde6b | 2069 | accepts the tokens %%, %C, %D, %F, %f, %h, %i, %K, %k, %s, %T, %t, %U, and %u. |
de6a175a | 2070 | .Pp |
2071 | .Cm AuthorizedPrincipalsFile | |
e8d59fef | 2072 | accepts the tokens %%, %h, %U, and %u. |
de6a175a | 2073 | .Pp |
2074 | .Cm ChrootDirectory | |
e8d59fef | 2075 | accepts the tokens %%, %h, %U, and %u. |
35eb33fb | 2076 | .Pp |
2077 | .Cm RoutingDomain | |
2078 | accepts the token %D. | |
9f04903c BL |
2079 | .Sh FILES |
2080 | .Bl -tag -width Ds | |
2081 | .It Pa /etc/ssh/sshd_config | |
2082 | Contains configuration data for | |
f4f22b54 | 2083 | .Xr sshd 8 . |
9f04903c BL |
2084 | This file should be writable by root only, but it is recommended |
2085 | (though not necessary) that it be world-readable. | |
2086 | .El | |
f1ce505d | 2087 | .Sh SEE ALSO |
aae4dbd4 | 2088 | .Xr sftp-server 8 , |
f1ce505d | 2089 | .Xr sshd 8 |
9f04903c | 2090 | .Sh AUTHORS |
aae4dbd4 | 2091 | .An -nosplit |
9f04903c | 2092 | OpenSSH is a derivative of the original and free |
aae4dbd4 | 2093 | ssh 1.2.12 release by |
2094 | .An Tatu Ylonen . | |
2095 | .An Aaron Campbell , Bob Beck , Markus Friedl , Niels Provos , | |
2096 | .An Theo de Raadt | |
2097 | and | |
2098 | .An Dug Song | |
9f04903c BL |
2099 | removed many bugs, re-added newer features and |
2100 | created OpenSSH. | |
aae4dbd4 | 2101 | .An Markus Friedl |
2102 | contributed the support for SSH protocol versions 1.5 and 2.0. | |
2103 | .An Niels Provos | |
2104 | and | |
2105 | .An Markus Friedl | |
2106 | contributed support for privilege separation. |