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