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