Annotation of src/usr.bin/ssh/sshd_config.5, Revision 1.301
1.1 stevesk 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: .\"
1.301 ! djm 36: .\" $OpenBSD: sshd_config.5,v 1.300 2020/01/25 07:09:14 tedu Exp $
1.300 tedu 37: .Dd $Mdocdate: January 25 2020 $
1.1 stevesk 38: .Dt SSHD_CONFIG 5
39: .Os
40: .Sh NAME
41: .Nm sshd_config
1.295 jmc 42: .Nd OpenSSH daemon configuration file
1.1 stevesk 43: .Sh DESCRIPTION
1.53 jmc 44: .Xr sshd 8
1.1 stevesk 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.
1.254 benno 51: For each keyword, the first obtained value will be used.
1.1 stevesk 52: Lines starting with
53: .Ql #
54: and empty lines are interpreted as comments.
1.56 dtucker 55: Arguments may optionally be enclosed in double quotes
56: .Pq \&"
57: in order to represent arguments containing spaces.
1.1 stevesk 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
1.30 djm 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
1.273 djm 69: and
70: .Cm SetEnv
1.30 djm 71: in
72: .Xr ssh_config 5
73: for how to configure the client.
1.219 jmc 74: The
1.197 dtucker 75: .Ev TERM
1.275 djm 76: environment variable is always accepted whenever the client
1.204 djm 77: requests a pseudo-terminal as it is required by the protocol.
1.30 djm 78: Variables are specified by name, which may contain the wildcard characters
1.51 jmc 79: .Ql *
1.30 djm 80: and
81: .Ql \&? .
1.31 djm 82: Multiple environment variables may be separated by whitespace or spread
1.30 djm 83: across multiple
84: .Cm AcceptEnv
85: directives.
1.31 djm 86: Be warned that some environment variables could be used to bypass restricted
1.30 djm 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.
1.37 djm 90: .It Cm AddressFamily
91: Specifies which address family should be used by
1.53 jmc 92: .Xr sshd 8 .
1.37 djm 93: Valid arguments are
1.237 jmc 94: .Cm any
95: (the default),
96: .Cm inet
1.52 jmc 97: (use IPv4 only), or
1.237 jmc 98: .Cm inet6
1.37 djm 99: (use IPv6 only).
1.89 jmc 100: .It Cm AllowAgentForwarding
101: Specifies whether
102: .Xr ssh-agent 1
103: forwarding is permitted.
104: The default is
1.237 jmc 105: .Cm yes .
1.89 jmc 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.
1.1 stevesk 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.
114: Only group names are valid; a numerical group ID is not recognized.
115: By default, login is allowed for all groups.
1.301 ! djm 116: The allow/deny groups directives are processed in the following order:
1.54 jmc 117: .Cm DenyGroups ,
118: .Cm AllowGroups .
1.49 jmc 119: .Pp
1.161 jmc 120: See PATTERNS in
1.49 jmc 121: .Xr ssh_config 5
122: for more information on patterns.
1.231 jmc 123: .It Cm AllowStreamLocalForwarding
124: Specifies whether StreamLocal (Unix-domain socket) forwarding is permitted.
1.150 djm 125: The available options are
1.237 jmc 126: .Cm yes
127: (the default)
1.150 djm 128: or
1.237 jmc 129: .Cm all
1.231 jmc 130: to allow StreamLocal forwarding,
1.237 jmc 131: .Cm no
1.231 jmc 132: to prevent all StreamLocal forwarding,
1.237 jmc 133: .Cm local
1.150 djm 134: to allow local (from the perspective of
1.151 jmc 135: .Xr ssh 1 )
136: forwarding only or
1.237 jmc 137: .Cm remote
1.150 djm 138: to allow remote forwarding only.
1.231 jmc 139: Note that disabling StreamLocal forwarding does not improve security unless
1.1 stevesk 140: users are also denied shell access, as they can always install their
141: own forwarders.
1.231 jmc 142: .It Cm AllowTcpForwarding
143: Specifies whether TCP forwarding is permitted.
1.175 millert 144: The available options are
1.237 jmc 145: .Cm yes
146: (the default)
1.175 millert 147: or
1.237 jmc 148: .Cm all
1.231 jmc 149: to allow TCP forwarding,
1.237 jmc 150: .Cm no
1.231 jmc 151: to prevent all TCP forwarding,
1.237 jmc 152: .Cm local
1.175 millert 153: to allow local (from the perspective of
154: .Xr ssh 1 )
155: forwarding only or
1.237 jmc 156: .Cm remote
1.175 millert 157: to allow remote forwarding only.
1.231 jmc 158: Note that disabling TCP forwarding does not improve security unless
1.175 millert 159: users are also denied shell access, as they can always install their
160: own forwarders.
1.1 stevesk 161: .It Cm AllowUsers
162: This keyword can be followed by a list of user name patterns, separated
163: by spaces.
1.14 jmc 164: If specified, login is allowed only for user names that
1.1 stevesk 165: match one of the patterns.
166: Only user names are valid; a numerical user ID is not recognized.
167: By default, login is allowed for all users.
168: If the pattern takes the form USER@HOST then USER and HOST
169: are separately checked, restricting logins to particular
170: users from particular hosts.
1.222 jmc 171: HOST criteria may additionally contain addresses to match in CIDR
172: address/masklen format.
1.301 ! djm 173: The allow/deny users directives are processed in the following order:
1.54 jmc 174: .Cm DenyUsers ,
1.301 ! djm 175: .Cm AllowUsers .
1.49 jmc 176: .Pp
1.161 jmc 177: See PATTERNS in
1.49 jmc 178: .Xr ssh_config 5
179: for more information on patterns.
1.149 djm 180: .It Cm AuthenticationMethods
181: Specifies the authentication methods that must be successfully completed
182: for a user to be granted access.
1.281 djm 183: This option must be followed by one or more lists of comma-separated
1.224 djm 184: authentication method names, or by the single string
1.237 jmc 185: .Cm any
1.224 djm 186: to indicate the default behaviour of accepting any single authentication
1.225 jmc 187: method.
1.237 jmc 188: If the default is overridden, then successful authentication requires
1.224 djm 189: completion of every method in at least one of these lists.
1.149 djm 190: .Pp
1.237 jmc 191: For example,
192: .Qq publickey,password publickey,keyboard-interactive
1.149 djm 193: would require the user to complete public key authentication, followed by
194: either password or keyboard interactive authentication.
195: Only methods that are next in one or more lists are offered at each stage,
1.237 jmc 196: so for this example it would not be possible to attempt password or
1.149 djm 197: keyboard-interactive authentication before public key.
1.157 markus 198: .Pp
199: For keyboard interactive authentication it is also possible to
200: restrict authentication to a specific device by appending a
201: colon followed by the device identifier
1.237 jmc 202: .Cm bsdauth ,
203: .Cm pam ,
1.157 markus 204: or
1.237 jmc 205: .Cm skey ,
1.157 markus 206: depending on the server configuration.
207: For example,
1.237 jmc 208: .Qq keyboard-interactive:bsdauth
1.157 markus 209: would restrict keyboard interactive authentication to the
1.237 jmc 210: .Cm bsdauth
1.157 markus 211: device.
1.185 djm 212: .Pp
1.237 jmc 213: If the publickey method is listed more than once,
1.185 djm 214: .Xr sshd 8
215: verifies that keys that have been used successfully are not reused for
216: subsequent authentications.
1.237 jmc 217: For example,
218: .Qq publickey,publickey
219: requires successful authentication using two different public keys.
1.181 djm 220: .Pp
1.149 djm 221: Note that each authentication method listed should also be explicitly enabled
222: in the configuration.
1.251 djm 223: .Pp
224: The available authentication methods are:
225: .Qq gssapi-with-mic ,
226: .Qq hostbased ,
227: .Qq keyboard-interactive ,
228: .Qq none
229: (used for access to password-less accounts when
1.266 jmc 230: .Cm PermitEmptyPasswords
1.251 djm 231: is enabled),
232: .Qq password
233: and
234: .Qq publickey .
1.146 djm 235: .It Cm AuthorizedKeysCommand
1.147 jmc 236: Specifies a program to be used to look up the user's public keys.
1.201 djm 237: The program must be owned by root, not writable by group or others and
238: specified by an absolute path.
239: Arguments to
240: .Cm AuthorizedKeysCommand
1.235 jmc 241: accept the tokens described in the
242: .Sx TOKENS
243: section.
244: If no arguments are specified then the username of the target user is used.
1.201 djm 245: .Pp
246: The program should produce on standard output zero or
1.235 jmc 247: more lines of authorized_keys output (see
248: .Sx AUTHORIZED_KEYS
249: in
1.147 jmc 250: .Xr sshd 8 ) .
1.235 jmc 251: If a key supplied by
252: .Cm AuthorizedKeysCommand
253: does not successfully authenticate
1.146 djm 254: and authorize the user then public key authentication continues using the usual
255: .Cm AuthorizedKeysFile
256: files.
1.237 jmc 257: By default, no
258: .Cm AuthorizedKeysCommand
259: is run.
1.146 djm 260: .It Cm AuthorizedKeysCommandUser
1.237 jmc 261: Specifies the user under whose account the
262: .Cm AuthorizedKeysCommand
263: is run.
1.146 djm 264: It is recommended to use a dedicated user that has no other role on the host
265: than running authorized keys commands.
1.186 djm 266: If
1.181 djm 267: .Cm AuthorizedKeysCommand
1.186 djm 268: is specified but
269: .Cm AuthorizedKeysCommandUser
270: is not, then
271: .Xr sshd 8
272: will refuse to start.
1.1 stevesk 273: .It Cm AuthorizedKeysFile
1.235 jmc 274: Specifies the file that contains the public keys used for user authentication.
1.285 schwarze 275: The format is described in the AUTHORIZED_KEYS FILE FORMAT section of
1.124 djm 276: .Xr sshd 8 .
1.235 jmc 277: Arguments to
1.1 stevesk 278: .Cm AuthorizedKeysFile
1.235 jmc 279: accept the tokens described in the
280: .Sx TOKENS
281: section.
1.1 stevesk 282: After expansion,
283: .Cm AuthorizedKeysFile
284: is taken to be an absolute path or one relative to the user's home
285: directory.
1.133 jmc 286: Multiple files may be listed, separated by whitespace.
1.212 djm 287: Alternately this option may be set to
1.237 jmc 288: .Cm none
1.212 djm 289: to skip checking for user keys in files.
1.133 jmc 290: The default is
1.237 jmc 291: .Qq .ssh/authorized_keys .ssh/authorized_keys2 .
1.202 djm 292: .It Cm AuthorizedPrincipalsCommand
293: Specifies a program to be used to generate the list of allowed
294: certificate principals as per
295: .Cm AuthorizedPrincipalsFile .
296: The program must be owned by root, not writable by group or others and
297: specified by an absolute path.
298: Arguments to
299: .Cm AuthorizedPrincipalsCommand
1.235 jmc 300: accept the tokens described in the
301: .Sx TOKENS
302: section.
303: If no arguments are specified then the username of the target user is used.
1.202 djm 304: .Pp
305: The program should produce on standard output zero or
306: more lines of
307: .Cm AuthorizedPrincipalsFile
308: output.
309: If either
310: .Cm AuthorizedPrincipalsCommand
311: or
312: .Cm AuthorizedPrincipalsFile
313: is specified, then certificates offered by the client for authentication
314: must contain a principal that is listed.
1.235 jmc 315: By default, no
316: .Cm AuthorizedPrincipalsCommand
317: is run.
1.202 djm 318: .It Cm AuthorizedPrincipalsCommandUser
1.235 jmc 319: Specifies the user under whose account the
320: .Cm AuthorizedPrincipalsCommand
321: is run.
1.202 djm 322: It is recommended to use a dedicated user that has no other role on the host
323: than running authorized principals commands.
324: If
325: .Cm AuthorizedPrincipalsCommand
326: is specified but
327: .Cm AuthorizedPrincipalsCommandUser
328: is not, then
329: .Xr sshd 8
330: will refuse to start.
1.121 djm 331: .It Cm AuthorizedPrincipalsFile
332: Specifies a file that lists principal names that are accepted for
333: certificate authentication.
334: When using certificates signed by a key listed in
335: .Cm TrustedUserCAKeys ,
336: this file lists names, one of which must appear in the certificate for it
337: to be accepted for authentication.
1.235 jmc 338: Names are listed one per line preceded by key options (as described in
339: .Sx AUTHORIZED_KEYS FILE FORMAT
340: in
1.125 jmc 341: .Xr sshd 8 ) .
1.124 djm 342: Empty lines and comments starting with
1.121 djm 343: .Ql #
344: are ignored.
345: .Pp
1.235 jmc 346: Arguments to
1.121 djm 347: .Cm AuthorizedPrincipalsFile
1.235 jmc 348: accept the tokens described in the
349: .Sx TOKENS
350: section.
1.121 djm 351: After expansion,
352: .Cm AuthorizedPrincipalsFile
1.235 jmc 353: is taken to be an absolute path or one relative to the user's home directory.
1.138 djm 354: The default is
1.237 jmc 355: .Cm none ,
1.138 djm 356: i.e. not to use a principals file \(en in this case, the username
1.121 djm 357: of the user must appear in a certificate's principals list for it to be
358: accepted.
1.235 jmc 359: .Pp
1.121 djm 360: Note that
361: .Cm AuthorizedPrincipalsFile
362: is only used when authentication proceeds using a CA listed in
363: .Cm TrustedUserCAKeys
364: and is not consulted for certification authorities trusted via
365: .Pa ~/.ssh/authorized_keys ,
366: though the
367: .Cm principals=
368: key option offers a similar facility (see
369: .Xr sshd 8
370: for details).
1.1 stevesk 371: .It Cm Banner
372: The contents of the specified file are sent to the remote user before
373: authentication is allowed.
1.78 djm 374: If the argument is
1.237 jmc 375: .Cm none
1.78 djm 376: then no banner is displayed.
1.1 stevesk 377: By default, no banner is displayed.
1.282 djm 378: .It Cm CASignatureAlgorithms
379: Specifies which algorithms are allowed for signing of certificates
380: by certificate authorities (CAs).
381: The default is:
382: .Bd -literal -offset indent
1.287 dtucker 383: ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
1.282 djm 384: ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa
385: .Ed
386: .Pp
387: Certificates signed using other algorithms will not be accepted for
388: public key or host-based authentication.
1.1 stevesk 389: .It Cm ChallengeResponseAuthentication
1.50 jmc 390: Specifies whether challenge-response authentication is allowed.
1.1 stevesk 391: All authentication styles from
392: .Xr login.conf 5
393: are supported.
394: The default is
1.237 jmc 395: .Cm yes .
1.80 djm 396: .It Cm ChrootDirectory
1.113 stevesk 397: Specifies the pathname of a directory to
1.80 djm 398: .Xr chroot 2
399: to after authentication.
1.190 deraadt 400: At session startup
401: .Xr sshd 8
402: checks that all components of the pathname are root-owned directories
403: which are not writable by any other user or group.
1.106 stevesk 404: After the chroot,
405: .Xr sshd 8
406: changes the working directory to the user's home directory.
1.235 jmc 407: Arguments to
408: .Cm ChrootDirectory
409: accept the tokens described in the
410: .Sx TOKENS
411: section.
1.80 djm 412: .Pp
413: The
414: .Cm ChrootDirectory
415: must contain the necessary files and directories to support the
1.103 stevesk 416: user's session.
1.80 djm 417: For an interactive session this requires at least a shell, typically
418: .Xr sh 1 ,
419: and basic
420: .Pa /dev
421: nodes such as
422: .Xr null 4 ,
423: .Xr zero 4 ,
424: .Xr stdin 4 ,
425: .Xr stdout 4 ,
426: .Xr stderr 4 ,
1.180 jmc 427: and
1.80 djm 428: .Xr tty 4
429: devices.
1.237 jmc 430: For file transfer sessions using SFTP
431: no additional configuration of the environment is necessary if the in-process
432: sftp-server is used,
1.176 schwarze 433: though sessions which use logging may require
1.104 stevesk 434: .Pa /dev/log
1.176 schwarze 435: inside the chroot directory on some operating systems (see
1.104 stevesk 436: .Xr sftp-server 8
1.81 jmc 437: for details).
1.190 deraadt 438: .Pp
1.191 jmc 439: For safety, it is very important that the directory hierarchy be
1.190 deraadt 440: prevented from modification by other processes on the system (especially
441: those outside the jail).
442: Misconfiguration can lead to unsafe environments which
443: .Xr sshd 8
444: cannot detect.
1.80 djm 445: .Pp
1.215 djm 446: The default is
1.237 jmc 447: .Cm none ,
1.215 djm 448: indicating not to
1.80 djm 449: .Xr chroot 2 .
1.1 stevesk 450: .It Cm Ciphers
1.219 jmc 451: Specifies the ciphers allowed.
1.1 stevesk 452: Multiple ciphers must be comma-separated.
1.289 naddy 453: If the specified list begins with a
1.208 djm 454: .Sq +
455: character, then the specified ciphers will be appended to the default set
456: instead of replacing them.
1.289 naddy 457: If the specified list begins with a
1.242 djm 458: .Sq -
459: character, then the specified ciphers (including wildcards) will be removed
460: from the default set instead of replacing them.
1.290 naddy 461: If the specified list begins with a
462: .Sq ^
463: character, then the specified ciphers will be placed at the head of the
464: default set.
1.208 djm 465: .Pp
1.167 djm 466: The supported ciphers are:
467: .Pp
1.173 naddy 468: .Bl -item -compact -offset indent
469: .It
470: 3des-cbc
471: .It
472: aes128-cbc
473: .It
474: aes192-cbc
475: .It
476: aes256-cbc
477: .It
478: aes128-ctr
479: .It
480: aes192-ctr
481: .It
482: aes256-ctr
483: .It
484: aes128-gcm@openssh.com
485: .It
486: aes256-gcm@openssh.com
487: .It
488: chacha20-poly1305@openssh.com
489: .El
1.167 djm 490: .Pp
1.52 jmc 491: The default is:
1.173 naddy 492: .Bd -literal -offset indent
1.211 jmc 493: chacha20-poly1305@openssh.com,
1.173 naddy 494: aes128-ctr,aes192-ctr,aes256-ctr,
1.211 jmc 495: aes128-gcm@openssh.com,aes256-gcm@openssh.com
1.1 stevesk 496: .Ed
1.167 djm 497: .Pp
1.237 jmc 498: The list of available ciphers may also be obtained using
499: .Qq ssh -Q cipher .
1.1 stevesk 500: .It Cm ClientAliveCountMax
1.237 jmc 501: Sets the number of client alive messages which may be sent without
1.52 jmc 502: .Xr sshd 8
1.17 jmc 503: receiving any messages back from the client.
504: If this threshold is reached while client alive messages are being sent,
1.52 jmc 505: sshd will disconnect the client, terminating the session.
1.17 jmc 506: It is important to note that the use of client alive messages is very
507: different from
1.237 jmc 508: .Cm TCPKeepAlive .
1.17 jmc 509: The client alive messages are sent through the encrypted channel
510: and therefore will not be spoofable.
511: The TCP keepalive option enabled by
1.27 markus 512: .Cm TCPKeepAlive
1.17 jmc 513: is spoofable.
514: The client alive mechanism is valuable when the client or
1.288 dtucker 515: server depend on knowing when a connection has become unresponsive.
1.1 stevesk 516: .Pp
1.17 jmc 517: The default value is 3.
518: If
1.1 stevesk 519: .Cm ClientAliveInterval
1.237 jmc 520: is set to 15, and
1.1 stevesk 521: .Cm ClientAliveCountMax
1.52 jmc 522: is left at the default, unresponsive SSH clients
1.1 stevesk 523: will be disconnected after approximately 45 seconds.
1.42 djm 524: .It Cm ClientAliveInterval
525: Sets a timeout interval in seconds after which if no data has been received
526: from the client,
1.52 jmc 527: .Xr sshd 8
1.42 djm 528: will send a message through the encrypted
529: channel to request a response from the client.
530: The default
531: is 0, indicating that these messages will not be sent to the client.
1.3 markus 532: .It Cm Compression
1.236 djm 533: Specifies whether compression is enabled after
1.44 markus 534: the user has authenticated successfully.
1.3 markus 535: The argument must be
1.237 jmc 536: .Cm yes ,
537: .Cm delayed
1.236 djm 538: (a legacy synonym for
1.237 jmc 539: .Cm yes )
1.3 markus 540: or
1.237 jmc 541: .Cm no .
1.3 markus 542: The default is
1.237 jmc 543: .Cm yes .
1.1 stevesk 544: .It Cm DenyGroups
545: This keyword can be followed by a list of group name patterns, separated
546: by spaces.
547: Login is disallowed for users whose primary group or supplementary
548: group list matches one of the patterns.
549: Only group names are valid; a numerical group ID is not recognized.
550: By default, login is allowed for all groups.
1.301 ! djm 551: The allow/deny groups directives are processed in the following order:
1.54 jmc 552: .Cm DenyGroups ,
553: .Cm AllowGroups .
1.49 jmc 554: .Pp
1.161 jmc 555: See PATTERNS in
1.49 jmc 556: .Xr ssh_config 5
557: for more information on patterns.
1.1 stevesk 558: .It Cm DenyUsers
559: This keyword can be followed by a list of user name patterns, separated
560: by spaces.
561: Login is disallowed for user names that match one of the patterns.
562: Only user names are valid; a numerical user ID is not recognized.
563: By default, login is allowed for all users.
564: If the pattern takes the form USER@HOST then USER and HOST
565: are separately checked, restricting logins to particular
566: users from particular hosts.
1.222 jmc 567: HOST criteria may additionally contain addresses to match in CIDR
568: address/masklen format.
1.301 ! djm 569: The allow/deny users directives are processed in the following order:
1.54 jmc 570: .Cm DenyUsers ,
1.301 ! djm 571: .Cm AllowUsers .
1.49 jmc 572: .Pp
1.161 jmc 573: See PATTERNS in
1.49 jmc 574: .Xr ssh_config 5
575: for more information on patterns.
1.239 djm 576: .It Cm DisableForwarding
577: Disables all forwarding features, including X11,
578: .Xr ssh-agent 1 ,
579: TCP and StreamLocal.
580: This option overrides all other forwarding-related options and may
581: simplify restricted configurations.
1.246 djm 582: .It Cm ExposeAuthInfo
1.253 jmc 583: Writes a temporary file containing a list of authentication methods and
1.246 djm 584: public credentials (e.g. keys) used to authenticate the user.
1.247 jmc 585: The location of the file is exposed to the user session through the
1.248 djm 586: .Ev SSH_USER_AUTH
1.247 jmc 587: environment variable.
1.253 jmc 588: The default is
589: .Cm no .
1.183 djm 590: .It Cm FingerprintHash
591: Specifies the hash algorithm used when logging key fingerprints.
592: Valid options are:
1.237 jmc 593: .Cm md5
1.183 djm 594: and
1.237 jmc 595: .Cm sha256 .
1.183 djm 596: The default is
1.237 jmc 597: .Cm sha256 .
1.67 dtucker 598: .It Cm ForceCommand
599: Forces the execution of the command specified by
600: .Cm ForceCommand ,
1.84 djm 601: ignoring any command supplied by the client and
602: .Pa ~/.ssh/rc
603: if present.
1.67 dtucker 604: The command is invoked by using the user's login shell with the -c option.
605: This applies to shell, command, or subsystem execution.
606: It is most useful inside a
607: .Cm Match
608: block.
609: The command originally supplied by the client is available in the
610: .Ev SSH_ORIGINAL_COMMAND
611: environment variable.
1.82 djm 612: Specifying a command of
1.237 jmc 613: .Cm internal-sftp
614: will force the use of an in-process SFTP server that requires no support
1.82 djm 615: files when used with
616: .Cm ChrootDirectory .
1.215 djm 617: The default is
1.237 jmc 618: .Cm none .
1.1 stevesk 619: .It Cm GatewayPorts
620: Specifies whether remote hosts are allowed to connect to ports
621: forwarded for the client.
622: By default,
1.52 jmc 623: .Xr sshd 8
1.15 jmc 624: binds remote port forwardings to the loopback address.
625: This prevents other remote hosts from connecting to forwarded ports.
1.1 stevesk 626: .Cm GatewayPorts
1.52 jmc 627: can be used to specify that sshd
1.39 djm 628: should allow remote port forwardings to bind to non-loopback addresses, thus
629: allowing other hosts to connect.
630: The argument may be
1.237 jmc 631: .Cm no
1.39 djm 632: to force remote port forwardings to be available to the local host only,
1.237 jmc 633: .Cm yes
1.39 djm 634: to force remote port forwardings to bind to the wildcard address, or
1.237 jmc 635: .Cm clientspecified
1.39 djm 636: to allow the client to select the address to which the forwarding is bound.
1.1 stevesk 637: The default is
1.237 jmc 638: .Cm no .
1.23 markus 639: .It Cm GSSAPIAuthentication
1.25 markus 640: Specifies whether user authentication based on GSSAPI is allowed.
1.26 djm 641: The default is
1.237 jmc 642: .Cm no .
1.23 markus 643: .It Cm GSSAPICleanupCredentials
644: Specifies whether to automatically destroy the user's credentials cache
645: on logout.
646: The default is
1.237 jmc 647: .Cm yes .
1.203 djm 648: .It Cm GSSAPIStrictAcceptorCheck
649: Determines whether to be strict about the identity of the GSSAPI acceptor
650: a client authenticates against.
651: If set to
1.237 jmc 652: .Cm yes
653: then the client must authenticate against the host
1.203 djm 654: service on the current hostname.
655: If set to
1.237 jmc 656: .Cm no
1.203 djm 657: then the client may authenticate against any service key stored in the
658: machine's default store.
659: This facility is provided to assist with operation on multi homed machines.
660: The default is
1.237 jmc 661: .Cm yes .
1.189 djm 662: .It Cm HostbasedAcceptedKeyTypes
663: Specifies the key types that will be accepted for hostbased authentication
1.280 djm 664: as a list of comma-separated patterns.
1.289 naddy 665: Alternately if the specified list begins with a
1.208 djm 666: .Sq +
667: character, then the specified key types will be appended to the default set
668: instead of replacing them.
1.289 naddy 669: If the specified list begins with a
1.242 djm 670: .Sq -
671: character, then the specified key types (including wildcards) will be removed
672: from the default set instead of replacing them.
1.290 naddy 673: If the specified list begins with a
674: .Sq ^
675: character, then the specified key types will be placed at the head of the
676: default set.
1.206 markus 677: The default for this option is:
678: .Bd -literal -offset 3n
679: ecdsa-sha2-nistp256-cert-v01@openssh.com,
680: ecdsa-sha2-nistp384-cert-v01@openssh.com,
681: ecdsa-sha2-nistp521-cert-v01@openssh.com,
1.296 naddy 682: sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,
1.206 markus 683: ssh-ed25519-cert-v01@openssh.com,
1.296 naddy 684: sk-ssh-ed25519-cert-v01@openssh.com,
1.291 naddy 685: rsa-sha2-512-cert-v01@openssh.com,
686: rsa-sha2-256-cert-v01@openssh.com,
1.206 markus 687: ssh-rsa-cert-v01@openssh.com,
688: ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
1.296 naddy 689: sk-ecdsa-sha2-nistp256@openssh.com,
690: ssh-ed25519,sk-ssh-ed25519@openssh.com,
691: rsa-sha2-512,rsa-sha2-256,ssh-rsa
1.206 markus 692: .Ed
693: .Pp
1.237 jmc 694: The list of available key types may also be obtained using
695: .Qq ssh -Q key .
1.1 stevesk 696: .It Cm HostbasedAuthentication
697: Specifies whether rhosts or /etc/hosts.equiv authentication together
698: with successful public key client host authentication is allowed
1.50 jmc 699: (host-based authentication).
1.70 dtucker 700: The default is
1.237 jmc 701: .Cm no .
1.70 dtucker 702: .It Cm HostbasedUsesNameFromPacketOnly
703: Specifies whether or not the server will attempt to perform a reverse
704: name lookup when matching the name in the
705: .Pa ~/.shosts ,
706: .Pa ~/.rhosts ,
707: and
708: .Pa /etc/hosts.equiv
709: files during
710: .Cm HostbasedAuthentication .
711: A setting of
1.237 jmc 712: .Cm yes
1.70 dtucker 713: means that
714: .Xr sshd 8
715: uses the name supplied by the client rather than
716: attempting to resolve the name from the TCP connection itself.
1.1 stevesk 717: The default is
1.237 jmc 718: .Cm no .
1.117 djm 719: .It Cm HostCertificate
720: Specifies a file containing a public host certificate.
721: The certificate's public key must match a private host key already specified
722: by
723: .Cm HostKey .
724: The default behaviour of
725: .Xr sshd 8
726: is not to load any certificates.
1.1 stevesk 727: .It Cm HostKey
728: Specifies a file containing a private host key
729: used by SSH.
1.229 naddy 730: The defaults are
1.169 naddy 731: .Pa /etc/ssh/ssh_host_ecdsa_key ,
732: .Pa /etc/ssh/ssh_host_ed25519_key
1.126 djm 733: and
1.229 naddy 734: .Pa /etc/ssh/ssh_host_rsa_key .
1.206 markus 735: .Pp
1.1 stevesk 736: Note that
1.52 jmc 737: .Xr sshd 8
1.206 markus 738: will refuse to use a file if it is group/world-accessible
739: and that the
740: .Cm HostKeyAlgorithms
741: option restricts which of the keys are actually used by
742: .Xr sshd 8 .
743: .Pp
1.1 stevesk 744: It is possible to have multiple host key files.
1.162 markus 745: It is also possible to specify public host key files instead.
746: In this case operations on the private key will be delegated
747: to an
748: .Xr ssh-agent 1 .
749: .It Cm HostKeyAgent
750: Identifies the UNIX-domain socket used to communicate
751: with an agent that has access to the private host keys.
1.223 markus 752: If the string
1.237 jmc 753: .Qq SSH_AUTH_SOCK
1.162 markus 754: is specified, the location of the socket will be read from the
755: .Ev SSH_AUTH_SOCK
756: environment variable.
1.206 markus 757: .It Cm HostKeyAlgorithms
1.219 jmc 758: Specifies the host key algorithms
1.206 markus 759: that the server offers.
760: The default for this option is:
761: .Bd -literal -offset 3n
762: ecdsa-sha2-nistp256-cert-v01@openssh.com,
763: ecdsa-sha2-nistp384-cert-v01@openssh.com,
764: ecdsa-sha2-nistp521-cert-v01@openssh.com,
1.296 naddy 765: sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,
1.206 markus 766: ssh-ed25519-cert-v01@openssh.com,
1.296 naddy 767: sk-ssh-ed25519-cert-v01@openssh.com,
1.291 naddy 768: rsa-sha2-512-cert-v01@openssh.com,
769: rsa-sha2-256-cert-v01@openssh.com,
1.206 markus 770: ssh-rsa-cert-v01@openssh.com,
771: ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
1.296 naddy 772: sk-ecdsa-sha2-nistp256@openssh.com,
773: ssh-ed25519,sk-ssh-ed25519@openssh.com,
774: rsa-sha2-512,rsa-sha2-256,ssh-rsa
1.206 markus 775: .Ed
776: .Pp
1.237 jmc 777: The list of available key types may also be obtained using
778: .Qq ssh -Q key .
1.1 stevesk 779: .It Cm IgnoreRhosts
780: Specifies that
781: .Pa .rhosts
782: and
783: .Pa .shosts
784: files will not be used in
785: .Cm HostbasedAuthentication .
786: .Pp
787: .Pa /etc/hosts.equiv
788: and
789: .Pa /etc/shosts.equiv
790: are still used.
791: The default is
1.237 jmc 792: .Cm yes .
1.1 stevesk 793: .It Cm IgnoreUserKnownHosts
794: Specifies whether
1.52 jmc 795: .Xr sshd 8
1.1 stevesk 796: should ignore the user's
1.41 djm 797: .Pa ~/.ssh/known_hosts
1.1 stevesk 798: during
1.261 djm 799: .Cm HostbasedAuthentication
800: and use only the system-wide known hosts file
801: .Pa /etc/ssh/known_hosts .
1.1 stevesk 802: The default is
1.237 jmc 803: .Cm no .
1.129 djm 804: .It Cm IPQoS
805: Specifies the IPv4 type-of-service or DSCP class for the connection.
806: Accepted values are
1.237 jmc 807: .Cm af11 ,
808: .Cm af12 ,
809: .Cm af13 ,
810: .Cm af21 ,
811: .Cm af22 ,
812: .Cm af23 ,
813: .Cm af31 ,
814: .Cm af32 ,
815: .Cm af33 ,
816: .Cm af41 ,
817: .Cm af42 ,
818: .Cm af43 ,
819: .Cm cs0 ,
820: .Cm cs1 ,
821: .Cm cs2 ,
822: .Cm cs3 ,
823: .Cm cs4 ,
824: .Cm cs5 ,
825: .Cm cs6 ,
826: .Cm cs7 ,
827: .Cm ef ,
828: .Cm lowdelay ,
829: .Cm throughput ,
830: .Cm reliability ,
1.250 djm 831: a numeric value, or
832: .Cm none
833: to use the operating system default.
1.131 djm 834: This option may take one or two arguments, separated by whitespace.
1.129 djm 835: If one argument is specified, it is used as the packet class unconditionally.
836: If two values are specified, the first is automatically selected for
837: interactive sessions and the second for non-interactive sessions.
838: The default is
1.264 job 839: .Cm af21
1.265 jmc 840: (Low-Latency Data)
1.129 djm 841: for interactive sessions and
1.264 job 842: .Cm cs1
1.265 jmc 843: (Lower Effort)
1.129 djm 844: for non-interactive sessions.
1.171 jmc 845: .It Cm KbdInteractiveAuthentication
846: Specifies whether to allow keyboard-interactive authentication.
847: The argument to this keyword must be
1.237 jmc 848: .Cm yes
1.171 jmc 849: or
1.237 jmc 850: .Cm no .
1.171 jmc 851: The default is to use whatever value
852: .Cm ChallengeResponseAuthentication
853: is set to
854: (by default
1.237 jmc 855: .Cm yes ) .
1.1 stevesk 856: .It Cm KerberosAuthentication
1.24 markus 857: Specifies whether the password provided by the user for
1.1 stevesk 858: .Cm PasswordAuthentication
1.24 markus 859: will be validated through the Kerberos KDC.
1.1 stevesk 860: To use this option, the server needs a
861: Kerberos servtab which allows the verification of the KDC's identity.
1.52 jmc 862: The default is
1.237 jmc 863: .Cm no .
1.29 dtucker 864: .It Cm KerberosGetAFSToken
1.45 djm 865: If AFS is active and the user has a Kerberos 5 TGT, attempt to acquire
1.29 dtucker 866: an AFS token before accessing the user's home directory.
1.52 jmc 867: The default is
1.237 jmc 868: .Cm no .
1.1 stevesk 869: .It Cm KerberosOrLocalPasswd
1.52 jmc 870: If password authentication through Kerberos fails then
1.1 stevesk 871: the password will be validated via any additional local mechanism
872: such as
873: .Pa /etc/passwd .
1.52 jmc 874: The default is
1.237 jmc 875: .Cm yes .
1.1 stevesk 876: .It Cm KerberosTicketCleanup
877: Specifies whether to automatically destroy the user's ticket cache
878: file on logout.
1.52 jmc 879: The default is
1.237 jmc 880: .Cm yes .
1.127 djm 881: .It Cm KexAlgorithms
882: Specifies the available KEX (Key Exchange) algorithms.
883: Multiple algorithms must be comma-separated.
1.289 naddy 884: Alternately if the specified list begins with a
1.208 djm 885: .Sq +
886: character, then the specified methods will be appended to the default set
887: instead of replacing them.
1.289 naddy 888: If the specified list begins with a
1.242 djm 889: .Sq -
890: character, then the specified methods (including wildcards) will be removed
891: from the default set instead of replacing them.
1.290 naddy 892: If the specified list begins with a
893: .Sq ^
894: character, then the specified methods will be placed at the head of the
895: default set.
1.173 naddy 896: The supported algorithms are:
897: .Pp
898: .Bl -item -compact -offset indent
899: .It
1.234 djm 900: curve25519-sha256
901: .It
1.173 naddy 902: curve25519-sha256@libssh.org
903: .It
904: diffie-hellman-group1-sha1
905: .It
906: diffie-hellman-group14-sha1
907: .It
1.263 djm 908: diffie-hellman-group14-sha256
909: .It
910: diffie-hellman-group16-sha512
911: .It
912: diffie-hellman-group18-sha512
913: .It
1.173 naddy 914: diffie-hellman-group-exchange-sha1
915: .It
916: diffie-hellman-group-exchange-sha256
917: .It
918: ecdh-sha2-nistp256
919: .It
920: ecdh-sha2-nistp384
921: .It
922: ecdh-sha2-nistp521
1.298 dtucker 923: .It
924: sntrup4591761x25519-sha512@tinyssh.org
1.173 naddy 925: .El
926: .Pp
927: The default is:
1.170 dtucker 928: .Bd -literal -offset indent
1.234 djm 929: curve25519-sha256,curve25519-sha256@libssh.org,
1.170 dtucker 930: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
931: diffie-hellman-group-exchange-sha256,
1.263 djm 932: diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,
1.300 tedu 933: diffie-hellman-group14-sha256
1.170 dtucker 934: .Ed
1.188 djm 935: .Pp
1.237 jmc 936: The list of available key exchange algorithms may also be obtained using
937: .Qq ssh -Q kex .
1.1 stevesk 938: .It Cm ListenAddress
939: Specifies the local addresses
1.52 jmc 940: .Xr sshd 8
1.1 stevesk 941: should listen on.
942: The following forms may be used:
943: .Pp
944: .Bl -item -offset indent -compact
945: .It
946: .Cm ListenAddress
947: .Sm off
1.259 jmc 948: .Ar hostname | address
1.1 stevesk 949: .Sm on
1.260 jmc 950: .Op Cm rdomain Ar domain
1.1 stevesk 951: .It
952: .Cm ListenAddress
953: .Sm off
1.259 jmc 954: .Ar hostname : port
1.1 stevesk 955: .Sm on
1.260 jmc 956: .Op Cm rdomain Ar domain
1.256 djm 957: .It
958: .Cm ListenAddress
959: .Sm off
1.259 jmc 960: .Ar IPv4_address : port
1.256 djm 961: .Sm on
1.260 jmc 962: .Op Cm rdomain Ar domain
1.1 stevesk 963: .It
964: .Cm ListenAddress
965: .Sm off
1.259 jmc 966: .Oo Ar hostname | address Oc : Ar port
1.1 stevesk 967: .Sm on
1.260 jmc 968: .Op Cm rdomain Ar domain
1.1 stevesk 969: .El
970: .Pp
1.256 djm 971: The optional
972: .Cm rdomain
973: qualifier requests
974: .Xr sshd 8
975: listen in an explicit routing domain.
1.1 stevesk 976: If
977: .Ar port
978: is not specified,
1.200 dtucker 979: sshd will listen on the address and all
1.1 stevesk 980: .Cm Port
1.17 jmc 981: options specified.
1.256 djm 982: The default is to listen on all local addresses on the current default
983: routing domain.
1.15 jmc 984: Multiple
1.1 stevesk 985: .Cm ListenAddress
1.17 jmc 986: options are permitted.
1.256 djm 987: For more information on routing domains, see
1.259 jmc 988: .Xr rdomain 4 .
1.1 stevesk 989: .It Cm LoginGraceTime
990: The server disconnects after this time if the user has not
991: successfully logged in.
992: If the value is 0, there is no time limit.
1.12 stevesk 993: The default is 120 seconds.
1.1 stevesk 994: .It Cm LogLevel
995: Gives the verbosity level that is used when logging messages from
1.53 jmc 996: .Xr sshd 8 .
1.1 stevesk 997: The possible values are:
1.52 jmc 998: QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3.
1.15 jmc 999: The default is INFO.
1000: DEBUG and DEBUG1 are equivalent.
1001: DEBUG2 and DEBUG3 each specify higher levels of debugging output.
1002: Logging with a DEBUG level violates the privacy of users and is not recommended.
1.1 stevesk 1003: .It Cm MACs
1004: Specifies the available MAC (message authentication code) algorithms.
1.219 jmc 1005: The MAC algorithm is used for data integrity protection.
1.1 stevesk 1006: Multiple algorithms must be comma-separated.
1.289 naddy 1007: If the specified list begins with a
1.208 djm 1008: .Sq +
1009: character, then the specified algorithms will be appended to the default set
1010: instead of replacing them.
1.289 naddy 1011: If the specified list begins with a
1.242 djm 1012: .Sq -
1013: character, then the specified algorithms (including wildcards) will be removed
1014: from the default set instead of replacing them.
1.290 naddy 1015: If the specified list begins with a
1016: .Sq ^
1017: character, then the specified algorithms will be placed at the head of the
1018: default set.
1.208 djm 1019: .Pp
1.152 markus 1020: The algorithms that contain
1.237 jmc 1021: .Qq -etm
1.152 markus 1022: calculate the MAC after encryption (encrypt-then-mac).
1023: These are considered safer and their use recommended.
1.173 naddy 1024: The supported MACs are:
1025: .Pp
1026: .Bl -item -compact -offset indent
1027: .It
1028: hmac-md5
1029: .It
1030: hmac-md5-96
1031: .It
1032: hmac-sha1
1033: .It
1034: hmac-sha1-96
1035: .It
1036: hmac-sha2-256
1037: .It
1038: hmac-sha2-512
1039: .It
1040: umac-64@openssh.com
1041: .It
1042: umac-128@openssh.com
1043: .It
1044: hmac-md5-etm@openssh.com
1045: .It
1046: hmac-md5-96-etm@openssh.com
1047: .It
1048: hmac-sha1-etm@openssh.com
1049: .It
1050: hmac-sha1-96-etm@openssh.com
1051: .It
1052: hmac-sha2-256-etm@openssh.com
1053: .It
1054: hmac-sha2-512-etm@openssh.com
1055: .It
1056: umac-64-etm@openssh.com
1057: .It
1058: umac-128-etm@openssh.com
1059: .El
1060: .Pp
1.52 jmc 1061: The default is:
1.77 jmc 1062: .Bd -literal -offset indent
1.152 markus 1063: umac-64-etm@openssh.com,umac-128-etm@openssh.com,
1064: hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
1.217 djm 1065: hmac-sha1-etm@openssh.com,
1.173 naddy 1066: umac-64@openssh.com,umac-128@openssh.com,
1.217 djm 1067: hmac-sha2-256,hmac-sha2-512,hmac-sha1
1.77 jmc 1068: .Ed
1.188 djm 1069: .Pp
1.237 jmc 1070: The list of available MAC algorithms may also be obtained using
1071: .Qq ssh -Q mac .
1.60 dtucker 1072: .It Cm Match
1.61 jmc 1073: Introduces a conditional block.
1.65 dtucker 1074: If all of the criteria on the
1.60 dtucker 1075: .Cm Match
1.65 dtucker 1076: line are satisfied, the keywords on the following lines override those
1077: set in the global section of the config file, until either another
1.60 dtucker 1078: .Cm Match
1.65 dtucker 1079: line or the end of the file.
1.172 djm 1080: If a keyword appears in multiple
1081: .Cm Match
1.177 sobrado 1082: blocks that are satisfied, only the first instance of the keyword is
1.172 djm 1083: applied.
1.91 djm 1084: .Pp
1.61 jmc 1085: The arguments to
1.60 dtucker 1086: .Cm Match
1.163 dtucker 1087: are one or more criteria-pattern pairs or the single token
1088: .Cm All
1089: which matches all criteria.
1.60 dtucker 1090: The available criteria are
1091: .Cm User ,
1.69 dtucker 1092: .Cm Group ,
1.60 dtucker 1093: .Cm Host ,
1.139 dtucker 1094: .Cm LocalAddress ,
1095: .Cm LocalPort ,
1.258 djm 1096: .Cm RDomain ,
1.60 dtucker 1097: and
1.258 djm 1098: .Cm Address
1099: (with
1100: .Cm RDomain
1101: representing the
1102: .Xr rdomain 4
1.284 jmc 1103: on which the connection was received).
1.258 djm 1104: .Pp
1.91 djm 1105: The match patterns may consist of single entries or comma-separated
1106: lists and may use the wildcard and negation operators described in the
1.237 jmc 1107: .Sx PATTERNS
1108: section of
1.92 djm 1109: .Xr ssh_config 5 .
1.91 djm 1110: .Pp
1111: The patterns in an
1112: .Cm Address
1113: criteria may additionally contain addresses to match in CIDR
1.237 jmc 1114: address/masklen format,
1115: such as 192.0.2.0/24 or 2001:db8::/32.
1.91 djm 1116: Note that the mask length provided must be consistent with the address -
1117: it is an error to specify a mask length that is too long for the address
1.93 jmc 1118: or one with bits set in this host portion of the address.
1.237 jmc 1119: For example, 192.0.2.0/33 and 192.0.2.0/8, respectively.
1.91 djm 1120: .Pp
1.60 dtucker 1121: Only a subset of keywords may be used on the lines following a
1122: .Cm Match
1123: keyword.
1124: Available keywords are
1.142 jmc 1125: .Cm AcceptEnv ,
1.99 okan 1126: .Cm AllowAgentForwarding ,
1.142 jmc 1127: .Cm AllowGroups ,
1.193 djm 1128: .Cm AllowStreamLocalForwarding ,
1.62 dtucker 1129: .Cm AllowTcpForwarding ,
1.141 markus 1130: .Cm AllowUsers ,
1.149 djm 1131: .Cm AuthenticationMethods ,
1.146 djm 1132: .Cm AuthorizedKeysCommand ,
1133: .Cm AuthorizedKeysCommandUser ,
1.147 jmc 1134: .Cm AuthorizedKeysFile ,
1.214 djm 1135: .Cm AuthorizedPrincipalsCommand ,
1136: .Cm AuthorizedPrincipalsCommandUser ,
1.123 djm 1137: .Cm AuthorizedPrincipalsFile ,
1.72 dtucker 1138: .Cm Banner ,
1.85 djm 1139: .Cm ChrootDirectory ,
1.238 markus 1140: .Cm ClientAliveCountMax ,
1141: .Cm ClientAliveInterval ,
1.141 markus 1142: .Cm DenyGroups ,
1143: .Cm DenyUsers ,
1.67 dtucker 1144: .Cm ForceCommand ,
1.194 djm 1145: .Cm GatewayPorts ,
1.193 djm 1146: .Cm GSSAPIAuthentication ,
1.189 djm 1147: .Cm HostbasedAcceptedKeyTypes ,
1.87 djm 1148: .Cm HostbasedAuthentication ,
1.123 djm 1149: .Cm HostbasedUsesNameFromPacketOnly ,
1.193 djm 1150: .Cm IPQoS ,
1.74 jmc 1151: .Cm KbdInteractiveAuthentication ,
1.72 dtucker 1152: .Cm KerberosAuthentication ,
1.245 djm 1153: .Cm LogLevel ,
1.95 dtucker 1154: .Cm MaxAuthTries ,
1.94 dtucker 1155: .Cm MaxSessions ,
1.72 dtucker 1156: .Cm PasswordAuthentication ,
1.97 djm 1157: .Cm PermitEmptyPasswords ,
1.271 djm 1158: .Cm PermitListen ,
1.66 dtucker 1159: .Cm PermitOpen ,
1.79 dtucker 1160: .Cm PermitRootLogin ,
1.164 djm 1161: .Cm PermitTTY ,
1.123 djm 1162: .Cm PermitTunnel ,
1.174 djm 1163: .Cm PermitUserRC ,
1.189 djm 1164: .Cm PubkeyAcceptedKeyTypes ,
1.107 dtucker 1165: .Cm PubkeyAuthentication ,
1.159 dtucker 1166: .Cm RekeyLimit ,
1.193 djm 1167: .Cm RevokedKeys ,
1.257 djm 1168: .Cm RDomain ,
1.274 djm 1169: .Cm SetEnv ,
1.193 djm 1170: .Cm StreamLocalBindMask ,
1171: .Cm StreamLocalBindUnlink ,
1172: .Cm TrustedUserCAKeys ,
1.66 dtucker 1173: .Cm X11DisplayOffset ,
1.101 djm 1174: .Cm X11Forwarding
1.60 dtucker 1175: and
1.286 jmc 1176: .Cm X11UseLocalhost .
1.33 dtucker 1177: .It Cm MaxAuthTries
1178: Specifies the maximum number of authentication attempts permitted per
1.35 jmc 1179: connection.
1180: Once the number of failures reaches half this value,
1181: additional failures are logged.
1182: The default is 6.
1.90 djm 1183: .It Cm MaxSessions
1.216 djm 1184: Specifies the maximum number of open shell, login or subsystem (e.g. sftp)
1185: sessions permitted per network connection.
1186: Multiple sessions may be established by clients that support connection
1187: multiplexing.
1188: Setting
1189: .Cm MaxSessions
1190: to 1 will effectively disable session multiplexing, whereas setting it to 0
1191: will prevent all shell, login and subsystem sessions while still permitting
1192: forwarding.
1.90 djm 1193: The default is 10.
1.1 stevesk 1194: .It Cm MaxStartups
1195: Specifies the maximum number of concurrent unauthenticated connections to the
1.52 jmc 1196: SSH daemon.
1.1 stevesk 1197: Additional connections will be dropped until authentication succeeds or the
1198: .Cm LoginGraceTime
1199: expires for a connection.
1.156 dtucker 1200: The default is 10:30:100.
1.1 stevesk 1201: .Pp
1202: Alternatively, random early drop can be enabled by specifying
1203: the three colon separated values
1.237 jmc 1204: start:rate:full (e.g. "10:30:60").
1.53 jmc 1205: .Xr sshd 8
1.237 jmc 1206: will refuse connection attempts with a probability of rate/100 (30%)
1207: if there are currently start (10) unauthenticated connections.
1.1 stevesk 1208: The probability increases linearly and all connection attempts
1.237 jmc 1209: are refused if the number of unauthenticated connections reaches full (60).
1.1 stevesk 1210: .It Cm PasswordAuthentication
1211: Specifies whether password authentication is allowed.
1212: The default is
1.237 jmc 1213: .Cm yes .
1.1 stevesk 1214: .It Cm PermitEmptyPasswords
1215: When password authentication is allowed, it specifies whether the
1216: server allows login to accounts with empty password strings.
1217: The default is
1.237 jmc 1218: .Cm no .
1.271 djm 1219: .It Cm PermitListen
1220: Specifies the addresses/ports on which a remote TCP port forwarding may listen.
1221: The listen specification must be one of the following forms:
1222: .Pp
1223: .Bl -item -offset indent -compact
1224: .It
1225: .Cm PermitListen
1226: .Sm off
1.276 djm 1227: .Ar port
1.271 djm 1228: .Sm on
1229: .It
1230: .Cm PermitListen
1231: .Sm off
1.276 djm 1232: .Ar host : port
1.271 djm 1233: .Sm on
1234: .El
1235: .Pp
1236: Multiple permissions may be specified by separating them with whitespace.
1237: An argument of
1238: .Cm any
1239: can be used to remove all restrictions and permit any listen requests.
1240: An argument of
1241: .Cm none
1242: can be used to prohibit all listen requests.
1243: The host name may contain wildcards as described in the PATTERNS section in
1244: .Xr ssh_config 5 .
1245: The wildcard
1246: .Sq *
1247: can also be used in place of a port number to allow all ports.
1248: By default all port forwarding listen requests are permitted.
1.272 jmc 1249: Note that the
1.271 djm 1250: .Cm GatewayPorts
1251: option may further restrict which addresses may be listened on.
1.276 djm 1252: Note also that
1253: .Xr ssh 1
1254: will request a listen host of
1255: .Dq localhost
1.283 dtucker 1256: if no listen host was specifically requested, and this name is
1.277 jmc 1257: treated differently to explicit localhost addresses of
1.276 djm 1258: .Dq 127.0.0.1
1259: and
1260: .Dq ::1 .
1.62 dtucker 1261: .It Cm PermitOpen
1262: Specifies the destinations to which TCP port forwarding is permitted.
1263: The forwarding specification must be one of the following forms:
1264: .Pp
1265: .Bl -item -offset indent -compact
1266: .It
1267: .Cm PermitOpen
1268: .Sm off
1269: .Ar host : port
1270: .Sm on
1271: .It
1272: .Cm PermitOpen
1273: .Sm off
1274: .Ar IPv4_addr : port
1275: .Sm on
1276: .It
1277: .Cm PermitOpen
1278: .Sm off
1279: .Ar \&[ IPv6_addr \&] : port
1280: .Sm on
1281: .El
1282: .Pp
1.68 dtucker 1283: Multiple forwards may be specified by separating them with whitespace.
1.62 dtucker 1284: An argument of
1.237 jmc 1285: .Cm any
1.62 dtucker 1286: can be used to remove all restrictions and permit any forwarding requests.
1.140 dtucker 1287: An argument of
1.237 jmc 1288: .Cm none
1.140 dtucker 1289: can be used to prohibit all forwarding requests.
1.227 jmc 1290: The wildcard
1.237 jmc 1291: .Sq *
1.299 djm 1292: can be used for host or port to allow all hosts or ports respectively.
1293: Otherwise, no pattern matching or address lookups are performed on supplied
1294: names.
1.63 jmc 1295: By default all port forwarding requests are permitted.
1.1 stevesk 1296: .It Cm PermitRootLogin
1.38 jmc 1297: Specifies whether root can log in using
1.1 stevesk 1298: .Xr ssh 1 .
1299: The argument must be
1.237 jmc 1300: .Cm yes ,
1301: .Cm prohibit-password ,
1302: .Cm forced-commands-only ,
1.1 stevesk 1303: or
1.237 jmc 1304: .Cm no .
1.1 stevesk 1305: The default is
1.237 jmc 1306: .Cm prohibit-password .
1.1 stevesk 1307: .Pp
1308: If this option is set to
1.237 jmc 1309: .Cm prohibit-password
1.255 jmc 1310: (or its deprecated alias,
1311: .Cm without-password ) ,
1.210 deraadt 1312: password and keyboard-interactive authentication are disabled for root.
1.1 stevesk 1313: .Pp
1314: If this option is set to
1.237 jmc 1315: .Cm forced-commands-only ,
1.1 stevesk 1316: root login with public key authentication will be allowed,
1317: but only if the
1318: .Ar command
1319: option has been specified
1320: (which may be useful for taking remote backups even if root login is
1.17 jmc 1321: normally not allowed).
1322: All other authentication methods are disabled for root.
1.1 stevesk 1323: .Pp
1324: If this option is set to
1.237 jmc 1325: .Cm no ,
1.38 jmc 1326: root is not allowed to log in.
1.231 jmc 1327: .It Cm PermitTTY
1328: Specifies whether
1329: .Xr pty 4
1330: allocation is permitted.
1331: The default is
1.237 jmc 1332: .Cm yes .
1.46 reyk 1333: .It Cm PermitTunnel
1334: Specifies whether
1335: .Xr tun 4
1336: device forwarding is allowed.
1.47 reyk 1337: The argument must be
1.237 jmc 1338: .Cm yes ,
1339: .Cm point-to-point
1.58 stevesk 1340: (layer 3),
1.237 jmc 1341: .Cm ethernet
1.58 stevesk 1342: (layer 2), or
1.237 jmc 1343: .Cm no .
1.58 stevesk 1344: Specifying
1.237 jmc 1345: .Cm yes
1.58 stevesk 1346: permits both
1.237 jmc 1347: .Cm point-to-point
1.58 stevesk 1348: and
1.237 jmc 1349: .Cm ethernet .
1.46 reyk 1350: The default is
1.237 jmc 1351: .Cm no .
1.178 djm 1352: .Pp
1353: Independent of this setting, the permissions of the selected
1354: .Xr tun 4
1355: device must allow access to the user.
1.6 markus 1356: .It Cm PermitUserEnvironment
1357: Specifies whether
1358: .Pa ~/.ssh/environment
1.9 stevesk 1359: and
1.6 markus 1360: .Cm environment=
1361: options in
1362: .Pa ~/.ssh/authorized_keys
1.9 stevesk 1363: are processed by
1.52 jmc 1364: .Xr sshd 8 .
1.278 djm 1365: Valid options are
1366: .Cm yes ,
1367: .Cm no
1368: or a pattern-list specifying which environment variable names to accept
1369: (for example
1370: .Qq LANG,LC_* ) .
1.6 markus 1371: The default is
1.237 jmc 1372: .Cm no .
1.9 stevesk 1373: Enabling environment processing may enable users to bypass access
1374: restrictions in some configurations using mechanisms such as
1375: .Ev LD_PRELOAD .
1.174 djm 1376: .It Cm PermitUserRC
1377: Specifies whether any
1378: .Pa ~/.ssh/rc
1379: file is executed.
1380: The default is
1.237 jmc 1381: .Cm yes .
1.1 stevesk 1382: .It Cm PidFile
1.4 stevesk 1383: Specifies the file that contains the process ID of the
1.195 dtucker 1384: SSH daemon, or
1.237 jmc 1385: .Cm none
1.195 dtucker 1386: to not write one.
1.1 stevesk 1387: The default is
1388: .Pa /var/run/sshd.pid .
1389: .It Cm Port
1390: Specifies the port number that
1.52 jmc 1391: .Xr sshd 8
1.1 stevesk 1392: listens on.
1393: The default is 22.
1394: Multiple options of this type are permitted.
1395: See also
1396: .Cm ListenAddress .
1397: .It Cm PrintLastLog
1398: Specifies whether
1.52 jmc 1399: .Xr sshd 8
1.36 jaredy 1400: should print the date and time of the last user login when a user logs
1401: in interactively.
1.1 stevesk 1402: The default is
1.237 jmc 1403: .Cm yes .
1.1 stevesk 1404: .It Cm PrintMotd
1405: Specifies whether
1.52 jmc 1406: .Xr sshd 8
1.1 stevesk 1407: should print
1408: .Pa /etc/motd
1409: when a user logs in interactively.
1410: (On some systems it is also printed by the shell,
1411: .Pa /etc/profile ,
1412: or equivalent.)
1413: The default is
1.237 jmc 1414: .Cm yes .
1.189 djm 1415: .It Cm PubkeyAcceptedKeyTypes
1416: Specifies the key types that will be accepted for public key authentication
1.280 djm 1417: as a list of comma-separated patterns.
1.289 naddy 1418: Alternately if the specified list begins with a
1.208 djm 1419: .Sq +
1420: character, then the specified key types will be appended to the default set
1421: instead of replacing them.
1.289 naddy 1422: If the specified list begins with a
1.242 djm 1423: .Sq -
1424: character, then the specified key types (including wildcards) will be removed
1425: from the default set instead of replacing them.
1.290 naddy 1426: If the specified list begins with a
1427: .Sq ^
1428: character, then the specified key types will be placed at the head of the
1429: default set.
1.206 markus 1430: The default for this option is:
1431: .Bd -literal -offset 3n
1432: ecdsa-sha2-nistp256-cert-v01@openssh.com,
1433: ecdsa-sha2-nistp384-cert-v01@openssh.com,
1434: ecdsa-sha2-nistp521-cert-v01@openssh.com,
1.296 naddy 1435: sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,
1436: ssh-ed25519-cert-v01@openssh.com,
1.292 djm 1437: sk-ssh-ed25519-cert-v01@openssh.com,
1.291 naddy 1438: rsa-sha2-512-cert-v01@openssh.com,
1439: rsa-sha2-256-cert-v01@openssh.com,
1.206 markus 1440: ssh-rsa-cert-v01@openssh.com,
1.296 naddy 1441: ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
1.291 naddy 1442: sk-ecdsa-sha2-nistp256@openssh.com,
1.296 naddy 1443: ssh-ed25519,sk-ssh-ed25519@openssh.com,
1444: rsa-sha2-512,rsa-sha2-256,ssh-rsa
1.206 markus 1445: .Ed
1446: .Pp
1.237 jmc 1447: The list of available key types may also be obtained using
1448: .Qq ssh -Q key .
1.293 djm 1449: .It Cm PubkeyAuthOptions
1450: Sets one or more public key authentication options.
1451: Two option keywords are currently supported:
1.294 jmc 1452: .Cm none
1453: (the default; indicating no additional options are enabled)
1.293 djm 1454: and
1455: .Cm touch-required .
1456: .Pp
1457: The
1458: .Cm touch-required
1.297 naddy 1459: option causes public key authentication using a FIDO authenticator algorithm
1.294 jmc 1460: (i.e.\&
1.293 djm 1461: .Cm ecdsa-sk
1462: or
1463: .Cm ed25519-sk )
1464: to always require the signature to attest that a physically present user
1.297 naddy 1465: explicitly confirmed the authentication (usually by touching the authenticator).
1.293 djm 1466: By default,
1467: .Xr sshd 8
1.297 naddy 1468: requires user presence unless overridden with an authorized_keys option.
1.293 djm 1469: The
1470: .Cm touch-required
1471: flag disables this override.
1.297 naddy 1472: This option has no effect for other, non-authenticator public key types.
1.1 stevesk 1473: .It Cm PubkeyAuthentication
1474: Specifies whether public key authentication is allowed.
1475: The default is
1.237 jmc 1476: .Cm yes .
1.159 dtucker 1477: .It Cm RekeyLimit
1478: Specifies the maximum amount of data that may be transmitted before the
1479: session key is renegotiated, optionally followed a maximum amount of
1480: time that may pass before the session key is renegotiated.
1481: The first argument is specified in bytes and may have a suffix of
1482: .Sq K ,
1483: .Sq M ,
1484: or
1485: .Sq G
1486: to indicate Kilobytes, Megabytes, or Gigabytes, respectively.
1487: The default is between
1488: .Sq 1G
1489: and
1490: .Sq 4G ,
1491: depending on the cipher.
1492: The optional second value is specified in seconds and may use any of the
1493: units documented in the
1494: .Sx TIME FORMATS
1.160 jmc 1495: section.
1.159 dtucker 1496: The default value for
1497: .Cm RekeyLimit
1498: is
1.237 jmc 1499: .Cm default none ,
1.159 dtucker 1500: which means that rekeying is performed after the cipher's default amount
1501: of data has been sent or received and no time based rekeying is done.
1.118 djm 1502: .It Cm RevokedKeys
1.195 dtucker 1503: Specifies revoked public keys file, or
1.237 jmc 1504: .Cm none
1.195 dtucker 1505: to not use one.
1.118 djm 1506: Keys listed in this file will be refused for public key authentication.
1507: Note that if this file is not readable, then public key authentication will
1508: be refused for all users.
1.154 djm 1509: Keys may be specified as a text file, listing one public key per line, or as
1510: an OpenSSH Key Revocation List (KRL) as generated by
1.155 jmc 1511: .Xr ssh-keygen 1 .
1.161 jmc 1512: For more information on KRLs, see the KEY REVOCATION LISTS section in
1.154 djm 1513: .Xr ssh-keygen 1 .
1.257 djm 1514: .It Cm RDomain
1515: Specifies an explicit routing domain that is applied after authentication
1516: has completed.
1.259 jmc 1517: The user session, as well and any forwarded or listening IP sockets,
1518: will be bound to this
1.257 djm 1519: .Xr rdomain 4 .
1520: If the routing domain is set to
1521: .Cm \&%D ,
1.259 jmc 1522: then the domain in which the incoming connection was received will be applied.
1.296 naddy 1523: .It Cm SecurityKeyProvider
1.297 naddy 1524: Specifies a path to a library that will be used when loading
1525: FIDO authenticator-hosted keys, overriding the default of using
1526: the built-in USB HID support.
1.274 djm 1527: .It Cm SetEnv
1528: Specifies one or more environment variables to set in child sessions started
1529: by
1530: .Xr sshd 8
1531: as
1532: .Dq NAME=VALUE .
1533: The environment value may be quoted (e.g. if it contains whitespace
1534: characters).
1535: Environment variables set by
1536: .Cm SetEnv
1537: override the default environment and any variables specified by the user
1538: via
1539: .Cm AcceptEnv
1540: or
1541: .Cm PermitUserEnvironment .
1.175 millert 1542: .It Cm StreamLocalBindMask
1543: Sets the octal file creation mode mask
1544: .Pq umask
1545: used when creating a Unix-domain socket file for local or remote
1546: port forwarding.
1547: This option is only used for port forwarding to a Unix-domain socket file.
1548: .Pp
1549: The default value is 0177, which creates a Unix-domain socket file that is
1550: readable and writable only by the owner.
1551: Note that not all operating systems honor the file mode on Unix-domain
1552: socket files.
1553: .It Cm StreamLocalBindUnlink
1554: Specifies whether to remove an existing Unix-domain socket file for local
1555: or remote port forwarding before creating a new one.
1556: If the socket file already exists and
1557: .Cm StreamLocalBindUnlink
1558: is not enabled,
1559: .Nm sshd
1560: will be unable to forward the port to the Unix-domain socket file.
1561: This option is only used for port forwarding to a Unix-domain socket file.
1562: .Pp
1563: The argument must be
1.237 jmc 1564: .Cm yes
1.175 millert 1565: or
1.237 jmc 1566: .Cm no .
1.175 millert 1567: The default is
1.237 jmc 1568: .Cm no .
1.1 stevesk 1569: .It Cm StrictModes
1570: Specifies whether
1.52 jmc 1571: .Xr sshd 8
1.1 stevesk 1572: should check file modes and ownership of the
1573: user's files and home directory before accepting login.
1574: This is normally desirable because novices sometimes accidentally leave their
1575: directory or files world-writable.
1576: The default is
1.237 jmc 1577: .Cm yes .
1.112 djm 1578: Note that this does not apply to
1579: .Cm ChrootDirectory ,
1580: whose permissions and ownership are checked unconditionally.
1.1 stevesk 1581: .It Cm Subsystem
1.51 jmc 1582: Configures an external subsystem (e.g. file transfer daemon).
1.59 djm 1583: Arguments should be a subsystem name and a command (with optional arguments)
1584: to execute upon subsystem request.
1.80 djm 1585: .Pp
1.1 stevesk 1586: The command
1.237 jmc 1587: .Cm sftp-server
1588: implements the SFTP file transfer subsystem.
1.80 djm 1589: .Pp
1590: Alternately the name
1.237 jmc 1591: .Cm internal-sftp
1592: implements an in-process SFTP server.
1.80 djm 1593: This may simplify configurations using
1594: .Cm ChrootDirectory
1595: to force a different filesystem root on clients.
1596: .Pp
1.1 stevesk 1597: By default no subsystems are defined.
1598: .It Cm SyslogFacility
1599: Gives the facility code that is used when logging messages from
1.53 jmc 1600: .Xr sshd 8 .
1.1 stevesk 1601: The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2,
1602: LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
1603: The default is AUTH.
1.27 markus 1604: .It Cm TCPKeepAlive
1605: Specifies whether the system should send TCP keepalive messages to the
1606: other side.
1607: If they are sent, death of the connection or crash of one
1608: of the machines will be properly noticed.
1609: However, this means that
1610: connections will die if the route is down temporarily, and some people
1611: find it annoying.
1612: On the other hand, if TCP keepalives are not sent,
1613: sessions may hang indefinitely on the server, leaving
1.237 jmc 1614: .Qq ghost
1.27 markus 1615: users and consuming server resources.
1616: .Pp
1617: The default is
1.237 jmc 1618: .Cm yes
1.27 markus 1619: (to send TCP keepalive messages), and the server will notice
1620: if the network goes down or the client host crashes.
1621: This avoids infinitely hanging sessions.
1622: .Pp
1623: To disable TCP keepalive messages, the value should be set to
1.237 jmc 1624: .Cm no .
1.118 djm 1625: .It Cm TrustedUserCAKeys
1626: Specifies a file containing public keys of certificate authorities that are
1.195 dtucker 1627: trusted to sign user certificates for authentication, or
1.237 jmc 1628: .Cm none
1.195 dtucker 1629: to not use one.
1.119 jmc 1630: Keys are listed one per line; empty lines and comments starting with
1.118 djm 1631: .Ql #
1632: are allowed.
1633: If a certificate is presented for authentication and has its signing CA key
1634: listed in this file, then it may be used for authentication for any user
1635: listed in the certificate's principals list.
1636: Note that certificates that lack a list of principals will not be permitted
1637: for authentication using
1638: .Cm TrustedUserCAKeys .
1.161 jmc 1639: For more details on certificates, see the CERTIFICATES section in
1.118 djm 1640: .Xr ssh-keygen 1 .
1.18 markus 1641: .It Cm UseDNS
1642: Specifies whether
1.52 jmc 1643: .Xr sshd 8
1.207 djm 1644: should look up the remote host name, and to check that
1.18 markus 1645: the resolved host name for the remote IP address maps back to the
1646: very same IP address.
1.207 djm 1647: .Pp
1648: If this option is set to
1.237 jmc 1649: .Cm no
1.207 djm 1650: (the default) then only addresses and not host names may be used in
1.221 djm 1651: .Pa ~/.ssh/authorized_keys
1.207 djm 1652: .Cm from
1653: and
1.211 jmc 1654: .Nm
1.207 djm 1655: .Cm Match
1656: .Cm Host
1657: directives.
1.137 djm 1658: .It Cm VersionAddendum
1659: Optionally specifies additional text to append to the SSH protocol banner
1660: sent by the server upon connection.
1661: The default is
1.237 jmc 1662: .Cm none .
1.1 stevesk 1663: .It Cm X11DisplayOffset
1664: Specifies the first display number available for
1.52 jmc 1665: .Xr sshd 8 Ns 's
1.1 stevesk 1666: X11 forwarding.
1.52 jmc 1667: This prevents sshd from interfering with real X11 servers.
1.1 stevesk 1668: The default is 10.
1669: .It Cm X11Forwarding
1670: Specifies whether X11 forwarding is permitted.
1.13 stevesk 1671: The argument must be
1.237 jmc 1672: .Cm yes
1.13 stevesk 1673: or
1.237 jmc 1674: .Cm no .
1.1 stevesk 1675: The default is
1.237 jmc 1676: .Cm no .
1.13 stevesk 1677: .Pp
1678: When X11 forwarding is enabled, there may be additional exposure to
1679: the server and to client displays if the
1.52 jmc 1680: .Xr sshd 8
1.13 stevesk 1681: proxy display is configured to listen on the wildcard address (see
1.237 jmc 1682: .Cm X11UseLocalhost ) ,
1683: though this is not the default.
1.13 stevesk 1684: Additionally, the authentication spoofing and authentication data
1685: verification and substitution occur on the client side.
1686: The security risk of using X11 forwarding is that the client's X11
1.52 jmc 1687: display server may be exposed to attack when the SSH client requests
1.13 stevesk 1688: forwarding (see the warnings for
1689: .Cm ForwardX11
1690: in
1.19 jmc 1691: .Xr ssh_config 5 ) .
1.13 stevesk 1692: A system administrator may have a stance in which they want to
1693: protect clients that may expose themselves to attack by unwittingly
1694: requesting X11 forwarding, which can warrant a
1.237 jmc 1695: .Cm no
1.13 stevesk 1696: setting.
1697: .Pp
1698: Note that disabling X11 forwarding does not prevent users from
1699: forwarding X11 traffic, as users can always install their own forwarders.
1.1 stevesk 1700: .It Cm X11UseLocalhost
1701: Specifies whether
1.52 jmc 1702: .Xr sshd 8
1.1 stevesk 1703: should bind the X11 forwarding server to the loopback address or to
1.15 jmc 1704: the wildcard address.
1705: By default,
1.52 jmc 1706: sshd binds the forwarding server to the loopback address and sets the
1.1 stevesk 1707: hostname part of the
1708: .Ev DISPLAY
1709: environment variable to
1.237 jmc 1710: .Cm localhost .
1.8 stevesk 1711: This prevents remote hosts from connecting to the proxy display.
1.1 stevesk 1712: However, some older X11 clients may not function with this
1713: configuration.
1714: .Cm X11UseLocalhost
1715: may be set to
1.237 jmc 1716: .Cm no
1.1 stevesk 1717: to specify that the forwarding server should be bound to the wildcard
1718: address.
1719: The argument must be
1.237 jmc 1720: .Cm yes
1.1 stevesk 1721: or
1.237 jmc 1722: .Cm no .
1.1 stevesk 1723: The default is
1.237 jmc 1724: .Cm yes .
1.1 stevesk 1725: .It Cm XAuthLocation
1.11 stevesk 1726: Specifies the full pathname of the
1.1 stevesk 1727: .Xr xauth 1
1.195 dtucker 1728: program, or
1.237 jmc 1729: .Cm none
1.195 dtucker 1730: to not use one.
1.1 stevesk 1731: The default is
1732: .Pa /usr/X11R6/bin/xauth .
1733: .El
1.55 jmc 1734: .Sh TIME FORMATS
1.53 jmc 1735: .Xr sshd 8
1.1 stevesk 1736: command-line arguments and configuration file options that specify time
1737: may be expressed using a sequence of the form:
1738: .Sm off
1.7 stevesk 1739: .Ar time Op Ar qualifier ,
1.1 stevesk 1740: .Sm on
1741: where
1742: .Ar time
1743: is a positive integer value and
1744: .Ar qualifier
1745: is one of the following:
1746: .Pp
1747: .Bl -tag -width Ds -compact -offset indent
1.64 jmc 1748: .It Aq Cm none
1.1 stevesk 1749: seconds
1750: .It Cm s | Cm S
1751: seconds
1752: .It Cm m | Cm M
1753: minutes
1754: .It Cm h | Cm H
1755: hours
1756: .It Cm d | Cm D
1757: days
1758: .It Cm w | Cm W
1759: weeks
1760: .El
1761: .Pp
1762: Each member of the sequence is added together to calculate
1763: the total time value.
1764: .Pp
1765: Time format examples:
1766: .Pp
1767: .Bl -tag -width Ds -compact -offset indent
1768: .It 600
1769: 600 seconds (10 minutes)
1770: .It 10m
1771: 10 minutes
1772: .It 1h30m
1773: 1 hour 30 minutes (90 minutes)
1774: .El
1.235 jmc 1775: .Sh TOKENS
1776: Arguments to some keywords can make use of tokens,
1777: which are expanded at runtime:
1778: .Pp
1779: .Bl -tag -width XXXX -offset indent -compact
1780: .It %%
1781: A literal
1782: .Sq % .
1.257 djm 1783: .It \&%D
1784: The routing domain in which the incoming connection was received.
1.235 jmc 1785: .It %F
1786: The fingerprint of the CA key.
1787: .It %f
1788: The fingerprint of the key or certificate.
1789: .It %h
1790: The home directory of the user.
1791: .It %i
1792: The key ID in the certificate.
1793: .It %K
1794: The base64-encoded CA key.
1795: .It %k
1796: The base64-encoded key or certificate for authentication.
1797: .It %s
1798: The serial number of the certificate.
1799: .It \&%T
1800: The type of the CA key.
1801: .It %t
1802: The key or certificate type.
1.268 jmc 1803: .It \&%U
1804: The numeric user ID of the target user.
1.235 jmc 1805: .It %u
1806: The username.
1807: .El
1808: .Pp
1809: .Cm AuthorizedKeysCommand
1.270 jmc 1810: accepts the tokens %%, %f, %h, %k, %t, %U, and %u.
1.235 jmc 1811: .Pp
1812: .Cm AuthorizedKeysFile
1.270 jmc 1813: accepts the tokens %%, %h, %U, and %u.
1.235 jmc 1814: .Pp
1815: .Cm AuthorizedPrincipalsCommand
1.270 jmc 1816: accepts the tokens %%, %F, %f, %h, %i, %K, %k, %s, %T, %t, %U, and %u.
1.235 jmc 1817: .Pp
1818: .Cm AuthorizedPrincipalsFile
1.270 jmc 1819: accepts the tokens %%, %h, %U, and %u.
1.235 jmc 1820: .Pp
1821: .Cm ChrootDirectory
1.270 jmc 1822: accepts the tokens %%, %h, %U, and %u.
1.257 djm 1823: .Pp
1824: .Cm RoutingDomain
1825: accepts the token %D.
1.1 stevesk 1826: .Sh FILES
1827: .Bl -tag -width Ds
1828: .It Pa /etc/ssh/sshd_config
1829: Contains configuration data for
1.53 jmc 1830: .Xr sshd 8 .
1.1 stevesk 1831: This file should be writable by root only, but it is recommended
1832: (though not necessary) that it be world-readable.
1833: .El
1.19 jmc 1834: .Sh SEE ALSO
1.237 jmc 1835: .Xr sftp-server 8 ,
1.19 jmc 1836: .Xr sshd 8
1.1 stevesk 1837: .Sh AUTHORS
1.237 jmc 1838: .An -nosplit
1.1 stevesk 1839: OpenSSH is a derivative of the original and free
1.237 jmc 1840: ssh 1.2.12 release by
1841: .An Tatu Ylonen .
1842: .An Aaron Campbell , Bob Beck , Markus Friedl , Niels Provos ,
1843: .An Theo de Raadt
1844: and
1845: .An Dug Song
1.1 stevesk 1846: removed many bugs, re-added newer features and
1847: created OpenSSH.
1.237 jmc 1848: .An Markus Friedl
1849: contributed the support for SSH protocol versions 1.5 and 2.0.
1850: .An Niels Provos
1851: and
1852: .An Markus Friedl
1853: contributed support for privilege separation.