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