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