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