Annotation of src/usr.bin/ssh/sshd_config.5, Revision 1.188
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.188 ! djm 36: .\" $OpenBSD: sshd_config.5,v 1.187 2014/12/22 08:24:17 jmc Exp $
1.186 djm 37: .Dd $Mdocdate: December 22 2014 $
1.1 stevesk 38: .Dt SSHD_CONFIG 5
39: .Os
40: .Sh NAME
41: .Nm sshd_config
42: .Nd OpenSSH SSH daemon configuration file
43: .Sh SYNOPSIS
1.71 jmc 44: .Nm /etc/ssh/sshd_config
1.1 stevesk 45: .Sh DESCRIPTION
1.53 jmc 46: .Xr sshd 8
1.1 stevesk 47: reads configuration data from
48: .Pa /etc/ssh/sshd_config
49: (or the file specified with
50: .Fl f
51: on the command line).
52: The file contains keyword-argument pairs, one per line.
53: Lines starting with
54: .Ql #
55: and empty lines are interpreted as comments.
1.56 dtucker 56: Arguments may optionally be enclosed in double quotes
57: .Pq \&"
58: in order to represent arguments containing spaces.
1.1 stevesk 59: .Pp
60: The possible
61: keywords and their meanings are as follows (note that
62: keywords are case-insensitive and arguments are case-sensitive):
63: .Bl -tag -width Ds
1.30 djm 64: .It Cm AcceptEnv
65: Specifies what environment variables sent by the client will be copied into
66: the session's
67: .Xr environ 7 .
68: See
69: .Cm SendEnv
70: in
71: .Xr ssh_config 5
72: for how to configure the client.
1.31 djm 73: Note that environment passing is only supported for protocol 2.
1.30 djm 74: Variables are specified by name, which may contain the wildcard characters
1.51 jmc 75: .Ql *
1.30 djm 76: and
77: .Ql \&? .
1.31 djm 78: Multiple environment variables may be separated by whitespace or spread
1.30 djm 79: across multiple
80: .Cm AcceptEnv
81: directives.
1.31 djm 82: Be warned that some environment variables could be used to bypass restricted
1.30 djm 83: user environments.
84: For this reason, care should be taken in the use of this directive.
85: The default is not to accept any environment variables.
1.37 djm 86: .It Cm AddressFamily
87: Specifies which address family should be used by
1.53 jmc 88: .Xr sshd 8 .
1.37 djm 89: Valid arguments are
90: .Dq any ,
91: .Dq inet
1.52 jmc 92: (use IPv4 only), or
1.37 djm 93: .Dq inet6
94: (use IPv6 only).
95: The default is
96: .Dq any .
1.89 jmc 97: .It Cm AllowAgentForwarding
98: Specifies whether
99: .Xr ssh-agent 1
100: forwarding is permitted.
101: The default is
102: .Dq yes .
103: Note that disabling agent forwarding does not improve security
104: unless users are also denied shell access, as they can always install
105: their own forwarders.
1.1 stevesk 106: .It Cm AllowGroups
107: This keyword can be followed by a list of group name patterns, separated
108: by spaces.
109: If specified, login is allowed only for users whose primary
110: group or supplementary group list matches one of the patterns.
111: Only group names are valid; a numerical group ID is not recognized.
112: By default, login is allowed for all groups.
1.54 jmc 113: The allow/deny directives are processed in the following order:
114: .Cm DenyUsers ,
115: .Cm AllowUsers ,
116: .Cm DenyGroups ,
117: and finally
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.1 stevesk 123: .It Cm AllowTcpForwarding
124: Specifies whether TCP forwarding is permitted.
1.150 djm 125: The available options are
126: .Dq yes
127: or
128: .Dq all
129: to allow TCP forwarding,
130: .Dq no
131: to prevent all TCP forwarding,
132: .Dq local
133: to allow local (from the perspective of
1.151 jmc 134: .Xr ssh 1 )
135: forwarding only or
1.150 djm 136: .Dq remote
137: to allow remote forwarding only.
1.1 stevesk 138: The default is
139: .Dq yes .
140: Note that disabling TCP forwarding does not improve security unless
141: users are also denied shell access, as they can always install their
142: own forwarders.
1.175 millert 143: .It Cm AllowStreamLocalForwarding
144: Specifies whether StreamLocal (Unix-domain socket) forwarding is permitted.
145: The available options are
146: .Dq yes
147: or
148: .Dq all
149: to allow StreamLocal forwarding,
150: .Dq no
151: to prevent all StreamLocal forwarding,
152: .Dq local
153: to allow local (from the perspective of
154: .Xr ssh 1 )
155: forwarding only or
156: .Dq remote
157: to allow remote forwarding only.
158: The default is
159: .Dq yes .
160: Note that disabling StreamLocal forwarding does not improve security unless
161: users are also denied shell access, as they can always install their
162: own forwarders.
1.1 stevesk 163: .It Cm AllowUsers
164: This keyword can be followed by a list of user name patterns, separated
165: by spaces.
1.14 jmc 166: If specified, login is allowed only for user names that
1.1 stevesk 167: match one of the patterns.
168: Only user names are valid; a numerical user ID is not recognized.
169: By default, login is allowed for all users.
170: If the pattern takes the form USER@HOST then USER and HOST
171: are separately checked, restricting logins to particular
172: users from particular hosts.
1.54 jmc 173: The allow/deny directives are processed in the following order:
174: .Cm DenyUsers ,
175: .Cm AllowUsers ,
176: .Cm DenyGroups ,
177: and finally
178: .Cm AllowGroups .
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.149 djm 183: .It Cm AuthenticationMethods
184: Specifies the authentication methods that must be successfully completed
185: for a user to be granted access.
186: This option must be followed by one or more comma-separated lists of
187: authentication method names.
188: Successful authentication requires completion of every method in at least
189: one of these lists.
190: .Pp
191: For example, an argument of
192: .Dq publickey,password publickey,keyboard-interactive
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,
196: so for this example, it would not be possible to attempt password or
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
202: .Dq bsdauth ,
203: .Dq pam ,
204: or
205: .Dq skey ,
206: depending on the server configuration.
207: For example,
208: .Dq keyboard-interactive:bsdauth
209: would restrict keyboard interactive authentication to the
210: .Dq bsdauth
211: device.
1.185 djm 212: .Pp
213: If the
214: .Dq publickey
1.187 jmc 215: method is listed more than once,
1.185 djm 216: .Xr sshd 8
217: verifies that keys that have been used successfully are not reused for
218: subsequent authentications.
219: For example, an
220: .Cm AuthenticationMethods
221: of
222: .Dq publickey,publickey
223: will require successful authentication using two different public keys.
1.181 djm 224: .Pp
1.149 djm 225: This option is only available for SSH protocol 2 and will yield a fatal
226: error if enabled if protocol 1 is also enabled.
227: Note that each authentication method listed should also be explicitly enabled
228: in the configuration.
229: The default is not to require multiple authentication; successful completion
230: of a single authentication method is sufficient.
1.146 djm 231: .It Cm AuthorizedKeysCommand
1.147 jmc 232: Specifies a program to be used to look up the user's public keys.
1.158 djm 233: The program must be owned by root and not writable by group or others.
234: It will be invoked with a single argument of the username
1.146 djm 235: being authenticated, and should produce on standard output zero or
1.161 jmc 236: more lines of authorized_keys output (see AUTHORIZED_KEYS in
1.147 jmc 237: .Xr sshd 8 ) .
1.146 djm 238: If a key supplied by AuthorizedKeysCommand does not successfully authenticate
239: and authorize the user then public key authentication continues using the usual
240: .Cm AuthorizedKeysFile
241: files.
242: By default, no AuthorizedKeysCommand is run.
243: .It Cm AuthorizedKeysCommandUser
244: Specifies the user under whose account the AuthorizedKeysCommand is run.
245: It is recommended to use a dedicated user that has no other role on the host
246: than running authorized keys commands.
1.186 djm 247: If
1.181 djm 248: .Cm AuthorizedKeysCommand
1.186 djm 249: is specified but
250: .Cm AuthorizedKeysCommandUser
251: is not, then
252: .Xr sshd 8
253: will refuse to start.
1.1 stevesk 254: .It Cm AuthorizedKeysFile
255: Specifies the file that contains the public keys that can be used
256: for user authentication.
1.124 djm 257: The format is described in the
1.161 jmc 258: AUTHORIZED_KEYS FILE FORMAT
1.124 djm 259: section of
260: .Xr sshd 8 .
1.1 stevesk 261: .Cm AuthorizedKeysFile
262: may contain tokens of the form %T which are substituted during connection
1.52 jmc 263: setup.
1.17 jmc 264: The following tokens are defined: %% is replaced by a literal '%',
1.52 jmc 265: %h is replaced by the home directory of the user being authenticated, and
1.1 stevesk 266: %u is replaced by the username of that user.
267: After expansion,
268: .Cm AuthorizedKeysFile
269: is taken to be an absolute path or one relative to the user's home
270: directory.
1.133 jmc 271: Multiple files may be listed, separated by whitespace.
272: The default is
273: .Dq .ssh/authorized_keys .ssh/authorized_keys2 .
1.121 djm 274: .It Cm AuthorizedPrincipalsFile
275: Specifies a file that lists principal names that are accepted for
276: certificate authentication.
277: When using certificates signed by a key listed in
278: .Cm TrustedUserCAKeys ,
279: this file lists names, one of which must appear in the certificate for it
280: to be accepted for authentication.
1.125 jmc 281: Names are listed one per line preceded by key options (as described
1.161 jmc 282: in AUTHORIZED_KEYS FILE FORMAT in
1.125 jmc 283: .Xr sshd 8 ) .
1.124 djm 284: Empty lines and comments starting with
1.121 djm 285: .Ql #
286: are ignored.
287: .Pp
288: .Cm AuthorizedPrincipalsFile
289: may contain tokens of the form %T which are substituted during connection
290: setup.
291: The following tokens are defined: %% is replaced by a literal '%',
292: %h is replaced by the home directory of the user being authenticated, and
293: %u is replaced by the username of that user.
294: After expansion,
295: .Cm AuthorizedPrincipalsFile
296: is taken to be an absolute path or one relative to the user's home
297: directory.
298: .Pp
1.138 djm 299: The default is
300: .Dq none ,
301: i.e. not to use a principals file \(en in this case, the username
1.121 djm 302: of the user must appear in a certificate's principals list for it to be
303: accepted.
304: Note that
305: .Cm AuthorizedPrincipalsFile
306: is only used when authentication proceeds using a CA listed in
307: .Cm TrustedUserCAKeys
308: and is not consulted for certification authorities trusted via
309: .Pa ~/.ssh/authorized_keys ,
310: though the
311: .Cm principals=
312: key option offers a similar facility (see
313: .Xr sshd 8
314: for details).
1.1 stevesk 315: .It Cm Banner
316: The contents of the specified file are sent to the remote user before
317: authentication is allowed.
1.78 djm 318: If the argument is
319: .Dq none
320: then no banner is displayed.
1.1 stevesk 321: This option is only available for protocol version 2.
322: By default, no banner is displayed.
323: .It Cm ChallengeResponseAuthentication
1.50 jmc 324: Specifies whether challenge-response authentication is allowed.
1.1 stevesk 325: All authentication styles from
326: .Xr login.conf 5
327: are supported.
328: The default is
329: .Dq yes .
1.80 djm 330: .It Cm ChrootDirectory
1.113 stevesk 331: Specifies the pathname of a directory to
1.80 djm 332: .Xr chroot 2
333: to after authentication.
1.113 stevesk 334: All components of the pathname must be root-owned directories that are
1.80 djm 335: not writable by any other user or group.
1.106 stevesk 336: After the chroot,
337: .Xr sshd 8
338: changes the working directory to the user's home directory.
1.80 djm 339: .Pp
1.113 stevesk 340: The pathname may contain the following tokens that are expanded at runtime once
1.80 djm 341: the connecting user has been authenticated: %% is replaced by a literal '%',
342: %h is replaced by the home directory of the user being authenticated, and
343: %u is replaced by the username of that user.
344: .Pp
345: The
346: .Cm ChrootDirectory
347: must contain the necessary files and directories to support the
1.103 stevesk 348: user's session.
1.80 djm 349: For an interactive session this requires at least a shell, typically
350: .Xr sh 1 ,
351: and basic
352: .Pa /dev
353: nodes such as
354: .Xr null 4 ,
355: .Xr zero 4 ,
356: .Xr stdin 4 ,
357: .Xr stdout 4 ,
358: .Xr stderr 4 ,
1.180 jmc 359: and
1.80 djm 360: .Xr tty 4
361: devices.
362: For file transfer sessions using
1.105 jmc 363: .Dq sftp ,
1.80 djm 364: no additional configuration of the environment is necessary if the
1.105 jmc 365: in-process sftp server is used,
1.176 schwarze 366: though sessions which use logging may require
1.104 stevesk 367: .Pa /dev/log
1.176 schwarze 368: inside the chroot directory on some operating systems (see
1.104 stevesk 369: .Xr sftp-server 8
1.81 jmc 370: for details).
1.80 djm 371: .Pp
372: The default is not to
373: .Xr chroot 2 .
1.1 stevesk 374: .It Cm Ciphers
375: Specifies the ciphers allowed for protocol version 2.
376: Multiple ciphers must be comma-separated.
1.167 djm 377: The supported ciphers are:
378: .Pp
1.173 naddy 379: .Bl -item -compact -offset indent
380: .It
381: 3des-cbc
382: .It
383: aes128-cbc
384: .It
385: aes192-cbc
386: .It
387: aes256-cbc
388: .It
389: aes128-ctr
390: .It
391: aes192-ctr
392: .It
393: aes256-ctr
394: .It
395: aes128-gcm@openssh.com
396: .It
397: aes256-gcm@openssh.com
398: .It
399: arcfour
400: .It
401: arcfour128
402: .It
403: arcfour256
404: .It
405: blowfish-cbc
406: .It
407: cast128-cbc
408: .It
409: chacha20-poly1305@openssh.com
410: .El
1.167 djm 411: .Pp
1.52 jmc 412: The default is:
1.173 naddy 413: .Bd -literal -offset indent
414: aes128-ctr,aes192-ctr,aes256-ctr,
1.153 markus 415: aes128-gcm@openssh.com,aes256-gcm@openssh.com,
1.173 naddy 416: chacha20-poly1305@openssh.com
1.1 stevesk 417: .Ed
1.167 djm 418: .Pp
419: The list of available ciphers may also be obtained using the
420: .Fl Q
421: option of
1.188 ! djm 422: .Xr ssh 1
! 423: with an argument of
! 424: .Dq cipher .
1.1 stevesk 425: .It Cm ClientAliveCountMax
1.48 jmc 426: Sets the number of client alive messages (see below) which may be
1.1 stevesk 427: sent without
1.52 jmc 428: .Xr sshd 8
1.17 jmc 429: receiving any messages back from the client.
430: If this threshold is reached while client alive messages are being sent,
1.52 jmc 431: sshd will disconnect the client, terminating the session.
1.17 jmc 432: It is important to note that the use of client alive messages is very
433: different from
1.27 markus 434: .Cm TCPKeepAlive
1.17 jmc 435: (below).
436: The client alive messages are sent through the encrypted channel
437: and therefore will not be spoofable.
438: The TCP keepalive option enabled by
1.27 markus 439: .Cm TCPKeepAlive
1.17 jmc 440: is spoofable.
441: The client alive mechanism is valuable when the client or
1.1 stevesk 442: server depend on knowing when a connection has become inactive.
443: .Pp
1.17 jmc 444: The default value is 3.
445: If
1.1 stevesk 446: .Cm ClientAliveInterval
1.48 jmc 447: (see below) is set to 15, and
1.1 stevesk 448: .Cm ClientAliveCountMax
1.52 jmc 449: is left at the default, unresponsive SSH clients
1.1 stevesk 450: will be disconnected after approximately 45 seconds.
1.57 markus 451: This option applies to protocol version 2 only.
1.42 djm 452: .It Cm ClientAliveInterval
453: Sets a timeout interval in seconds after which if no data has been received
454: from the client,
1.52 jmc 455: .Xr sshd 8
1.42 djm 456: will send a message through the encrypted
457: channel to request a response from the client.
458: The default
459: is 0, indicating that these messages will not be sent to the client.
460: This option applies to protocol version 2 only.
1.3 markus 461: .It Cm Compression
1.44 markus 462: Specifies whether compression is allowed, or delayed until
463: the user has authenticated successfully.
1.3 markus 464: The argument must be
1.44 markus 465: .Dq yes ,
466: .Dq delayed ,
1.3 markus 467: or
468: .Dq no .
469: The default is
1.44 markus 470: .Dq delayed .
1.1 stevesk 471: .It Cm DenyGroups
472: This keyword can be followed by a list of group name patterns, separated
473: by spaces.
474: Login is disallowed for users whose primary group or supplementary
475: group list matches one of the patterns.
476: Only group names are valid; a numerical group ID is not recognized.
477: By default, login is allowed for all groups.
1.54 jmc 478: The allow/deny directives are processed in the following order:
479: .Cm DenyUsers ,
480: .Cm AllowUsers ,
481: .Cm DenyGroups ,
482: and finally
483: .Cm AllowGroups .
1.49 jmc 484: .Pp
1.161 jmc 485: See PATTERNS in
1.49 jmc 486: .Xr ssh_config 5
487: for more information on patterns.
1.1 stevesk 488: .It Cm DenyUsers
489: This keyword can be followed by a list of user name patterns, separated
490: by spaces.
491: Login is disallowed for user names that match one of the patterns.
492: Only user names are valid; a numerical user ID is not recognized.
493: By default, login is allowed for all users.
494: If the pattern takes the form USER@HOST then USER and HOST
495: are separately checked, restricting logins to particular
496: users from particular hosts.
1.54 jmc 497: The allow/deny directives are processed in the following order:
498: .Cm DenyUsers ,
499: .Cm AllowUsers ,
500: .Cm DenyGroups ,
501: and finally
502: .Cm AllowGroups .
1.49 jmc 503: .Pp
1.161 jmc 504: See PATTERNS in
1.49 jmc 505: .Xr ssh_config 5
506: for more information on patterns.
1.183 djm 507: .It Cm FingerprintHash
508: Specifies the hash algorithm used when logging key fingerprints.
509: Valid options are:
510: .Dq md5
511: and
512: .Dq sha256 .
513: The default is
514: .Dq sha256 .
1.67 dtucker 515: .It Cm ForceCommand
516: Forces the execution of the command specified by
517: .Cm ForceCommand ,
1.84 djm 518: ignoring any command supplied by the client and
519: .Pa ~/.ssh/rc
520: if present.
1.67 dtucker 521: The command is invoked by using the user's login shell with the -c option.
522: This applies to shell, command, or subsystem execution.
523: It is most useful inside a
524: .Cm Match
525: block.
526: The command originally supplied by the client is available in the
527: .Ev SSH_ORIGINAL_COMMAND
528: environment variable.
1.82 djm 529: Specifying a command of
530: .Dq internal-sftp
531: will force the use of an in-process sftp server that requires no support
532: files when used with
533: .Cm ChrootDirectory .
1.1 stevesk 534: .It Cm GatewayPorts
535: Specifies whether remote hosts are allowed to connect to ports
536: forwarded for the client.
537: By default,
1.52 jmc 538: .Xr sshd 8
1.15 jmc 539: binds remote port forwardings to the loopback address.
540: This prevents other remote hosts from connecting to forwarded ports.
1.1 stevesk 541: .Cm GatewayPorts
1.52 jmc 542: can be used to specify that sshd
1.39 djm 543: should allow remote port forwardings to bind to non-loopback addresses, thus
544: allowing other hosts to connect.
545: The argument may be
546: .Dq no
547: to force remote port forwardings to be available to the local host only,
1.1 stevesk 548: .Dq yes
1.39 djm 549: to force remote port forwardings to bind to the wildcard address, or
550: .Dq clientspecified
551: to allow the client to select the address to which the forwarding is bound.
1.1 stevesk 552: The default is
553: .Dq no .
1.23 markus 554: .It Cm GSSAPIAuthentication
1.25 markus 555: Specifies whether user authentication based on GSSAPI is allowed.
1.26 djm 556: The default is
1.23 markus 557: .Dq no .
558: Note that this option applies to protocol version 2 only.
559: .It Cm GSSAPICleanupCredentials
560: Specifies whether to automatically destroy the user's credentials cache
561: on logout.
562: The default is
563: .Dq yes .
564: Note that this option applies to protocol version 2 only.
1.1 stevesk 565: .It Cm HostbasedAuthentication
566: Specifies whether rhosts or /etc/hosts.equiv authentication together
567: with successful public key client host authentication is allowed
1.50 jmc 568: (host-based authentication).
1.1 stevesk 569: This option is similar to
570: .Cm RhostsRSAAuthentication
571: and applies to protocol version 2 only.
1.70 dtucker 572: The default is
573: .Dq no .
574: .It Cm HostbasedUsesNameFromPacketOnly
575: Specifies whether or not the server will attempt to perform a reverse
576: name lookup when matching the name in the
577: .Pa ~/.shosts ,
578: .Pa ~/.rhosts ,
579: and
580: .Pa /etc/hosts.equiv
581: files during
582: .Cm HostbasedAuthentication .
583: A setting of
584: .Dq yes
585: means that
586: .Xr sshd 8
587: uses the name supplied by the client rather than
588: attempting to resolve the name from the TCP connection itself.
1.1 stevesk 589: The default is
590: .Dq no .
1.117 djm 591: .It Cm HostCertificate
592: Specifies a file containing a public host certificate.
593: The certificate's public key must match a private host key already specified
594: by
595: .Cm HostKey .
596: The default behaviour of
597: .Xr sshd 8
598: is not to load any certificates.
1.1 stevesk 599: .It Cm HostKey
600: Specifies a file containing a private host key
601: used by SSH.
602: The default is
603: .Pa /etc/ssh/ssh_host_key
604: for protocol version 1, and
1.126 djm 605: .Pa /etc/ssh/ssh_host_dsa_key ,
1.169 naddy 606: .Pa /etc/ssh/ssh_host_ecdsa_key ,
607: .Pa /etc/ssh/ssh_host_ed25519_key
1.126 djm 608: and
1.1 stevesk 609: .Pa /etc/ssh/ssh_host_rsa_key
610: for protocol version 2.
611: Note that
1.52 jmc 612: .Xr sshd 8
1.1 stevesk 613: will refuse to use a file if it is group/world-accessible.
614: It is possible to have multiple host key files.
615: .Dq rsa1
616: keys are used for version 1 and
1.126 djm 617: .Dq dsa ,
1.169 naddy 618: .Dq ecdsa ,
619: .Dq ed25519
1.1 stevesk 620: or
621: .Dq rsa
622: are used for version 2 of the SSH protocol.
1.162 markus 623: It is also possible to specify public host key files instead.
624: In this case operations on the private key will be delegated
625: to an
626: .Xr ssh-agent 1 .
627: .It Cm HostKeyAgent
628: Identifies the UNIX-domain socket used to communicate
629: with an agent that has access to the private host keys.
630: If
631: .Dq SSH_AUTH_SOCK
632: is specified, the location of the socket will be read from the
633: .Ev SSH_AUTH_SOCK
634: environment variable.
1.1 stevesk 635: .It Cm IgnoreRhosts
636: Specifies that
637: .Pa .rhosts
638: and
639: .Pa .shosts
640: files will not be used in
641: .Cm RhostsRSAAuthentication
642: or
643: .Cm HostbasedAuthentication .
644: .Pp
645: .Pa /etc/hosts.equiv
646: and
647: .Pa /etc/shosts.equiv
648: are still used.
649: The default is
650: .Dq yes .
651: .It Cm IgnoreUserKnownHosts
652: Specifies whether
1.52 jmc 653: .Xr sshd 8
1.1 stevesk 654: should ignore the user's
1.41 djm 655: .Pa ~/.ssh/known_hosts
1.1 stevesk 656: during
657: .Cm RhostsRSAAuthentication
658: or
659: .Cm HostbasedAuthentication .
660: The default is
661: .Dq no .
1.129 djm 662: .It Cm IPQoS
663: Specifies the IPv4 type-of-service or DSCP class for the connection.
664: Accepted values are
665: .Dq af11 ,
666: .Dq af12 ,
667: .Dq af13 ,
1.136 djm 668: .Dq af21 ,
1.129 djm 669: .Dq af22 ,
670: .Dq af23 ,
671: .Dq af31 ,
672: .Dq af32 ,
673: .Dq af33 ,
674: .Dq af41 ,
675: .Dq af42 ,
676: .Dq af43 ,
677: .Dq cs0 ,
678: .Dq cs1 ,
679: .Dq cs2 ,
680: .Dq cs3 ,
681: .Dq cs4 ,
682: .Dq cs5 ,
683: .Dq cs6 ,
684: .Dq cs7 ,
685: .Dq ef ,
686: .Dq lowdelay ,
687: .Dq throughput ,
688: .Dq reliability ,
689: or a numeric value.
1.131 djm 690: This option may take one or two arguments, separated by whitespace.
1.129 djm 691: If one argument is specified, it is used as the packet class unconditionally.
692: If two values are specified, the first is automatically selected for
693: interactive sessions and the second for non-interactive sessions.
694: The default is
695: .Dq lowdelay
696: for interactive sessions and
697: .Dq throughput
698: for non-interactive sessions.
1.171 jmc 699: .It Cm KbdInteractiveAuthentication
700: Specifies whether to allow keyboard-interactive authentication.
701: The argument to this keyword must be
702: .Dq yes
703: or
704: .Dq no .
705: The default is to use whatever value
706: .Cm ChallengeResponseAuthentication
707: is set to
708: (by default
709: .Dq yes ) .
1.1 stevesk 710: .It Cm KerberosAuthentication
1.24 markus 711: Specifies whether the password provided by the user for
1.1 stevesk 712: .Cm PasswordAuthentication
1.24 markus 713: will be validated through the Kerberos KDC.
1.1 stevesk 714: To use this option, the server needs a
715: Kerberos servtab which allows the verification of the KDC's identity.
1.52 jmc 716: The default is
1.29 dtucker 717: .Dq no .
718: .It Cm KerberosGetAFSToken
1.45 djm 719: If AFS is active and the user has a Kerberos 5 TGT, attempt to acquire
1.29 dtucker 720: an AFS token before accessing the user's home directory.
1.52 jmc 721: The default is
1.1 stevesk 722: .Dq no .
723: .It Cm KerberosOrLocalPasswd
1.52 jmc 724: If password authentication through Kerberos fails then
1.1 stevesk 725: the password will be validated via any additional local mechanism
726: such as
727: .Pa /etc/passwd .
1.52 jmc 728: The default is
1.1 stevesk 729: .Dq yes .
730: .It Cm KerberosTicketCleanup
731: Specifies whether to automatically destroy the user's ticket cache
732: file on logout.
1.52 jmc 733: The default is
1.1 stevesk 734: .Dq yes .
1.127 djm 735: .It Cm KexAlgorithms
736: Specifies the available KEX (Key Exchange) algorithms.
737: Multiple algorithms must be comma-separated.
1.173 naddy 738: The supported algorithms are:
739: .Pp
740: .Bl -item -compact -offset indent
741: .It
742: curve25519-sha256@libssh.org
743: .It
744: diffie-hellman-group1-sha1
745: .It
746: diffie-hellman-group14-sha1
747: .It
748: diffie-hellman-group-exchange-sha1
749: .It
750: diffie-hellman-group-exchange-sha256
751: .It
752: ecdh-sha2-nistp256
753: .It
754: ecdh-sha2-nistp384
755: .It
756: ecdh-sha2-nistp521
757: .El
758: .Pp
759: The default is:
1.170 dtucker 760: .Bd -literal -offset indent
761: curve25519-sha256@libssh.org,
762: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
763: diffie-hellman-group-exchange-sha256,
1.173 naddy 764: diffie-hellman-group14-sha1
1.170 dtucker 765: .Ed
1.188 ! djm 766: .Pp
! 767: The list of available key exchange algorithms may also be obtained using the
! 768: .Fl Q
! 769: option of
! 770: .Xr ssh 1
! 771: with an argument of
! 772: .Dq kex .
1.1 stevesk 773: .It Cm KeyRegenerationInterval
774: In protocol version 1, the ephemeral server key is automatically regenerated
775: after this many seconds (if it has been used).
776: The purpose of regeneration is to prevent
777: decrypting captured sessions by later breaking into the machine and
778: stealing the keys.
779: The key is never stored anywhere.
780: If the value is 0, the key is never regenerated.
781: The default is 3600 (seconds).
782: .It Cm ListenAddress
783: Specifies the local addresses
1.52 jmc 784: .Xr sshd 8
1.1 stevesk 785: should listen on.
786: The following forms may be used:
787: .Pp
788: .Bl -item -offset indent -compact
789: .It
790: .Cm ListenAddress
791: .Sm off
1.180 jmc 792: .Ar host | Ar IPv4_addr | Ar IPv6_addr
1.1 stevesk 793: .Sm on
794: .It
795: .Cm ListenAddress
796: .Sm off
1.180 jmc 797: .Ar host | Ar IPv4_addr : Ar port
1.1 stevesk 798: .Sm on
799: .It
800: .Cm ListenAddress
801: .Sm off
802: .Oo
1.180 jmc 803: .Ar host | Ar IPv6_addr Oc : Ar port
1.1 stevesk 804: .Sm on
805: .El
806: .Pp
807: If
808: .Ar port
809: is not specified,
1.52 jmc 810: sshd will listen on the address and all prior
1.1 stevesk 811: .Cm Port
1.17 jmc 812: options specified.
813: The default is to listen on all local addresses.
1.15 jmc 814: Multiple
1.1 stevesk 815: .Cm ListenAddress
1.17 jmc 816: options are permitted.
817: Additionally, any
1.1 stevesk 818: .Cm Port
1.52 jmc 819: options must precede this option for non-port qualified addresses.
1.1 stevesk 820: .It Cm LoginGraceTime
821: The server disconnects after this time if the user has not
822: successfully logged in.
823: If the value is 0, there is no time limit.
1.12 stevesk 824: The default is 120 seconds.
1.1 stevesk 825: .It Cm LogLevel
826: Gives the verbosity level that is used when logging messages from
1.53 jmc 827: .Xr sshd 8 .
1.1 stevesk 828: The possible values are:
1.52 jmc 829: QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3.
1.15 jmc 830: The default is INFO.
831: DEBUG and DEBUG1 are equivalent.
832: DEBUG2 and DEBUG3 each specify higher levels of debugging output.
833: Logging with a DEBUG level violates the privacy of users and is not recommended.
1.1 stevesk 834: .It Cm MACs
835: Specifies the available MAC (message authentication code) algorithms.
836: The MAC algorithm is used in protocol version 2
837: for data integrity protection.
838: Multiple algorithms must be comma-separated.
1.152 markus 839: The algorithms that contain
840: .Dq -etm
841: calculate the MAC after encryption (encrypt-then-mac).
842: These are considered safer and their use recommended.
1.173 naddy 843: The supported MACs are:
844: .Pp
845: .Bl -item -compact -offset indent
846: .It
847: hmac-md5
848: .It
849: hmac-md5-96
850: .It
851: hmac-ripemd160
852: .It
853: hmac-sha1
854: .It
855: hmac-sha1-96
856: .It
857: hmac-sha2-256
858: .It
859: hmac-sha2-512
860: .It
861: umac-64@openssh.com
862: .It
863: umac-128@openssh.com
864: .It
865: hmac-md5-etm@openssh.com
866: .It
867: hmac-md5-96-etm@openssh.com
868: .It
869: hmac-ripemd160-etm@openssh.com
870: .It
871: hmac-sha1-etm@openssh.com
872: .It
873: hmac-sha1-96-etm@openssh.com
874: .It
875: hmac-sha2-256-etm@openssh.com
876: .It
877: hmac-sha2-512-etm@openssh.com
878: .It
879: umac-64-etm@openssh.com
880: .It
881: umac-128-etm@openssh.com
882: .El
883: .Pp
1.52 jmc 884: The default is:
1.77 jmc 885: .Bd -literal -offset indent
1.152 markus 886: umac-64-etm@openssh.com,umac-128-etm@openssh.com,
887: hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
1.173 naddy 888: umac-64@openssh.com,umac-128@openssh.com,
889: hmac-sha2-256,hmac-sha2-512
1.77 jmc 890: .Ed
1.188 ! djm 891: .Pp
! 892: The list of available MAC algorithms may also be obtained using the
! 893: .Fl Q
! 894: option of
! 895: .Xr ssh 1
! 896: with an argument of
! 897: .Dq mac .
1.60 dtucker 898: .It Cm Match
1.61 jmc 899: Introduces a conditional block.
1.65 dtucker 900: If all of the criteria on the
1.60 dtucker 901: .Cm Match
1.65 dtucker 902: line are satisfied, the keywords on the following lines override those
903: set in the global section of the config file, until either another
1.60 dtucker 904: .Cm Match
1.65 dtucker 905: line or the end of the file.
1.172 djm 906: If a keyword appears in multiple
907: .Cm Match
1.177 sobrado 908: blocks that are satisfied, only the first instance of the keyword is
1.172 djm 909: applied.
1.91 djm 910: .Pp
1.61 jmc 911: The arguments to
1.60 dtucker 912: .Cm Match
1.163 dtucker 913: are one or more criteria-pattern pairs or the single token
914: .Cm All
915: which matches all criteria.
1.60 dtucker 916: The available criteria are
917: .Cm User ,
1.69 dtucker 918: .Cm Group ,
1.60 dtucker 919: .Cm Host ,
1.139 dtucker 920: .Cm LocalAddress ,
921: .Cm LocalPort ,
1.60 dtucker 922: and
923: .Cm Address .
1.91 djm 924: The match patterns may consist of single entries or comma-separated
925: lists and may use the wildcard and negation operators described in the
1.161 jmc 926: PATTERNS section of
1.92 djm 927: .Xr ssh_config 5 .
1.91 djm 928: .Pp
929: The patterns in an
930: .Cm Address
931: criteria may additionally contain addresses to match in CIDR
1.93 jmc 932: address/masklen format, e.g.\&
1.91 djm 933: .Dq 192.0.2.0/24
934: or
935: .Dq 3ffe:ffff::/32 .
936: Note that the mask length provided must be consistent with the address -
937: it is an error to specify a mask length that is too long for the address
1.93 jmc 938: or one with bits set in this host portion of the address.
939: For example,
1.91 djm 940: .Dq 192.0.2.0/33
941: and
1.93 jmc 942: .Dq 192.0.2.0/8
1.91 djm 943: respectively.
944: .Pp
1.60 dtucker 945: Only a subset of keywords may be used on the lines following a
946: .Cm Match
947: keyword.
948: Available keywords are
1.142 jmc 949: .Cm AcceptEnv ,
1.99 okan 950: .Cm AllowAgentForwarding ,
1.142 jmc 951: .Cm AllowGroups ,
1.62 dtucker 952: .Cm AllowTcpForwarding ,
1.141 markus 953: .Cm AllowUsers ,
1.149 djm 954: .Cm AuthenticationMethods ,
1.146 djm 955: .Cm AuthorizedKeysCommand ,
956: .Cm AuthorizedKeysCommandUser ,
1.147 jmc 957: .Cm AuthorizedKeysFile ,
1.123 djm 958: .Cm AuthorizedPrincipalsFile ,
1.72 dtucker 959: .Cm Banner ,
1.85 djm 960: .Cm ChrootDirectory ,
1.141 markus 961: .Cm DenyGroups ,
962: .Cm DenyUsers ,
1.67 dtucker 963: .Cm ForceCommand ,
1.142 jmc 964: .Cm GatewayPorts ,
1.141 markus 965: .Cm GSSAPIAuthentication ,
1.87 djm 966: .Cm HostbasedAuthentication ,
1.123 djm 967: .Cm HostbasedUsesNameFromPacketOnly ,
1.74 jmc 968: .Cm KbdInteractiveAuthentication ,
1.72 dtucker 969: .Cm KerberosAuthentication ,
1.95 dtucker 970: .Cm MaxAuthTries ,
1.94 dtucker 971: .Cm MaxSessions ,
1.72 dtucker 972: .Cm PasswordAuthentication ,
1.97 djm 973: .Cm PermitEmptyPasswords ,
1.66 dtucker 974: .Cm PermitOpen ,
1.79 dtucker 975: .Cm PermitRootLogin ,
1.164 djm 976: .Cm PermitTTY ,
1.123 djm 977: .Cm PermitTunnel ,
1.174 djm 978: .Cm PermitUserRC ,
1.107 dtucker 979: .Cm PubkeyAuthentication ,
1.159 dtucker 980: .Cm RekeyLimit ,
1.142 jmc 981: .Cm RhostsRSAAuthentication ,
1.141 markus 982: .Cm RSAAuthentication ,
1.66 dtucker 983: .Cm X11DisplayOffset ,
1.101 djm 984: .Cm X11Forwarding
1.60 dtucker 985: and
1.102 djm 986: .Cm X11UseLocalHost .
1.33 dtucker 987: .It Cm MaxAuthTries
988: Specifies the maximum number of authentication attempts permitted per
1.35 jmc 989: connection.
990: Once the number of failures reaches half this value,
991: additional failures are logged.
992: The default is 6.
1.90 djm 993: .It Cm MaxSessions
994: Specifies the maximum number of open sessions permitted per network connection.
995: The default is 10.
1.1 stevesk 996: .It Cm MaxStartups
997: Specifies the maximum number of concurrent unauthenticated connections to the
1.52 jmc 998: SSH daemon.
1.1 stevesk 999: Additional connections will be dropped until authentication succeeds or the
1000: .Cm LoginGraceTime
1001: expires for a connection.
1.156 dtucker 1002: The default is 10:30:100.
1.1 stevesk 1003: .Pp
1004: Alternatively, random early drop can be enabled by specifying
1005: the three colon separated values
1006: .Dq start:rate:full
1.51 jmc 1007: (e.g. "10:30:60").
1.53 jmc 1008: .Xr sshd 8
1.1 stevesk 1009: will refuse connection attempts with a probability of
1010: .Dq rate/100
1011: (30%)
1012: if there are currently
1013: .Dq start
1014: (10)
1015: unauthenticated connections.
1016: The probability increases linearly and all connection attempts
1017: are refused if the number of unauthenticated connections reaches
1018: .Dq full
1019: (60).
1020: .It Cm PasswordAuthentication
1021: Specifies whether password authentication is allowed.
1022: The default is
1023: .Dq yes .
1024: .It Cm PermitEmptyPasswords
1025: When password authentication is allowed, it specifies whether the
1026: server allows login to accounts with empty password strings.
1027: The default is
1028: .Dq no .
1.62 dtucker 1029: .It Cm PermitOpen
1030: Specifies the destinations to which TCP port forwarding is permitted.
1031: The forwarding specification must be one of the following forms:
1032: .Pp
1033: .Bl -item -offset indent -compact
1034: .It
1035: .Cm PermitOpen
1036: .Sm off
1037: .Ar host : port
1038: .Sm on
1039: .It
1040: .Cm PermitOpen
1041: .Sm off
1042: .Ar IPv4_addr : port
1043: .Sm on
1044: .It
1045: .Cm PermitOpen
1046: .Sm off
1047: .Ar \&[ IPv6_addr \&] : port
1048: .Sm on
1049: .El
1050: .Pp
1.68 dtucker 1051: Multiple forwards may be specified by separating them with whitespace.
1.62 dtucker 1052: An argument of
1053: .Dq any
1054: can be used to remove all restrictions and permit any forwarding requests.
1.140 dtucker 1055: An argument of
1056: .Dq none
1057: can be used to prohibit all forwarding requests.
1.63 jmc 1058: By default all port forwarding requests are permitted.
1.1 stevesk 1059: .It Cm PermitRootLogin
1.38 jmc 1060: Specifies whether root can log in using
1.1 stevesk 1061: .Xr ssh 1 .
1062: The argument must be
1063: .Dq yes ,
1064: .Dq without-password ,
1.52 jmc 1065: .Dq forced-commands-only ,
1.1 stevesk 1066: or
1067: .Dq no .
1068: The default is
1069: .Dq yes .
1070: .Pp
1071: If this option is set to
1.52 jmc 1072: .Dq without-password ,
1.1 stevesk 1073: password authentication is disabled for root.
1074: .Pp
1075: If this option is set to
1.52 jmc 1076: .Dq forced-commands-only ,
1.1 stevesk 1077: root login with public key authentication will be allowed,
1078: but only if the
1079: .Ar command
1080: option has been specified
1081: (which may be useful for taking remote backups even if root login is
1.17 jmc 1082: normally not allowed).
1083: All other authentication methods are disabled for root.
1.1 stevesk 1084: .Pp
1085: If this option is set to
1.52 jmc 1086: .Dq no ,
1.38 jmc 1087: root is not allowed to log in.
1.46 reyk 1088: .It Cm PermitTunnel
1089: Specifies whether
1090: .Xr tun 4
1091: device forwarding is allowed.
1.47 reyk 1092: The argument must be
1093: .Dq yes ,
1.58 stevesk 1094: .Dq point-to-point
1095: (layer 3),
1096: .Dq ethernet
1097: (layer 2), or
1.47 reyk 1098: .Dq no .
1.58 stevesk 1099: Specifying
1100: .Dq yes
1101: permits both
1102: .Dq point-to-point
1103: and
1104: .Dq ethernet .
1.46 reyk 1105: The default is
1106: .Dq no .
1.178 djm 1107: .Pp
1108: Independent of this setting, the permissions of the selected
1109: .Xr tun 4
1110: device must allow access to the user.
1.164 djm 1111: .It Cm PermitTTY
1112: Specifies whether
1.165 jmc 1113: .Xr pty 4
1.164 djm 1114: allocation is permitted.
1115: The default is
1116: .Dq yes .
1.6 markus 1117: .It Cm PermitUserEnvironment
1118: Specifies whether
1119: .Pa ~/.ssh/environment
1.9 stevesk 1120: and
1.6 markus 1121: .Cm environment=
1122: options in
1123: .Pa ~/.ssh/authorized_keys
1.9 stevesk 1124: are processed by
1.52 jmc 1125: .Xr sshd 8 .
1.6 markus 1126: The default is
1127: .Dq no .
1.9 stevesk 1128: Enabling environment processing may enable users to bypass access
1129: restrictions in some configurations using mechanisms such as
1130: .Ev LD_PRELOAD .
1.174 djm 1131: .It Cm PermitUserRC
1132: Specifies whether any
1133: .Pa ~/.ssh/rc
1134: file is executed.
1135: The default is
1136: .Dq yes .
1.1 stevesk 1137: .It Cm PidFile
1.4 stevesk 1138: Specifies the file that contains the process ID of the
1.53 jmc 1139: SSH daemon.
1.1 stevesk 1140: The default is
1141: .Pa /var/run/sshd.pid .
1142: .It Cm Port
1143: Specifies the port number that
1.52 jmc 1144: .Xr sshd 8
1.1 stevesk 1145: listens on.
1146: The default is 22.
1147: Multiple options of this type are permitted.
1148: See also
1149: .Cm ListenAddress .
1150: .It Cm PrintLastLog
1151: Specifies whether
1.52 jmc 1152: .Xr sshd 8
1.36 jaredy 1153: should print the date and time of the last user login when a user logs
1154: in interactively.
1.1 stevesk 1155: The default is
1156: .Dq yes .
1157: .It Cm PrintMotd
1158: Specifies whether
1.52 jmc 1159: .Xr sshd 8
1.1 stevesk 1160: should print
1161: .Pa /etc/motd
1162: when a user logs in interactively.
1163: (On some systems it is also printed by the shell,
1164: .Pa /etc/profile ,
1165: or equivalent.)
1166: The default is
1167: .Dq yes .
1168: .It Cm Protocol
1169: Specifies the protocol versions
1.52 jmc 1170: .Xr sshd 8
1.5 stevesk 1171: supports.
1.1 stevesk 1172: The possible values are
1.52 jmc 1173: .Sq 1
1.1 stevesk 1174: and
1.52 jmc 1175: .Sq 2 .
1.1 stevesk 1176: Multiple versions must be comma-separated.
1177: The default is
1.109 jmc 1178: .Sq 2 .
1.5 stevesk 1179: Note that the order of the protocol list does not indicate preference,
1180: because the client selects among multiple protocol versions offered
1181: by the server.
1182: Specifying
1183: .Dq 2,1
1184: is identical to
1185: .Dq 1,2 .
1.1 stevesk 1186: .It Cm PubkeyAuthentication
1187: Specifies whether public key authentication is allowed.
1188: The default is
1189: .Dq yes .
1190: Note that this option applies to protocol version 2 only.
1.159 dtucker 1191: .It Cm RekeyLimit
1192: Specifies the maximum amount of data that may be transmitted before the
1193: session key is renegotiated, optionally followed a maximum amount of
1194: time that may pass before the session key is renegotiated.
1195: The first argument is specified in bytes and may have a suffix of
1196: .Sq K ,
1197: .Sq M ,
1198: or
1199: .Sq G
1200: to indicate Kilobytes, Megabytes, or Gigabytes, respectively.
1201: The default is between
1202: .Sq 1G
1203: and
1204: .Sq 4G ,
1205: depending on the cipher.
1206: The optional second value is specified in seconds and may use any of the
1207: units documented in the
1208: .Sx TIME FORMATS
1.160 jmc 1209: section.
1.159 dtucker 1210: The default value for
1211: .Cm RekeyLimit
1212: is
1213: .Dq default none ,
1214: which means that rekeying is performed after the cipher's default amount
1215: of data has been sent or received and no time based rekeying is done.
1216: This option applies to protocol version 2 only.
1.118 djm 1217: .It Cm RevokedKeys
1.154 djm 1218: Specifies revoked public keys.
1.118 djm 1219: Keys listed in this file will be refused for public key authentication.
1220: Note that if this file is not readable, then public key authentication will
1221: be refused for all users.
1.154 djm 1222: Keys may be specified as a text file, listing one public key per line, or as
1223: an OpenSSH Key Revocation List (KRL) as generated by
1.155 jmc 1224: .Xr ssh-keygen 1 .
1.161 jmc 1225: For more information on KRLs, see the KEY REVOCATION LISTS section in
1.154 djm 1226: .Xr ssh-keygen 1 .
1.1 stevesk 1227: .It Cm RhostsRSAAuthentication
1228: Specifies whether rhosts or /etc/hosts.equiv authentication together
1229: with successful RSA host authentication is allowed.
1230: The default is
1231: .Dq no .
1232: This option applies to protocol version 1 only.
1233: .It Cm RSAAuthentication
1234: Specifies whether pure RSA authentication is allowed.
1235: The default is
1236: .Dq yes .
1237: This option applies to protocol version 1 only.
1238: .It Cm ServerKeyBits
1239: Defines the number of bits in the ephemeral protocol version 1 server key.
1.96 djm 1240: The minimum value is 512, and the default is 1024.
1.175 millert 1241: .It Cm StreamLocalBindMask
1242: Sets the octal file creation mode mask
1243: .Pq umask
1244: used when creating a Unix-domain socket file for local or remote
1245: port forwarding.
1246: This option is only used for port forwarding to a Unix-domain socket file.
1247: .Pp
1248: The default value is 0177, which creates a Unix-domain socket file that is
1249: readable and writable only by the owner.
1250: Note that not all operating systems honor the file mode on Unix-domain
1251: socket files.
1252: .It Cm StreamLocalBindUnlink
1253: Specifies whether to remove an existing Unix-domain socket file for local
1254: or remote port forwarding before creating a new one.
1255: If the socket file already exists and
1256: .Cm StreamLocalBindUnlink
1257: is not enabled,
1258: .Nm sshd
1259: will be unable to forward the port to the Unix-domain socket file.
1260: This option is only used for port forwarding to a Unix-domain socket file.
1261: .Pp
1262: The argument must be
1263: .Dq yes
1264: or
1265: .Dq no .
1266: The default is
1267: .Dq no .
1.1 stevesk 1268: .It Cm StrictModes
1269: Specifies whether
1.52 jmc 1270: .Xr sshd 8
1.1 stevesk 1271: should check file modes and ownership of the
1272: user's files and home directory before accepting login.
1273: This is normally desirable because novices sometimes accidentally leave their
1274: directory or files world-writable.
1275: The default is
1276: .Dq yes .
1.112 djm 1277: Note that this does not apply to
1278: .Cm ChrootDirectory ,
1279: whose permissions and ownership are checked unconditionally.
1.1 stevesk 1280: .It Cm Subsystem
1.51 jmc 1281: Configures an external subsystem (e.g. file transfer daemon).
1.59 djm 1282: Arguments should be a subsystem name and a command (with optional arguments)
1283: to execute upon subsystem request.
1.80 djm 1284: .Pp
1.1 stevesk 1285: The command
1286: .Xr sftp-server 8
1287: implements the
1288: .Dq sftp
1289: file transfer subsystem.
1.80 djm 1290: .Pp
1291: Alternately the name
1292: .Dq internal-sftp
1293: implements an in-process
1294: .Dq sftp
1295: server.
1296: This may simplify configurations using
1297: .Cm ChrootDirectory
1298: to force a different filesystem root on clients.
1299: .Pp
1.1 stevesk 1300: By default no subsystems are defined.
1301: Note that this option applies to protocol version 2 only.
1302: .It Cm SyslogFacility
1303: Gives the facility code that is used when logging messages from
1.53 jmc 1304: .Xr sshd 8 .
1.1 stevesk 1305: The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2,
1306: LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
1307: The default is AUTH.
1.27 markus 1308: .It Cm TCPKeepAlive
1309: Specifies whether the system should send TCP keepalive messages to the
1310: other side.
1311: If they are sent, death of the connection or crash of one
1312: of the machines will be properly noticed.
1313: However, this means that
1314: connections will die if the route is down temporarily, and some people
1315: find it annoying.
1316: On the other hand, if TCP keepalives are not sent,
1317: sessions may hang indefinitely on the server, leaving
1318: .Dq ghost
1319: users and consuming server resources.
1320: .Pp
1321: The default is
1322: .Dq yes
1323: (to send TCP keepalive messages), and the server will notice
1324: if the network goes down or the client host crashes.
1325: This avoids infinitely hanging sessions.
1326: .Pp
1327: To disable TCP keepalive messages, the value should be set to
1328: .Dq no .
1.118 djm 1329: .It Cm TrustedUserCAKeys
1330: Specifies a file containing public keys of certificate authorities that are
1.120 djm 1331: trusted to sign user certificates for authentication.
1.119 jmc 1332: Keys are listed one per line; empty lines and comments starting with
1.118 djm 1333: .Ql #
1334: are allowed.
1335: If a certificate is presented for authentication and has its signing CA key
1336: listed in this file, then it may be used for authentication for any user
1337: listed in the certificate's principals list.
1338: Note that certificates that lack a list of principals will not be permitted
1339: for authentication using
1340: .Cm TrustedUserCAKeys .
1.161 jmc 1341: For more details on certificates, see the CERTIFICATES section in
1.118 djm 1342: .Xr ssh-keygen 1 .
1.18 markus 1343: .It Cm UseDNS
1344: Specifies whether
1.52 jmc 1345: .Xr sshd 8
1.40 jmc 1346: should look up the remote host name and check that
1.18 markus 1347: the resolved host name for the remote IP address maps back to the
1348: very same IP address.
1349: The default is
1350: .Dq yes .
1.1 stevesk 1351: .It Cm UseLogin
1352: Specifies whether
1353: .Xr login 1
1354: is used for interactive login sessions.
1355: The default is
1356: .Dq no .
1357: Note that
1358: .Xr login 1
1359: is never used for remote command execution.
1360: Note also, that if this is enabled,
1361: .Cm X11Forwarding
1362: will be disabled because
1363: .Xr login 1
1364: does not know how to handle
1365: .Xr xauth 1
1.15 jmc 1366: cookies.
1367: If
1.1 stevesk 1368: .Cm UsePrivilegeSeparation
1369: is specified, it will be disabled after authentication.
1370: .It Cm UsePrivilegeSeparation
1371: Specifies whether
1.52 jmc 1372: .Xr sshd 8
1.2 stevesk 1373: separates privileges by creating an unprivileged child process
1.15 jmc 1374: to deal with incoming network traffic.
1375: After successful authentication, another process will be created that has
1376: the privilege of the authenticated user.
1377: The goal of privilege separation is to prevent privilege
1.1 stevesk 1378: escalation by containing any corruption within the unprivileged processes.
1379: The default is
1380: .Dq yes .
1.134 djm 1381: If
1382: .Cm UsePrivilegeSeparation
1383: is set to
1384: .Dq sandbox
1385: then the pre-authentication unprivileged process is subject to additional
1386: restrictions.
1.137 djm 1387: .It Cm VersionAddendum
1388: Optionally specifies additional text to append to the SSH protocol banner
1389: sent by the server upon connection.
1390: The default is
1391: .Dq none .
1.1 stevesk 1392: .It Cm X11DisplayOffset
1393: Specifies the first display number available for
1.52 jmc 1394: .Xr sshd 8 Ns 's
1.1 stevesk 1395: X11 forwarding.
1.52 jmc 1396: This prevents sshd from interfering with real X11 servers.
1.1 stevesk 1397: The default is 10.
1398: .It Cm X11Forwarding
1399: Specifies whether X11 forwarding is permitted.
1.13 stevesk 1400: The argument must be
1401: .Dq yes
1402: or
1403: .Dq no .
1.1 stevesk 1404: The default is
1405: .Dq no .
1.13 stevesk 1406: .Pp
1407: When X11 forwarding is enabled, there may be additional exposure to
1408: the server and to client displays if the
1.52 jmc 1409: .Xr sshd 8
1.13 stevesk 1410: proxy display is configured to listen on the wildcard address (see
1411: .Cm X11UseLocalhost
1.52 jmc 1412: below), though this is not the default.
1.13 stevesk 1413: Additionally, the authentication spoofing and authentication data
1414: verification and substitution occur on the client side.
1415: The security risk of using X11 forwarding is that the client's X11
1.52 jmc 1416: display server may be exposed to attack when the SSH client requests
1.13 stevesk 1417: forwarding (see the warnings for
1418: .Cm ForwardX11
1419: in
1.19 jmc 1420: .Xr ssh_config 5 ) .
1.13 stevesk 1421: A system administrator may have a stance in which they want to
1422: protect clients that may expose themselves to attack by unwittingly
1423: requesting X11 forwarding, which can warrant a
1424: .Dq no
1425: setting.
1426: .Pp
1427: Note that disabling X11 forwarding does not prevent users from
1428: forwarding X11 traffic, as users can always install their own forwarders.
1.1 stevesk 1429: X11 forwarding is automatically disabled if
1430: .Cm UseLogin
1431: is enabled.
1432: .It Cm X11UseLocalhost
1433: Specifies whether
1.52 jmc 1434: .Xr sshd 8
1.1 stevesk 1435: should bind the X11 forwarding server to the loopback address or to
1.15 jmc 1436: the wildcard address.
1437: By default,
1.52 jmc 1438: sshd binds the forwarding server to the loopback address and sets the
1.1 stevesk 1439: hostname part of the
1440: .Ev DISPLAY
1441: environment variable to
1442: .Dq localhost .
1.8 stevesk 1443: This prevents remote hosts from connecting to the proxy display.
1.1 stevesk 1444: However, some older X11 clients may not function with this
1445: configuration.
1446: .Cm X11UseLocalhost
1447: may be set to
1448: .Dq no
1449: to specify that the forwarding server should be bound to the wildcard
1450: address.
1451: The argument must be
1452: .Dq yes
1453: or
1454: .Dq no .
1455: The default is
1456: .Dq yes .
1457: .It Cm XAuthLocation
1.11 stevesk 1458: Specifies the full pathname of the
1.1 stevesk 1459: .Xr xauth 1
1460: program.
1461: The default is
1462: .Pa /usr/X11R6/bin/xauth .
1463: .El
1.55 jmc 1464: .Sh TIME FORMATS
1.53 jmc 1465: .Xr sshd 8
1.1 stevesk 1466: command-line arguments and configuration file options that specify time
1467: may be expressed using a sequence of the form:
1468: .Sm off
1.7 stevesk 1469: .Ar time Op Ar qualifier ,
1.1 stevesk 1470: .Sm on
1471: where
1472: .Ar time
1473: is a positive integer value and
1474: .Ar qualifier
1475: is one of the following:
1476: .Pp
1477: .Bl -tag -width Ds -compact -offset indent
1.64 jmc 1478: .It Aq Cm none
1.1 stevesk 1479: seconds
1480: .It Cm s | Cm S
1481: seconds
1482: .It Cm m | Cm M
1483: minutes
1484: .It Cm h | Cm H
1485: hours
1486: .It Cm d | Cm D
1487: days
1488: .It Cm w | Cm W
1489: weeks
1490: .El
1491: .Pp
1492: Each member of the sequence is added together to calculate
1493: the total time value.
1494: .Pp
1495: Time format examples:
1496: .Pp
1497: .Bl -tag -width Ds -compact -offset indent
1498: .It 600
1499: 600 seconds (10 minutes)
1500: .It 10m
1501: 10 minutes
1502: .It 1h30m
1503: 1 hour 30 minutes (90 minutes)
1504: .El
1505: .Sh FILES
1506: .Bl -tag -width Ds
1507: .It Pa /etc/ssh/sshd_config
1508: Contains configuration data for
1.53 jmc 1509: .Xr sshd 8 .
1.1 stevesk 1510: This file should be writable by root only, but it is recommended
1511: (though not necessary) that it be world-readable.
1512: .El
1.19 jmc 1513: .Sh SEE ALSO
1514: .Xr sshd 8
1.1 stevesk 1515: .Sh AUTHORS
1516: OpenSSH is a derivative of the original and free
1517: ssh 1.2.12 release by Tatu Ylonen.
1518: Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
1519: Theo de Raadt and Dug Song
1520: removed many bugs, re-added newer features and
1521: created OpenSSH.
1522: Markus Friedl contributed the support for SSH
1523: protocol versions 1.5 and 2.0.
1524: Niels Provos and Markus Friedl contributed support
1525: for privilege separation.