Annotation of src/usr.bin/ssh/sshd_config.5, Revision 1.354
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.354 ! djm 36: .\" $OpenBSD: sshd_config.5,v 1.353 2024/02/21 06:05:06 djm Exp $
! 37: .Dd $Mdocdate: February 21 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
1.354 ! djm 489: which are not writable by group or others.
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
1.353 djm 1130: Specify one or more overrides to
1131: .Cm LogLevel .
1.317 djm 1132: An override consists of a pattern lists that matches the source file, function
1133: and line number to force detailed logging for.
1134: For example, an override pattern of:
1135: .Bd -literal -offset indent
1136: kex.c:*:1000,*:kex_exchange_identification():*,packet.c:*
1137: .Ed
1138: .Pp
1139: would enable detailed logging for line 1000 of
1.318 jmc 1140: .Pa kex.c ,
1.317 djm 1141: everything in the
1142: .Fn kex_exchange_identification
1143: function, and all code in the
1144: .Pa packet.c
1145: file.
1146: This option is intended for debugging and no overrides are enabled by default.
1.1 stevesk 1147: .It Cm MACs
1148: Specifies the available MAC (message authentication code) algorithms.
1.219 jmc 1149: The MAC algorithm is used for data integrity protection.
1.1 stevesk 1150: Multiple algorithms must be comma-separated.
1.289 naddy 1151: If the specified list begins with a
1.208 djm 1152: .Sq +
1153: character, then the specified algorithms will be appended to the default set
1154: instead of replacing them.
1.289 naddy 1155: If the specified list begins with a
1.242 djm 1156: .Sq -
1157: character, then the specified algorithms (including wildcards) will be removed
1158: from the default set instead of replacing them.
1.290 naddy 1159: If the specified list begins with a
1160: .Sq ^
1161: character, then the specified algorithms will be placed at the head of the
1162: default set.
1.208 djm 1163: .Pp
1.152 markus 1164: The algorithms that contain
1.237 jmc 1165: .Qq -etm
1.152 markus 1166: calculate the MAC after encryption (encrypt-then-mac).
1167: These are considered safer and their use recommended.
1.173 naddy 1168: The supported MACs are:
1169: .Pp
1170: .Bl -item -compact -offset indent
1171: .It
1172: hmac-md5
1173: .It
1174: hmac-md5-96
1175: .It
1176: hmac-sha1
1177: .It
1178: hmac-sha1-96
1179: .It
1180: hmac-sha2-256
1181: .It
1182: hmac-sha2-512
1183: .It
1184: umac-64@openssh.com
1185: .It
1186: umac-128@openssh.com
1187: .It
1188: hmac-md5-etm@openssh.com
1189: .It
1190: hmac-md5-96-etm@openssh.com
1191: .It
1192: hmac-sha1-etm@openssh.com
1193: .It
1194: hmac-sha1-96-etm@openssh.com
1195: .It
1196: hmac-sha2-256-etm@openssh.com
1197: .It
1198: hmac-sha2-512-etm@openssh.com
1199: .It
1200: umac-64-etm@openssh.com
1201: .It
1202: umac-128-etm@openssh.com
1203: .El
1204: .Pp
1.52 jmc 1205: The default is:
1.77 jmc 1206: .Bd -literal -offset indent
1.152 markus 1207: umac-64-etm@openssh.com,umac-128-etm@openssh.com,
1208: hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
1.217 djm 1209: hmac-sha1-etm@openssh.com,
1.173 naddy 1210: umac-64@openssh.com,umac-128@openssh.com,
1.217 djm 1211: hmac-sha2-256,hmac-sha2-512,hmac-sha1
1.77 jmc 1212: .Ed
1.188 djm 1213: .Pp
1.237 jmc 1214: The list of available MAC algorithms may also be obtained using
1215: .Qq ssh -Q mac .
1.60 dtucker 1216: .It Cm Match
1.61 jmc 1217: Introduces a conditional block.
1.65 dtucker 1218: If all of the criteria on the
1.60 dtucker 1219: .Cm Match
1.65 dtucker 1220: line are satisfied, the keywords on the following lines override those
1221: set in the global section of the config file, until either another
1.60 dtucker 1222: .Cm Match
1.65 dtucker 1223: line or the end of the file.
1.172 djm 1224: If a keyword appears in multiple
1225: .Cm Match
1.177 sobrado 1226: blocks that are satisfied, only the first instance of the keyword is
1.172 djm 1227: applied.
1.91 djm 1228: .Pp
1.61 jmc 1229: The arguments to
1.60 dtucker 1230: .Cm Match
1.163 dtucker 1231: are one or more criteria-pattern pairs or the single token
1232: .Cm All
1233: which matches all criteria.
1.60 dtucker 1234: The available criteria are
1235: .Cm User ,
1.69 dtucker 1236: .Cm Group ,
1.60 dtucker 1237: .Cm Host ,
1.139 dtucker 1238: .Cm LocalAddress ,
1239: .Cm LocalPort ,
1.258 djm 1240: .Cm RDomain ,
1.60 dtucker 1241: and
1.258 djm 1242: .Cm Address
1243: (with
1244: .Cm RDomain
1245: representing the
1246: .Xr rdomain 4
1.284 jmc 1247: on which the connection was received).
1.258 djm 1248: .Pp
1.91 djm 1249: The match patterns may consist of single entries or comma-separated
1250: lists and may use the wildcard and negation operators described in the
1.237 jmc 1251: .Sx PATTERNS
1252: section of
1.92 djm 1253: .Xr ssh_config 5 .
1.91 djm 1254: .Pp
1255: The patterns in an
1256: .Cm Address
1257: criteria may additionally contain addresses to match in CIDR
1.237 jmc 1258: address/masklen format,
1259: such as 192.0.2.0/24 or 2001:db8::/32.
1.91 djm 1260: Note that the mask length provided must be consistent with the address -
1261: it is an error to specify a mask length that is too long for the address
1.93 jmc 1262: or one with bits set in this host portion of the address.
1.237 jmc 1263: For example, 192.0.2.0/33 and 192.0.2.0/8, respectively.
1.91 djm 1264: .Pp
1.60 dtucker 1265: Only a subset of keywords may be used on the lines following a
1266: .Cm Match
1267: keyword.
1268: Available keywords are
1.142 jmc 1269: .Cm AcceptEnv ,
1.99 okan 1270: .Cm AllowAgentForwarding ,
1.142 jmc 1271: .Cm AllowGroups ,
1.193 djm 1272: .Cm AllowStreamLocalForwarding ,
1.62 dtucker 1273: .Cm AllowTcpForwarding ,
1.141 markus 1274: .Cm AllowUsers ,
1.149 djm 1275: .Cm AuthenticationMethods ,
1.146 djm 1276: .Cm AuthorizedKeysCommand ,
1277: .Cm AuthorizedKeysCommandUser ,
1.147 jmc 1278: .Cm AuthorizedKeysFile ,
1.214 djm 1279: .Cm AuthorizedPrincipalsCommand ,
1280: .Cm AuthorizedPrincipalsCommandUser ,
1.123 djm 1281: .Cm AuthorizedPrincipalsFile ,
1.72 dtucker 1282: .Cm Banner ,
1.336 dtucker 1283: .Cm CASignatureAlgorithms ,
1.346 djm 1284: .Cm ChannelTimeout ,
1.85 djm 1285: .Cm ChrootDirectory ,
1.238 markus 1286: .Cm ClientAliveCountMax ,
1287: .Cm ClientAliveInterval ,
1.141 markus 1288: .Cm DenyGroups ,
1289: .Cm DenyUsers ,
1.320 djm 1290: .Cm DisableForwarding ,
1.336 dtucker 1291: .Cm ExposeAuthInfo ,
1.67 dtucker 1292: .Cm ForceCommand ,
1.194 djm 1293: .Cm GatewayPorts ,
1.193 djm 1294: .Cm GSSAPIAuthentication ,
1.325 dtucker 1295: .Cm HostbasedAcceptedAlgorithms ,
1.87 djm 1296: .Cm HostbasedAuthentication ,
1.123 djm 1297: .Cm HostbasedUsesNameFromPacketOnly ,
1.308 djm 1298: .Cm IgnoreRhosts ,
1.306 naddy 1299: .Cm Include ,
1.193 djm 1300: .Cm IPQoS ,
1.74 jmc 1301: .Cm KbdInteractiveAuthentication ,
1.72 dtucker 1302: .Cm KerberosAuthentication ,
1.245 djm 1303: .Cm LogLevel ,
1.95 dtucker 1304: .Cm MaxAuthTries ,
1.94 dtucker 1305: .Cm MaxSessions ,
1.72 dtucker 1306: .Cm PasswordAuthentication ,
1.97 djm 1307: .Cm PermitEmptyPasswords ,
1.271 djm 1308: .Cm PermitListen ,
1.66 dtucker 1309: .Cm PermitOpen ,
1.79 dtucker 1310: .Cm PermitRootLogin ,
1.164 djm 1311: .Cm PermitTTY ,
1.123 djm 1312: .Cm PermitTunnel ,
1.174 djm 1313: .Cm PermitUserRC ,
1.324 dtucker 1314: .Cm PubkeyAcceptedAlgorithms ,
1.107 dtucker 1315: .Cm PubkeyAuthentication ,
1.336 dtucker 1316: .Cm PubkeyAuthOptions ,
1.159 dtucker 1317: .Cm RekeyLimit ,
1.193 djm 1318: .Cm RevokedKeys ,
1.257 djm 1319: .Cm RDomain ,
1.274 djm 1320: .Cm SetEnv ,
1.193 djm 1321: .Cm StreamLocalBindMask ,
1322: .Cm StreamLocalBindUnlink ,
1323: .Cm TrustedUserCAKeys ,
1.346 djm 1324: .Cm UnusedConnectionTimeout ,
1.66 dtucker 1325: .Cm X11DisplayOffset ,
1.101 djm 1326: .Cm X11Forwarding
1.60 dtucker 1327: and
1.286 jmc 1328: .Cm X11UseLocalhost .
1.33 dtucker 1329: .It Cm MaxAuthTries
1330: Specifies the maximum number of authentication attempts permitted per
1.35 jmc 1331: connection.
1332: Once the number of failures reaches half this value,
1333: additional failures are logged.
1334: The default is 6.
1.90 djm 1335: .It Cm MaxSessions
1.216 djm 1336: Specifies the maximum number of open shell, login or subsystem (e.g. sftp)
1337: sessions permitted per network connection.
1338: Multiple sessions may be established by clients that support connection
1339: multiplexing.
1340: Setting
1341: .Cm MaxSessions
1342: to 1 will effectively disable session multiplexing, whereas setting it to 0
1343: will prevent all shell, login and subsystem sessions while still permitting
1344: forwarding.
1.90 djm 1345: The default is 10.
1.1 stevesk 1346: .It Cm MaxStartups
1347: Specifies the maximum number of concurrent unauthenticated connections to the
1.52 jmc 1348: SSH daemon.
1.1 stevesk 1349: Additional connections will be dropped until authentication succeeds or the
1350: .Cm LoginGraceTime
1351: expires for a connection.
1.156 dtucker 1352: The default is 10:30:100.
1.1 stevesk 1353: .Pp
1354: Alternatively, random early drop can be enabled by specifying
1355: the three colon separated values
1.237 jmc 1356: start:rate:full (e.g. "10:30:60").
1.53 jmc 1357: .Xr sshd 8
1.237 jmc 1358: will refuse connection attempts with a probability of rate/100 (30%)
1359: if there are currently start (10) unauthenticated connections.
1.1 stevesk 1360: The probability increases linearly and all connection attempts
1.237 jmc 1361: are refused if the number of unauthenticated connections reaches full (60).
1.329 dtucker 1362: .It Cm ModuliFile
1363: Specifies the
1364: .Xr moduli 5
1365: file that contains the Diffie-Hellman groups used for the
1366: .Dq diffie-hellman-group-exchange-sha1
1367: and
1368: .Dq diffie-hellman-group-exchange-sha256
1369: key exchange methods.
1370: The default is
1371: .Pa /etc/moduli .
1.1 stevesk 1372: .It Cm PasswordAuthentication
1373: Specifies whether password authentication is allowed.
1374: The default is
1.237 jmc 1375: .Cm yes .
1.1 stevesk 1376: .It Cm PermitEmptyPasswords
1377: When password authentication is allowed, it specifies whether the
1378: server allows login to accounts with empty password strings.
1379: The default is
1.237 jmc 1380: .Cm no .
1.271 djm 1381: .It Cm PermitListen
1382: Specifies the addresses/ports on which a remote TCP port forwarding may listen.
1383: The listen specification must be one of the following forms:
1384: .Pp
1385: .Bl -item -offset indent -compact
1386: .It
1387: .Cm PermitListen
1388: .Sm off
1.276 djm 1389: .Ar port
1.271 djm 1390: .Sm on
1391: .It
1392: .Cm PermitListen
1393: .Sm off
1.276 djm 1394: .Ar host : port
1.271 djm 1395: .Sm on
1396: .El
1397: .Pp
1398: Multiple permissions may be specified by separating them with whitespace.
1399: An argument of
1400: .Cm any
1401: can be used to remove all restrictions and permit any listen requests.
1402: An argument of
1403: .Cm none
1404: can be used to prohibit all listen requests.
1405: The host name may contain wildcards as described in the PATTERNS section in
1406: .Xr ssh_config 5 .
1407: The wildcard
1408: .Sq *
1409: can also be used in place of a port number to allow all ports.
1410: By default all port forwarding listen requests are permitted.
1.272 jmc 1411: Note that the
1.271 djm 1412: .Cm GatewayPorts
1413: option may further restrict which addresses may be listened on.
1.276 djm 1414: Note also that
1415: .Xr ssh 1
1416: will request a listen host of
1417: .Dq localhost
1.283 dtucker 1418: if no listen host was specifically requested, and this name is
1.277 jmc 1419: treated differently to explicit localhost addresses of
1.276 djm 1420: .Dq 127.0.0.1
1421: and
1422: .Dq ::1 .
1.62 dtucker 1423: .It Cm PermitOpen
1424: Specifies the destinations to which TCP port forwarding is permitted.
1425: The forwarding specification must be one of the following forms:
1426: .Pp
1427: .Bl -item -offset indent -compact
1428: .It
1429: .Cm PermitOpen
1430: .Sm off
1431: .Ar host : port
1432: .Sm on
1433: .It
1434: .Cm PermitOpen
1435: .Sm off
1436: .Ar IPv4_addr : port
1437: .Sm on
1438: .It
1439: .Cm PermitOpen
1440: .Sm off
1441: .Ar \&[ IPv6_addr \&] : port
1442: .Sm on
1443: .El
1444: .Pp
1.68 dtucker 1445: Multiple forwards may be specified by separating them with whitespace.
1.62 dtucker 1446: An argument of
1.237 jmc 1447: .Cm any
1.62 dtucker 1448: can be used to remove all restrictions and permit any forwarding requests.
1.140 dtucker 1449: An argument of
1.237 jmc 1450: .Cm none
1.140 dtucker 1451: can be used to prohibit all forwarding requests.
1.227 jmc 1452: The wildcard
1.237 jmc 1453: .Sq *
1.299 djm 1454: can be used for host or port to allow all hosts or ports respectively.
1455: Otherwise, no pattern matching or address lookups are performed on supplied
1456: names.
1.63 jmc 1457: By default all port forwarding requests are permitted.
1.1 stevesk 1458: .It Cm PermitRootLogin
1.38 jmc 1459: Specifies whether root can log in using
1.1 stevesk 1460: .Xr ssh 1 .
1461: The argument must be
1.237 jmc 1462: .Cm yes ,
1463: .Cm prohibit-password ,
1464: .Cm forced-commands-only ,
1.1 stevesk 1465: or
1.237 jmc 1466: .Cm no .
1.1 stevesk 1467: The default is
1.237 jmc 1468: .Cm prohibit-password .
1.1 stevesk 1469: .Pp
1470: If this option is set to
1.237 jmc 1471: .Cm prohibit-password
1.255 jmc 1472: (or its deprecated alias,
1473: .Cm without-password ) ,
1.210 deraadt 1474: password and keyboard-interactive authentication are disabled for root.
1.1 stevesk 1475: .Pp
1476: If this option is set to
1.237 jmc 1477: .Cm forced-commands-only ,
1.1 stevesk 1478: root login with public key authentication will be allowed,
1479: but only if the
1480: .Ar command
1481: option has been specified
1482: (which may be useful for taking remote backups even if root login is
1.17 jmc 1483: normally not allowed).
1484: All other authentication methods are disabled for root.
1.1 stevesk 1485: .Pp
1486: If this option is set to
1.237 jmc 1487: .Cm no ,
1.38 jmc 1488: root is not allowed to log in.
1.231 jmc 1489: .It Cm PermitTTY
1490: Specifies whether
1491: .Xr pty 4
1492: allocation is permitted.
1493: The default is
1.237 jmc 1494: .Cm yes .
1.46 reyk 1495: .It Cm PermitTunnel
1496: Specifies whether
1497: .Xr tun 4
1498: device forwarding is allowed.
1.47 reyk 1499: The argument must be
1.237 jmc 1500: .Cm yes ,
1501: .Cm point-to-point
1.58 stevesk 1502: (layer 3),
1.237 jmc 1503: .Cm ethernet
1.58 stevesk 1504: (layer 2), or
1.237 jmc 1505: .Cm no .
1.58 stevesk 1506: Specifying
1.237 jmc 1507: .Cm yes
1.58 stevesk 1508: permits both
1.237 jmc 1509: .Cm point-to-point
1.58 stevesk 1510: and
1.237 jmc 1511: .Cm ethernet .
1.46 reyk 1512: The default is
1.237 jmc 1513: .Cm no .
1.178 djm 1514: .Pp
1515: Independent of this setting, the permissions of the selected
1516: .Xr tun 4
1517: device must allow access to the user.
1.6 markus 1518: .It Cm PermitUserEnvironment
1519: Specifies whether
1520: .Pa ~/.ssh/environment
1.9 stevesk 1521: and
1.6 markus 1522: .Cm environment=
1523: options in
1524: .Pa ~/.ssh/authorized_keys
1.9 stevesk 1525: are processed by
1.52 jmc 1526: .Xr sshd 8 .
1.278 djm 1527: Valid options are
1528: .Cm yes ,
1529: .Cm no
1530: or a pattern-list specifying which environment variable names to accept
1531: (for example
1532: .Qq LANG,LC_* ) .
1.6 markus 1533: The default is
1.237 jmc 1534: .Cm no .
1.9 stevesk 1535: Enabling environment processing may enable users to bypass access
1536: restrictions in some configurations using mechanisms such as
1537: .Ev LD_PRELOAD .
1.174 djm 1538: .It Cm PermitUserRC
1539: Specifies whether any
1540: .Pa ~/.ssh/rc
1541: file is executed.
1542: The default is
1.237 jmc 1543: .Cm yes .
1.321 dtucker 1544: .It Cm PerSourceMaxStartups
1545: Specifies the number of unauthenticated connections allowed from a
1546: given source address, or
1547: .Dq none
1548: if there is no limit.
1549: This limit is applied in addition to
1550: .Cm MaxStartups ,
1551: whichever is lower.
1552: The default is
1553: .Cm none .
1554: .It Cm PerSourceNetBlockSize
1555: Specifies the number of bits of source address that are grouped together
1556: for the purposes of applying PerSourceMaxStartups limits.
1557: Values for IPv4 and optionally IPv6 may be specified, separated by a colon.
1558: The default is
1.322 jmc 1559: .Cm 32:128 ,
1.321 dtucker 1560: which means each address is considered individually.
1.328 djm 1561: .It Cm PidFile
1562: Specifies the file that contains the process ID of the
1563: SSH daemon, or
1564: .Cm none
1565: to not write one.
1566: The default is
1567: .Pa /var/run/sshd.pid .
1.1 stevesk 1568: .It Cm Port
1569: Specifies the port number that
1.52 jmc 1570: .Xr sshd 8
1.1 stevesk 1571: listens on.
1572: The default is 22.
1573: Multiple options of this type are permitted.
1574: See also
1575: .Cm ListenAddress .
1576: .It Cm PrintLastLog
1577: Specifies whether
1.52 jmc 1578: .Xr sshd 8
1.36 jaredy 1579: should print the date and time of the last user login when a user logs
1580: in interactively.
1.1 stevesk 1581: The default is
1.237 jmc 1582: .Cm yes .
1.1 stevesk 1583: .It Cm PrintMotd
1584: Specifies whether
1.52 jmc 1585: .Xr sshd 8
1.1 stevesk 1586: should print
1587: .Pa /etc/motd
1588: when a user logs in interactively.
1589: (On some systems it is also printed by the shell,
1590: .Pa /etc/profile ,
1591: or equivalent.)
1592: The default is
1.237 jmc 1593: .Cm yes .
1.324 dtucker 1594: .It Cm PubkeyAcceptedAlgorithms
1595: Specifies the signature algorithms that will be accepted for public key
1596: authentication as a list of comma-separated patterns.
1.289 naddy 1597: Alternately if the specified list begins with a
1.208 djm 1598: .Sq +
1.324 dtucker 1599: character, then the specified algorithms will be appended to the default set
1.208 djm 1600: instead of replacing them.
1.289 naddy 1601: If the specified list begins with a
1.242 djm 1602: .Sq -
1.324 dtucker 1603: character, then the specified algorithms (including wildcards) will be removed
1.242 djm 1604: from the default set instead of replacing them.
1.290 naddy 1605: If the specified list begins with a
1606: .Sq ^
1.324 dtucker 1607: character, then the specified algorithms will be placed at the head of the
1.290 naddy 1608: default set.
1.206 markus 1609: The default for this option is:
1610: .Bd -literal -offset 3n
1.316 djm 1611: ssh-ed25519-cert-v01@openssh.com,
1.206 markus 1612: ecdsa-sha2-nistp256-cert-v01@openssh.com,
1613: ecdsa-sha2-nistp384-cert-v01@openssh.com,
1614: ecdsa-sha2-nistp521-cert-v01@openssh.com,
1.316 djm 1615: sk-ssh-ed25519-cert-v01@openssh.com,
1.296 naddy 1616: sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,
1.291 naddy 1617: rsa-sha2-512-cert-v01@openssh.com,
1618: rsa-sha2-256-cert-v01@openssh.com,
1.316 djm 1619: ssh-ed25519,
1.296 naddy 1620: ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
1.316 djm 1621: sk-ssh-ed25519@openssh.com,
1.291 naddy 1622: sk-ecdsa-sha2-nistp256@openssh.com,
1.338 dtucker 1623: rsa-sha2-512,rsa-sha2-256
1.206 markus 1624: .Ed
1625: .Pp
1.326 djm 1626: The list of available signature algorithms may also be obtained using
1.324 dtucker 1627: .Qq ssh -Q PubkeyAcceptedAlgorithms .
1.293 djm 1628: .It Cm PubkeyAuthOptions
1629: Sets one or more public key authentication options.
1.313 djm 1630: The supported keywords are:
1.294 jmc 1631: .Cm none
1.313 djm 1632: (the default; indicating no additional options are enabled),
1633: .Cm touch-required
1.293 djm 1634: and
1.313 djm 1635: .Cm verify-required .
1.293 djm 1636: .Pp
1637: The
1638: .Cm touch-required
1.297 naddy 1639: option causes public key authentication using a FIDO authenticator algorithm
1.294 jmc 1640: (i.e.\&
1.293 djm 1641: .Cm ecdsa-sk
1642: or
1643: .Cm ed25519-sk )
1644: to always require the signature to attest that a physically present user
1.297 naddy 1645: explicitly confirmed the authentication (usually by touching the authenticator).
1.293 djm 1646: By default,
1647: .Xr sshd 8
1.297 naddy 1648: requires user presence unless overridden with an authorized_keys option.
1.293 djm 1649: The
1650: .Cm touch-required
1651: flag disables this override.
1.313 djm 1652: .Pp
1653: The
1654: .Cm verify-required
1.315 jmc 1655: option requires a FIDO key signature attest that the user was verified,
1.314 jmc 1656: e.g. via a PIN.
1.313 djm 1657: .Pp
1658: Neither the
1659: .Cm touch-required
1660: or
1661: .Cm verify-required
1.314 jmc 1662: options have any effect for other, non-FIDO, public key types.
1.1 stevesk 1663: .It Cm PubkeyAuthentication
1664: Specifies whether public key authentication is allowed.
1665: The default is
1.237 jmc 1666: .Cm yes .
1.159 dtucker 1667: .It Cm RekeyLimit
1.342 djm 1668: Specifies the maximum amount of data that may be transmitted or received
1669: before the session key is renegotiated, optionally followed by a maximum
1670: amount of time that may pass before the session key is renegotiated.
1.159 dtucker 1671: The first argument is specified in bytes and may have a suffix of
1672: .Sq K ,
1673: .Sq M ,
1674: or
1675: .Sq G
1676: to indicate Kilobytes, Megabytes, or Gigabytes, respectively.
1677: The default is between
1678: .Sq 1G
1679: and
1680: .Sq 4G ,
1681: depending on the cipher.
1682: The optional second value is specified in seconds and may use any of the
1683: units documented in the
1684: .Sx TIME FORMATS
1.160 jmc 1685: section.
1.159 dtucker 1686: The default value for
1687: .Cm RekeyLimit
1688: is
1.237 jmc 1689: .Cm default none ,
1.159 dtucker 1690: which means that rekeying is performed after the cipher's default amount
1691: of data has been sent or received and no time based rekeying is done.
1.343 djm 1692: .It Cm RequiredRSASize
1693: Specifies the minimum RSA key size (in bits) that
1694: .Xr sshd 8
1695: will accept.
1696: User and host-based authentication keys smaller than this limit will be
1697: refused.
1698: The default is
1699: .Cm 1024
1700: bits.
1701: Note that this limit may only be raised from the default.
1.118 djm 1702: .It Cm RevokedKeys
1.195 dtucker 1703: Specifies revoked public keys file, or
1.237 jmc 1704: .Cm none
1.195 dtucker 1705: to not use one.
1.118 djm 1706: Keys listed in this file will be refused for public key authentication.
1707: Note that if this file is not readable, then public key authentication will
1708: be refused for all users.
1.154 djm 1709: Keys may be specified as a text file, listing one public key per line, or as
1710: an OpenSSH Key Revocation List (KRL) as generated by
1.155 jmc 1711: .Xr ssh-keygen 1 .
1.161 jmc 1712: For more information on KRLs, see the KEY REVOCATION LISTS section in
1.154 djm 1713: .Xr ssh-keygen 1 .
1.257 djm 1714: .It Cm RDomain
1715: Specifies an explicit routing domain that is applied after authentication
1716: has completed.
1.333 jmc 1717: The user session, as well as any forwarded or listening IP sockets,
1.259 jmc 1718: will be bound to this
1.257 djm 1719: .Xr rdomain 4 .
1720: If the routing domain is set to
1721: .Cm \&%D ,
1.259 jmc 1722: then the domain in which the incoming connection was received will be applied.
1.296 naddy 1723: .It Cm SecurityKeyProvider
1.297 naddy 1724: Specifies a path to a library that will be used when loading
1725: FIDO authenticator-hosted keys, overriding the default of using
1726: the built-in USB HID support.
1.274 djm 1727: .It Cm SetEnv
1728: Specifies one or more environment variables to set in child sessions started
1729: by
1730: .Xr sshd 8
1731: as
1732: .Dq NAME=VALUE .
1733: The environment value may be quoted (e.g. if it contains whitespace
1734: characters).
1735: Environment variables set by
1736: .Cm SetEnv
1737: override the default environment and any variables specified by the user
1738: via
1739: .Cm AcceptEnv
1740: or
1741: .Cm PermitUserEnvironment .
1.175 millert 1742: .It Cm StreamLocalBindMask
1743: Sets the octal file creation mode mask
1744: .Pq umask
1745: used when creating a Unix-domain socket file for local or remote
1746: port forwarding.
1747: This option is only used for port forwarding to a Unix-domain socket file.
1748: .Pp
1749: The default value is 0177, which creates a Unix-domain socket file that is
1750: readable and writable only by the owner.
1751: Note that not all operating systems honor the file mode on Unix-domain
1752: socket files.
1753: .It Cm StreamLocalBindUnlink
1754: Specifies whether to remove an existing Unix-domain socket file for local
1755: or remote port forwarding before creating a new one.
1756: If the socket file already exists and
1757: .Cm StreamLocalBindUnlink
1758: is not enabled,
1759: .Nm sshd
1760: will be unable to forward the port to the Unix-domain socket file.
1761: This option is only used for port forwarding to a Unix-domain socket file.
1762: .Pp
1763: The argument must be
1.237 jmc 1764: .Cm yes
1.175 millert 1765: or
1.237 jmc 1766: .Cm no .
1.175 millert 1767: The default is
1.237 jmc 1768: .Cm no .
1.1 stevesk 1769: .It Cm StrictModes
1770: Specifies whether
1.52 jmc 1771: .Xr sshd 8
1.1 stevesk 1772: should check file modes and ownership of the
1773: user's files and home directory before accepting login.
1774: This is normally desirable because novices sometimes accidentally leave their
1775: directory or files world-writable.
1776: The default is
1.237 jmc 1777: .Cm yes .
1.112 djm 1778: Note that this does not apply to
1779: .Cm ChrootDirectory ,
1780: whose permissions and ownership are checked unconditionally.
1.1 stevesk 1781: .It Cm Subsystem
1.51 jmc 1782: Configures an external subsystem (e.g. file transfer daemon).
1.59 djm 1783: Arguments should be a subsystem name and a command (with optional arguments)
1784: to execute upon subsystem request.
1.80 djm 1785: .Pp
1.1 stevesk 1786: The command
1.237 jmc 1787: .Cm sftp-server
1788: implements the SFTP file transfer subsystem.
1.80 djm 1789: .Pp
1790: Alternately the name
1.237 jmc 1791: .Cm internal-sftp
1792: implements an in-process SFTP server.
1.80 djm 1793: This may simplify configurations using
1794: .Cm ChrootDirectory
1795: to force a different filesystem root on clients.
1796: .Pp
1.1 stevesk 1797: By default no subsystems are defined.
1798: .It Cm SyslogFacility
1799: Gives the facility code that is used when logging messages from
1.53 jmc 1800: .Xr sshd 8 .
1.1 stevesk 1801: The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2,
1802: LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
1803: The default is AUTH.
1.27 markus 1804: .It Cm TCPKeepAlive
1805: Specifies whether the system should send TCP keepalive messages to the
1806: other side.
1807: If they are sent, death of the connection or crash of one
1808: of the machines will be properly noticed.
1809: However, this means that
1810: connections will die if the route is down temporarily, and some people
1811: find it annoying.
1812: On the other hand, if TCP keepalives are not sent,
1813: sessions may hang indefinitely on the server, leaving
1.237 jmc 1814: .Qq ghost
1.27 markus 1815: users and consuming server resources.
1816: .Pp
1817: The default is
1.237 jmc 1818: .Cm yes
1.27 markus 1819: (to send TCP keepalive messages), and the server will notice
1820: if the network goes down or the client host crashes.
1821: This avoids infinitely hanging sessions.
1822: .Pp
1823: To disable TCP keepalive messages, the value should be set to
1.237 jmc 1824: .Cm no .
1.118 djm 1825: .It Cm TrustedUserCAKeys
1826: Specifies a file containing public keys of certificate authorities that are
1.195 dtucker 1827: trusted to sign user certificates for authentication, or
1.237 jmc 1828: .Cm none
1.195 dtucker 1829: to not use one.
1.119 jmc 1830: Keys are listed one per line; empty lines and comments starting with
1.118 djm 1831: .Ql #
1832: are allowed.
1833: If a certificate is presented for authentication and has its signing CA key
1834: listed in this file, then it may be used for authentication for any user
1835: listed in the certificate's principals list.
1836: Note that certificates that lack a list of principals will not be permitted
1837: for authentication using
1838: .Cm TrustedUserCAKeys .
1.161 jmc 1839: For more details on certificates, see the CERTIFICATES section in
1.118 djm 1840: .Xr ssh-keygen 1 .
1.346 djm 1841: .It Cm UnusedConnectionTimeout
1842: Specifies whether and how quickly
1843: .Xr sshd 8
1844: should close client connections with no open channels.
1845: Open channels include active shell, command execution or subsystem
1.347 jmc 1846: sessions, connected network, socket, agent or X11 forwardings.
1.346 djm 1847: Forwarding listeners, such as those from the
1848: .Xr ssh 1
1849: .Fl R
1.347 jmc 1850: flag, are not considered as open channels and do not prevent the timeout.
1.346 djm 1851: The timeout value
1852: is specified in seconds or may use any of the units documented in the
1853: .Sx TIME FORMATS
1854: section.
1855: .Pp
1856: Note that this timeout starts when the client connection completes
1857: user authentication but before the client has an opportunity to open any
1858: channels.
1859: Caution should be used when using short timeout values, as they may not
1860: provide sufficient time for the client to request and open its channels
1861: before terminating the connection.
1862: .Pp
1863: The default
1864: .Cm none
1865: is to never expire connections for having no open channels.
1866: This option may be useful in conjunction with
1867: .Cm ChannelTimeout .
1.18 markus 1868: .It Cm UseDNS
1869: Specifies whether
1.52 jmc 1870: .Xr sshd 8
1.207 djm 1871: should look up the remote host name, and to check that
1.18 markus 1872: the resolved host name for the remote IP address maps back to the
1873: very same IP address.
1.207 djm 1874: .Pp
1875: If this option is set to
1.237 jmc 1876: .Cm no
1.207 djm 1877: (the default) then only addresses and not host names may be used in
1.221 djm 1878: .Pa ~/.ssh/authorized_keys
1.207 djm 1879: .Cm from
1880: and
1.211 jmc 1881: .Nm
1.207 djm 1882: .Cm Match
1883: .Cm Host
1884: directives.
1.137 djm 1885: .It Cm VersionAddendum
1886: Optionally specifies additional text to append to the SSH protocol banner
1887: sent by the server upon connection.
1888: The default is
1.237 jmc 1889: .Cm none .
1.1 stevesk 1890: .It Cm X11DisplayOffset
1891: Specifies the first display number available for
1.52 jmc 1892: .Xr sshd 8 Ns 's
1.1 stevesk 1893: X11 forwarding.
1.52 jmc 1894: This prevents sshd from interfering with real X11 servers.
1.1 stevesk 1895: The default is 10.
1896: .It Cm X11Forwarding
1897: Specifies whether X11 forwarding is permitted.
1.13 stevesk 1898: The argument must be
1.237 jmc 1899: .Cm yes
1.13 stevesk 1900: or
1.237 jmc 1901: .Cm no .
1.1 stevesk 1902: The default is
1.237 jmc 1903: .Cm no .
1.13 stevesk 1904: .Pp
1905: When X11 forwarding is enabled, there may be additional exposure to
1906: the server and to client displays if the
1.52 jmc 1907: .Xr sshd 8
1.13 stevesk 1908: proxy display is configured to listen on the wildcard address (see
1.237 jmc 1909: .Cm X11UseLocalhost ) ,
1910: though this is not the default.
1.13 stevesk 1911: Additionally, the authentication spoofing and authentication data
1912: verification and substitution occur on the client side.
1913: The security risk of using X11 forwarding is that the client's X11
1.52 jmc 1914: display server may be exposed to attack when the SSH client requests
1.13 stevesk 1915: forwarding (see the warnings for
1916: .Cm ForwardX11
1917: in
1.19 jmc 1918: .Xr ssh_config 5 ) .
1.13 stevesk 1919: A system administrator may have a stance in which they want to
1920: protect clients that may expose themselves to attack by unwittingly
1921: requesting X11 forwarding, which can warrant a
1.237 jmc 1922: .Cm no
1.13 stevesk 1923: setting.
1924: .Pp
1925: Note that disabling X11 forwarding does not prevent users from
1926: forwarding X11 traffic, as users can always install their own forwarders.
1.1 stevesk 1927: .It Cm X11UseLocalhost
1928: Specifies whether
1.52 jmc 1929: .Xr sshd 8
1.1 stevesk 1930: should bind the X11 forwarding server to the loopback address or to
1.15 jmc 1931: the wildcard address.
1932: By default,
1.52 jmc 1933: sshd binds the forwarding server to the loopback address and sets the
1.1 stevesk 1934: hostname part of the
1935: .Ev DISPLAY
1936: environment variable to
1.237 jmc 1937: .Cm localhost .
1.8 stevesk 1938: This prevents remote hosts from connecting to the proxy display.
1.1 stevesk 1939: However, some older X11 clients may not function with this
1940: configuration.
1941: .Cm X11UseLocalhost
1942: may be set to
1.237 jmc 1943: .Cm no
1.1 stevesk 1944: to specify that the forwarding server should be bound to the wildcard
1945: address.
1946: The argument must be
1.237 jmc 1947: .Cm yes
1.1 stevesk 1948: or
1.237 jmc 1949: .Cm no .
1.1 stevesk 1950: The default is
1.237 jmc 1951: .Cm yes .
1.1 stevesk 1952: .It Cm XAuthLocation
1.11 stevesk 1953: Specifies the full pathname of the
1.1 stevesk 1954: .Xr xauth 1
1.195 dtucker 1955: program, or
1.237 jmc 1956: .Cm none
1.195 dtucker 1957: to not use one.
1.1 stevesk 1958: The default is
1959: .Pa /usr/X11R6/bin/xauth .
1960: .El
1.55 jmc 1961: .Sh TIME FORMATS
1.53 jmc 1962: .Xr sshd 8
1.1 stevesk 1963: command-line arguments and configuration file options that specify time
1964: may be expressed using a sequence of the form:
1965: .Sm off
1.7 stevesk 1966: .Ar time Op Ar qualifier ,
1.1 stevesk 1967: .Sm on
1968: where
1969: .Ar time
1970: is a positive integer value and
1971: .Ar qualifier
1972: is one of the following:
1973: .Pp
1974: .Bl -tag -width Ds -compact -offset indent
1.64 jmc 1975: .It Aq Cm none
1.1 stevesk 1976: seconds
1977: .It Cm s | Cm S
1978: seconds
1979: .It Cm m | Cm M
1980: minutes
1981: .It Cm h | Cm H
1982: hours
1983: .It Cm d | Cm D
1984: days
1985: .It Cm w | Cm W
1986: weeks
1987: .El
1988: .Pp
1989: Each member of the sequence is added together to calculate
1990: the total time value.
1991: .Pp
1992: Time format examples:
1993: .Pp
1994: .Bl -tag -width Ds -compact -offset indent
1995: .It 600
1996: 600 seconds (10 minutes)
1997: .It 10m
1998: 10 minutes
1999: .It 1h30m
2000: 1 hour 30 minutes (90 minutes)
2001: .El
1.235 jmc 2002: .Sh TOKENS
2003: Arguments to some keywords can make use of tokens,
2004: which are expanded at runtime:
2005: .Pp
2006: .Bl -tag -width XXXX -offset indent -compact
2007: .It %%
2008: A literal
2009: .Sq % .
1.350 jmc 2010: .It \&%C
1.349 djm 2011: Identifies the connection endpoints, containing
2012: four space-separated values: client address, client port number,
2013: server address, and server port number.
1.257 djm 2014: .It \&%D
2015: The routing domain in which the incoming connection was received.
1.235 jmc 2016: .It %F
2017: The fingerprint of the CA key.
2018: .It %f
2019: The fingerprint of the key or certificate.
2020: .It %h
2021: The home directory of the user.
2022: .It %i
2023: The key ID in the certificate.
2024: .It %K
2025: The base64-encoded CA key.
2026: .It %k
2027: The base64-encoded key or certificate for authentication.
2028: .It %s
2029: The serial number of the certificate.
2030: .It \&%T
2031: The type of the CA key.
2032: .It %t
2033: The key or certificate type.
1.268 jmc 2034: .It \&%U
2035: The numeric user ID of the target user.
1.235 jmc 2036: .It %u
2037: The username.
2038: .El
2039: .Pp
2040: .Cm AuthorizedKeysCommand
1.349 djm 2041: accepts the tokens %%, %C, %D, %f, %h, %k, %t, %U, and %u.
1.235 jmc 2042: .Pp
2043: .Cm AuthorizedKeysFile
1.270 jmc 2044: accepts the tokens %%, %h, %U, and %u.
1.235 jmc 2045: .Pp
2046: .Cm AuthorizedPrincipalsCommand
1.349 djm 2047: accepts the tokens %%, %C, %D, %F, %f, %h, %i, %K, %k, %s, %T, %t, %U, and %u.
1.235 jmc 2048: .Pp
2049: .Cm AuthorizedPrincipalsFile
1.270 jmc 2050: accepts the tokens %%, %h, %U, and %u.
1.235 jmc 2051: .Pp
2052: .Cm ChrootDirectory
1.270 jmc 2053: accepts the tokens %%, %h, %U, and %u.
1.257 djm 2054: .Pp
2055: .Cm RoutingDomain
2056: accepts the token %D.
1.1 stevesk 2057: .Sh FILES
2058: .Bl -tag -width Ds
2059: .It Pa /etc/ssh/sshd_config
2060: Contains configuration data for
1.53 jmc 2061: .Xr sshd 8 .
1.1 stevesk 2062: This file should be writable by root only, but it is recommended
2063: (though not necessary) that it be world-readable.
2064: .El
1.19 jmc 2065: .Sh SEE ALSO
1.237 jmc 2066: .Xr sftp-server 8 ,
1.19 jmc 2067: .Xr sshd 8
1.1 stevesk 2068: .Sh AUTHORS
1.237 jmc 2069: .An -nosplit
1.1 stevesk 2070: OpenSSH is a derivative of the original and free
1.237 jmc 2071: ssh 1.2.12 release by
2072: .An Tatu Ylonen .
2073: .An Aaron Campbell , Bob Beck , Markus Friedl , Niels Provos ,
2074: .An Theo de Raadt
2075: and
2076: .An Dug Song
1.1 stevesk 2077: removed many bugs, re-added newer features and
2078: created OpenSSH.
1.237 jmc 2079: .An Markus Friedl
2080: contributed the support for SSH protocol versions 1.5 and 2.0.
2081: .An Niels Provos
2082: and
2083: .An Markus Friedl
2084: contributed support for privilege separation.