Annotation of src/usr.bin/ssh/sshd_config.5, Revision 1.50
1.1 stevesk 1: .\" -*- nroff -*-
2: .\"
3: .\" Author: Tatu Ylonen <ylo@cs.hut.fi>
4: .\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
5: .\" All rights reserved
6: .\"
7: .\" As far as I am concerned, the code I have written for this software
8: .\" can be used freely for any purpose. Any derived versions of this
9: .\" software must be clearly marked as such, and if the derived work is
10: .\" incompatible with the protocol description in the RFC file, it must be
11: .\" called by a name other than "ssh" or "Secure Shell".
12: .\"
13: .\" Copyright (c) 1999,2000 Markus Friedl. All rights reserved.
14: .\" Copyright (c) 1999 Aaron Campbell. All rights reserved.
15: .\" Copyright (c) 1999 Theo de Raadt. All rights reserved.
16: .\"
17: .\" Redistribution and use in source and binary forms, with or without
18: .\" modification, are permitted provided that the following conditions
19: .\" are met:
20: .\" 1. Redistributions of source code must retain the above copyright
21: .\" notice, this list of conditions and the following disclaimer.
22: .\" 2. Redistributions in binary form must reproduce the above copyright
23: .\" notice, this list of conditions and the following disclaimer in the
24: .\" documentation and/or other materials provided with the distribution.
25: .\"
26: .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
27: .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
28: .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
29: .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
30: .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
31: .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32: .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33: .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34: .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
35: .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36: .\"
1.50 ! jmc 37: .\" $OpenBSD: sshd_config.5,v 1.49 2006/02/24 10:33:54 jmc Exp $
1.1 stevesk 38: .Dd September 25, 1999
39: .Dt SSHD_CONFIG 5
40: .Os
41: .Sh NAME
42: .Nm sshd_config
43: .Nd OpenSSH SSH daemon configuration file
44: .Sh SYNOPSIS
45: .Bl -tag -width Ds -compact
46: .It Pa /etc/ssh/sshd_config
47: .El
48: .Sh DESCRIPTION
49: .Nm sshd
50: reads configuration data from
51: .Pa /etc/ssh/sshd_config
52: (or the file specified with
53: .Fl f
54: on the command line).
55: The file contains keyword-argument pairs, one per line.
56: Lines starting with
57: .Ql #
58: and empty lines are interpreted as comments.
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
75: .Ql \&*
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
88: .Nm sshd .
89: Valid arguments are
90: .Dq any ,
91: .Dq inet
92: (use IPv4 only) or
93: .Dq inet6
94: (use IPv6 only).
95: The default is
96: .Dq any .
1.1 stevesk 97: .It Cm AllowGroups
98: This keyword can be followed by a list of group name patterns, separated
99: by spaces.
100: If specified, login is allowed only for users whose primary
101: group or supplementary group list matches one of the patterns.
102: Only group names are valid; a numerical group ID is not recognized.
103: By default, login is allowed for all groups.
1.49 jmc 104: .Pp
105: See
106: .Sx PATTERNS
107: in
108: .Xr ssh_config 5
109: for more information on patterns.
1.1 stevesk 110: .It Cm AllowTcpForwarding
111: Specifies whether TCP forwarding is permitted.
112: The default is
113: .Dq yes .
114: Note that disabling TCP forwarding does not improve security unless
115: users are also denied shell access, as they can always install their
116: own forwarders.
117: .It Cm AllowUsers
118: This keyword can be followed by a list of user name patterns, separated
119: by spaces.
1.14 jmc 120: If specified, login is allowed only for user names that
1.1 stevesk 121: match one of the patterns.
122: Only user names are valid; a numerical user ID is not recognized.
123: By default, login is allowed for all users.
124: If the pattern takes the form USER@HOST then USER and HOST
125: are separately checked, restricting logins to particular
126: users from particular hosts.
1.49 jmc 127: .Pp
128: See
129: .Sx PATTERNS
130: in
131: .Xr ssh_config 5
132: for more information on patterns.
1.1 stevesk 133: .It Cm AuthorizedKeysFile
134: Specifies the file that contains the public keys that can be used
135: for user authentication.
136: .Cm AuthorizedKeysFile
137: may contain tokens of the form %T which are substituted during connection
1.17 jmc 138: set-up.
139: The following tokens are defined: %% is replaced by a literal '%',
1.1 stevesk 140: %h is replaced by the home directory of the user being authenticated and
141: %u is replaced by the username of that user.
142: After expansion,
143: .Cm AuthorizedKeysFile
144: is taken to be an absolute path or one relative to the user's home
145: directory.
146: The default is
147: .Dq .ssh/authorized_keys .
148: .It Cm Banner
149: In some jurisdictions, sending a warning message before authentication
150: may be relevant for getting legal protection.
151: The contents of the specified file are sent to the remote user before
152: authentication is allowed.
153: This option is only available for protocol version 2.
154: By default, no banner is displayed.
155: .It Cm ChallengeResponseAuthentication
1.50 ! jmc 156: Specifies whether challenge-response authentication is allowed.
1.1 stevesk 157: All authentication styles from
158: .Xr login.conf 5
159: are supported.
160: The default is
161: .Dq yes .
162: .It Cm Ciphers
163: Specifies the ciphers allowed for protocol version 2.
164: Multiple ciphers must be comma-separated.
1.34 dtucker 165: The supported ciphers are
166: .Dq 3des-cbc ,
167: .Dq aes128-cbc ,
168: .Dq aes192-cbc ,
169: .Dq aes256-cbc ,
170: .Dq aes128-ctr ,
171: .Dq aes192-ctr ,
172: .Dq aes256-ctr ,
1.43 djm 173: .Dq arcfour128 ,
174: .Dq arcfour256 ,
1.34 dtucker 175: .Dq arcfour ,
176: .Dq blowfish-cbc ,
177: and
178: .Dq cast128-cbc .
1.1 stevesk 179: The default is
180: .Bd -literal
1.43 djm 181: ``aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,
182: arcfour256,arcfour,aes192-cbc,aes256-cbc,aes128-ctr,
183: aes192-ctr,aes256-ctr''
1.1 stevesk 184: .Ed
185: .It Cm ClientAliveCountMax
1.48 jmc 186: Sets the number of client alive messages (see below) which may be
1.1 stevesk 187: sent without
188: .Nm sshd
1.17 jmc 189: receiving any messages back from the client.
190: If this threshold is reached while client alive messages are being sent,
1.1 stevesk 191: .Nm sshd
1.17 jmc 192: will disconnect the client, terminating the session.
193: It is important to note that the use of client alive messages is very
194: different from
1.27 markus 195: .Cm TCPKeepAlive
1.17 jmc 196: (below).
197: The client alive messages are sent through the encrypted channel
198: and therefore will not be spoofable.
199: The TCP keepalive option enabled by
1.27 markus 200: .Cm TCPKeepAlive
1.17 jmc 201: is spoofable.
202: The client alive mechanism is valuable when the client or
1.1 stevesk 203: server depend on knowing when a connection has become inactive.
204: .Pp
1.17 jmc 205: The default value is 3.
206: If
1.1 stevesk 207: .Cm ClientAliveInterval
1.48 jmc 208: (see below) is set to 15, and
1.1 stevesk 209: .Cm ClientAliveCountMax
210: is left at the default, unresponsive ssh clients
211: will be disconnected after approximately 45 seconds.
1.42 djm 212: .It Cm ClientAliveInterval
213: Sets a timeout interval in seconds after which if no data has been received
214: from the client,
215: .Nm sshd
216: will send a message through the encrypted
217: channel to request a response from the client.
218: The default
219: is 0, indicating that these messages will not be sent to the client.
220: This option applies to protocol version 2 only.
1.3 markus 221: .It Cm Compression
1.44 markus 222: Specifies whether compression is allowed, or delayed until
223: the user has authenticated successfully.
1.3 markus 224: The argument must be
1.44 markus 225: .Dq yes ,
226: .Dq delayed ,
1.3 markus 227: or
228: .Dq no .
229: The default is
1.44 markus 230: .Dq delayed .
1.1 stevesk 231: .It Cm DenyGroups
232: This keyword can be followed by a list of group name patterns, separated
233: by spaces.
234: Login is disallowed for users whose primary group or supplementary
235: group list matches one of the patterns.
236: Only group names are valid; a numerical group ID is not recognized.
237: By default, login is allowed for all groups.
1.49 jmc 238: .Pp
239: See
240: .Sx PATTERNS
241: in
242: .Xr ssh_config 5
243: for more information on patterns.
1.1 stevesk 244: .It Cm DenyUsers
245: This keyword can be followed by a list of user name patterns, separated
246: by spaces.
247: Login is disallowed for user names that match one of the patterns.
248: Only user names are valid; a numerical user ID is not recognized.
249: By default, login is allowed for all users.
250: If the pattern takes the form USER@HOST then USER and HOST
251: are separately checked, restricting logins to particular
252: users from particular hosts.
1.49 jmc 253: .Pp
254: See
255: .Sx PATTERNS
256: in
257: .Xr ssh_config 5
258: for more information on patterns.
1.1 stevesk 259: .It Cm GatewayPorts
260: Specifies whether remote hosts are allowed to connect to ports
261: forwarded for the client.
262: By default,
263: .Nm sshd
1.15 jmc 264: binds remote port forwardings to the loopback address.
265: This prevents other remote hosts from connecting to forwarded ports.
1.1 stevesk 266: .Cm GatewayPorts
267: can be used to specify that
268: .Nm sshd
1.39 djm 269: should allow remote port forwardings to bind to non-loopback addresses, thus
270: allowing other hosts to connect.
271: The argument may be
272: .Dq no
273: to force remote port forwardings to be available to the local host only,
1.1 stevesk 274: .Dq yes
1.39 djm 275: to force remote port forwardings to bind to the wildcard address, or
276: .Dq clientspecified
277: to allow the client to select the address to which the forwarding is bound.
1.1 stevesk 278: The default is
279: .Dq no .
1.23 markus 280: .It Cm GSSAPIAuthentication
1.25 markus 281: Specifies whether user authentication based on GSSAPI is allowed.
1.26 djm 282: The default is
1.23 markus 283: .Dq no .
284: Note that this option applies to protocol version 2 only.
285: .It Cm GSSAPICleanupCredentials
286: Specifies whether to automatically destroy the user's credentials cache
287: on logout.
288: The default is
289: .Dq yes .
290: Note that this option applies to protocol version 2 only.
1.1 stevesk 291: .It Cm HostbasedAuthentication
292: Specifies whether rhosts or /etc/hosts.equiv authentication together
293: with successful public key client host authentication is allowed
1.50 ! jmc 294: (host-based authentication).
1.1 stevesk 295: This option is similar to
296: .Cm RhostsRSAAuthentication
297: and applies to protocol version 2 only.
298: The default is
299: .Dq no .
300: .It Cm HostKey
301: Specifies a file containing a private host key
302: used by SSH.
303: The default is
304: .Pa /etc/ssh/ssh_host_key
305: for protocol version 1, and
306: .Pa /etc/ssh/ssh_host_rsa_key
307: and
308: .Pa /etc/ssh/ssh_host_dsa_key
309: for protocol version 2.
310: Note that
311: .Nm sshd
312: will refuse to use a file if it is group/world-accessible.
313: It is possible to have multiple host key files.
314: .Dq rsa1
315: keys are used for version 1 and
316: .Dq dsa
317: or
318: .Dq rsa
319: are used for version 2 of the SSH protocol.
320: .It Cm IgnoreRhosts
321: Specifies that
322: .Pa .rhosts
323: and
324: .Pa .shosts
325: files will not be used in
326: .Cm RhostsRSAAuthentication
327: or
328: .Cm HostbasedAuthentication .
329: .Pp
330: .Pa /etc/hosts.equiv
331: and
332: .Pa /etc/shosts.equiv
333: are still used.
334: The default is
335: .Dq yes .
336: .It Cm IgnoreUserKnownHosts
337: Specifies whether
338: .Nm sshd
339: should ignore the user's
1.41 djm 340: .Pa ~/.ssh/known_hosts
1.1 stevesk 341: during
342: .Cm RhostsRSAAuthentication
343: or
344: .Cm HostbasedAuthentication .
345: The default is
346: .Dq no .
347: .It Cm KerberosAuthentication
1.24 markus 348: Specifies whether the password provided by the user for
1.1 stevesk 349: .Cm PasswordAuthentication
1.24 markus 350: will be validated through the Kerberos KDC.
1.1 stevesk 351: To use this option, the server needs a
352: Kerberos servtab which allows the verification of the KDC's identity.
1.29 dtucker 353: Default is
354: .Dq no .
355: .It Cm KerberosGetAFSToken
1.45 djm 356: If AFS is active and the user has a Kerberos 5 TGT, attempt to acquire
1.29 dtucker 357: an AFS token before accessing the user's home directory.
1.1 stevesk 358: Default is
359: .Dq no .
360: .It Cm KerberosOrLocalPasswd
361: If set then if password authentication through Kerberos fails then
362: the password will be validated via any additional local mechanism
363: such as
364: .Pa /etc/passwd .
365: Default is
366: .Dq yes .
367: .It Cm KerberosTicketCleanup
368: Specifies whether to automatically destroy the user's ticket cache
369: file on logout.
370: Default is
371: .Dq yes .
372: .It Cm KeyRegenerationInterval
373: In protocol version 1, the ephemeral server key is automatically regenerated
374: after this many seconds (if it has been used).
375: The purpose of regeneration is to prevent
376: decrypting captured sessions by later breaking into the machine and
377: stealing the keys.
378: The key is never stored anywhere.
379: If the value is 0, the key is never regenerated.
380: The default is 3600 (seconds).
381: .It Cm ListenAddress
382: Specifies the local addresses
383: .Nm sshd
384: should listen on.
385: The following forms may be used:
386: .Pp
387: .Bl -item -offset indent -compact
388: .It
389: .Cm ListenAddress
390: .Sm off
391: .Ar host No | Ar IPv4_addr No | Ar IPv6_addr
392: .Sm on
393: .It
394: .Cm ListenAddress
395: .Sm off
396: .Ar host No | Ar IPv4_addr No : Ar port
397: .Sm on
398: .It
399: .Cm ListenAddress
400: .Sm off
401: .Oo
402: .Ar host No | Ar IPv6_addr Oc : Ar port
403: .Sm on
404: .El
405: .Pp
406: If
407: .Ar port
408: is not specified,
409: .Nm sshd
410: will listen on the address and all prior
411: .Cm Port
1.17 jmc 412: options specified.
413: The default is to listen on all local addresses.
1.15 jmc 414: Multiple
1.1 stevesk 415: .Cm ListenAddress
1.17 jmc 416: options are permitted.
417: Additionally, any
1.1 stevesk 418: .Cm Port
419: options must precede this option for non port qualified addresses.
420: .It Cm LoginGraceTime
421: The server disconnects after this time if the user has not
422: successfully logged in.
423: If the value is 0, there is no time limit.
1.12 stevesk 424: The default is 120 seconds.
1.1 stevesk 425: .It Cm LogLevel
426: Gives the verbosity level that is used when logging messages from
427: .Nm sshd .
428: The possible values are:
429: QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2 and DEBUG3.
1.15 jmc 430: The default is INFO.
431: DEBUG and DEBUG1 are equivalent.
432: DEBUG2 and DEBUG3 each specify higher levels of debugging output.
433: Logging with a DEBUG level violates the privacy of users and is not recommended.
1.1 stevesk 434: .It Cm MACs
435: Specifies the available MAC (message authentication code) algorithms.
436: The MAC algorithm is used in protocol version 2
437: for data integrity protection.
438: Multiple algorithms must be comma-separated.
439: The default is
440: .Dq hmac-md5,hmac-sha1,hmac-ripemd160,hmac-sha1-96,hmac-md5-96 .
1.33 dtucker 441: .It Cm MaxAuthTries
442: Specifies the maximum number of authentication attempts permitted per
1.35 jmc 443: connection.
444: Once the number of failures reaches half this value,
445: additional failures are logged.
446: The default is 6.
1.1 stevesk 447: .It Cm MaxStartups
448: Specifies the maximum number of concurrent unauthenticated connections to the
449: .Nm sshd
450: daemon.
451: Additional connections will be dropped until authentication succeeds or the
452: .Cm LoginGraceTime
453: expires for a connection.
454: The default is 10.
455: .Pp
456: Alternatively, random early drop can be enabled by specifying
457: the three colon separated values
458: .Dq start:rate:full
459: (e.g., "10:30:60").
460: .Nm sshd
461: will refuse connection attempts with a probability of
462: .Dq rate/100
463: (30%)
464: if there are currently
465: .Dq start
466: (10)
467: unauthenticated connections.
468: The probability increases linearly and all connection attempts
469: are refused if the number of unauthenticated connections reaches
470: .Dq full
471: (60).
472: .It Cm PasswordAuthentication
473: Specifies whether password authentication is allowed.
474: The default is
475: .Dq yes .
476: .It Cm PermitEmptyPasswords
477: When password authentication is allowed, it specifies whether the
478: server allows login to accounts with empty password strings.
479: The default is
480: .Dq no .
481: .It Cm PermitRootLogin
1.38 jmc 482: Specifies whether root can log in using
1.1 stevesk 483: .Xr ssh 1 .
484: The argument must be
485: .Dq yes ,
486: .Dq without-password ,
487: .Dq forced-commands-only
488: or
489: .Dq no .
490: The default is
491: .Dq yes .
492: .Pp
493: If this option is set to
494: .Dq without-password
495: password authentication is disabled for root.
496: .Pp
497: If this option is set to
498: .Dq forced-commands-only
499: root login with public key authentication will be allowed,
500: but only if the
501: .Ar command
502: option has been specified
503: (which may be useful for taking remote backups even if root login is
1.17 jmc 504: normally not allowed).
505: All other authentication methods are disabled for root.
1.1 stevesk 506: .Pp
507: If this option is set to
508: .Dq no
1.38 jmc 509: root is not allowed to log in.
1.46 reyk 510: .It Cm PermitTunnel
511: Specifies whether
512: .Xr tun 4
513: device forwarding is allowed.
1.47 reyk 514: The argument must be
515: .Dq yes ,
516: .Dq point-to-point ,
517: .Dq ethernet
518: or
519: .Dq no .
1.46 reyk 520: The default is
521: .Dq no .
1.6 markus 522: .It Cm PermitUserEnvironment
523: Specifies whether
524: .Pa ~/.ssh/environment
1.9 stevesk 525: and
1.6 markus 526: .Cm environment=
527: options in
528: .Pa ~/.ssh/authorized_keys
1.9 stevesk 529: are processed by
530: .Nm sshd .
1.6 markus 531: The default is
532: .Dq no .
1.9 stevesk 533: Enabling environment processing may enable users to bypass access
534: restrictions in some configurations using mechanisms such as
535: .Ev LD_PRELOAD .
1.1 stevesk 536: .It Cm PidFile
1.4 stevesk 537: Specifies the file that contains the process ID of the
1.1 stevesk 538: .Nm sshd
539: daemon.
540: The default is
541: .Pa /var/run/sshd.pid .
542: .It Cm Port
543: Specifies the port number that
544: .Nm sshd
545: listens on.
546: The default is 22.
547: Multiple options of this type are permitted.
548: See also
549: .Cm ListenAddress .
550: .It Cm PrintLastLog
551: Specifies whether
552: .Nm sshd
1.36 jaredy 553: should print the date and time of the last user login when a user logs
554: in interactively.
1.1 stevesk 555: The default is
556: .Dq yes .
557: .It Cm PrintMotd
558: Specifies whether
559: .Nm sshd
560: should print
561: .Pa /etc/motd
562: when a user logs in interactively.
563: (On some systems it is also printed by the shell,
564: .Pa /etc/profile ,
565: or equivalent.)
566: The default is
567: .Dq yes .
568: .It Cm Protocol
569: Specifies the protocol versions
570: .Nm sshd
1.5 stevesk 571: supports.
1.1 stevesk 572: The possible values are
573: .Dq 1
574: and
575: .Dq 2 .
576: Multiple versions must be comma-separated.
577: The default is
578: .Dq 2,1 .
1.5 stevesk 579: Note that the order of the protocol list does not indicate preference,
580: because the client selects among multiple protocol versions offered
581: by the server.
582: Specifying
583: .Dq 2,1
584: is identical to
585: .Dq 1,2 .
1.1 stevesk 586: .It Cm PubkeyAuthentication
587: Specifies whether public key authentication is allowed.
588: The default is
589: .Dq yes .
590: Note that this option applies to protocol version 2 only.
591: .It Cm RhostsRSAAuthentication
592: Specifies whether rhosts or /etc/hosts.equiv authentication together
593: with successful RSA host authentication is allowed.
594: The default is
595: .Dq no .
596: This option applies to protocol version 1 only.
597: .It Cm RSAAuthentication
598: Specifies whether pure RSA authentication is allowed.
599: The default is
600: .Dq yes .
601: This option applies to protocol version 1 only.
602: .It Cm ServerKeyBits
603: Defines the number of bits in the ephemeral protocol version 1 server key.
604: The minimum value is 512, and the default is 768.
605: .It Cm StrictModes
606: Specifies whether
607: .Nm sshd
608: should check file modes and ownership of the
609: user's files and home directory before accepting login.
610: This is normally desirable because novices sometimes accidentally leave their
611: directory or files world-writable.
612: The default is
613: .Dq yes .
614: .It Cm Subsystem
615: Configures an external subsystem (e.g., file transfer daemon).
616: Arguments should be a subsystem name and a command to execute upon subsystem
617: request.
618: The command
619: .Xr sftp-server 8
620: implements the
621: .Dq sftp
622: file transfer subsystem.
623: By default no subsystems are defined.
624: Note that this option applies to protocol version 2 only.
625: .It Cm SyslogFacility
626: Gives the facility code that is used when logging messages from
627: .Nm sshd .
628: The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2,
629: LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
630: The default is AUTH.
1.27 markus 631: .It Cm TCPKeepAlive
632: Specifies whether the system should send TCP keepalive messages to the
633: other side.
634: If they are sent, death of the connection or crash of one
635: of the machines will be properly noticed.
636: However, this means that
637: connections will die if the route is down temporarily, and some people
638: find it annoying.
639: On the other hand, if TCP keepalives are not sent,
640: sessions may hang indefinitely on the server, leaving
641: .Dq ghost
642: users and consuming server resources.
643: .Pp
644: The default is
645: .Dq yes
646: (to send TCP keepalive messages), and the server will notice
647: if the network goes down or the client host crashes.
648: This avoids infinitely hanging sessions.
649: .Pp
650: To disable TCP keepalive messages, the value should be set to
651: .Dq no .
1.18 markus 652: .It Cm UseDNS
653: Specifies whether
654: .Nm sshd
1.40 jmc 655: should look up the remote host name and check that
1.18 markus 656: the resolved host name for the remote IP address maps back to the
657: very same IP address.
658: The default is
659: .Dq yes .
1.1 stevesk 660: .It Cm UseLogin
661: Specifies whether
662: .Xr login 1
663: is used for interactive login sessions.
664: The default is
665: .Dq no .
666: Note that
667: .Xr login 1
668: is never used for remote command execution.
669: Note also, that if this is enabled,
670: .Cm X11Forwarding
671: will be disabled because
672: .Xr login 1
673: does not know how to handle
674: .Xr xauth 1
1.15 jmc 675: cookies.
676: If
1.1 stevesk 677: .Cm UsePrivilegeSeparation
678: is specified, it will be disabled after authentication.
679: .It Cm UsePrivilegeSeparation
680: Specifies whether
681: .Nm sshd
1.2 stevesk 682: separates privileges by creating an unprivileged child process
1.15 jmc 683: to deal with incoming network traffic.
684: After successful authentication, another process will be created that has
685: the privilege of the authenticated user.
686: The goal of privilege separation is to prevent privilege
1.1 stevesk 687: escalation by containing any corruption within the unprivileged processes.
688: The default is
689: .Dq yes .
690: .It Cm X11DisplayOffset
691: Specifies the first display number available for
692: .Nm sshd Ns 's
693: X11 forwarding.
694: This prevents
695: .Nm sshd
696: from interfering with real X11 servers.
697: The default is 10.
698: .It Cm X11Forwarding
699: Specifies whether X11 forwarding is permitted.
1.13 stevesk 700: The argument must be
701: .Dq yes
702: or
703: .Dq no .
1.1 stevesk 704: The default is
705: .Dq no .
1.13 stevesk 706: .Pp
707: When X11 forwarding is enabled, there may be additional exposure to
708: the server and to client displays if the
709: .Nm sshd
710: proxy display is configured to listen on the wildcard address (see
711: .Cm X11UseLocalhost
712: below), however this is not the default.
713: Additionally, the authentication spoofing and authentication data
714: verification and substitution occur on the client side.
715: The security risk of using X11 forwarding is that the client's X11
716: display server may be exposed to attack when the ssh client requests
717: forwarding (see the warnings for
718: .Cm ForwardX11
719: in
1.19 jmc 720: .Xr ssh_config 5 ) .
1.13 stevesk 721: A system administrator may have a stance in which they want to
722: protect clients that may expose themselves to attack by unwittingly
723: requesting X11 forwarding, which can warrant a
724: .Dq no
725: setting.
726: .Pp
727: Note that disabling X11 forwarding does not prevent users from
728: forwarding X11 traffic, as users can always install their own forwarders.
1.1 stevesk 729: X11 forwarding is automatically disabled if
730: .Cm UseLogin
731: is enabled.
732: .It Cm X11UseLocalhost
733: Specifies whether
734: .Nm sshd
735: should bind the X11 forwarding server to the loopback address or to
1.15 jmc 736: the wildcard address.
737: By default,
1.1 stevesk 738: .Nm sshd
739: binds the forwarding server to the loopback address and sets the
740: hostname part of the
741: .Ev DISPLAY
742: environment variable to
743: .Dq localhost .
1.8 stevesk 744: This prevents remote hosts from connecting to the proxy display.
1.1 stevesk 745: However, some older X11 clients may not function with this
746: configuration.
747: .Cm X11UseLocalhost
748: may be set to
749: .Dq no
750: to specify that the forwarding server should be bound to the wildcard
751: address.
752: The argument must be
753: .Dq yes
754: or
755: .Dq no .
756: The default is
757: .Dq yes .
758: .It Cm XAuthLocation
1.11 stevesk 759: Specifies the full pathname of the
1.1 stevesk 760: .Xr xauth 1
761: program.
762: The default is
763: .Pa /usr/X11R6/bin/xauth .
764: .El
765: .Ss Time Formats
766: .Nm sshd
767: command-line arguments and configuration file options that specify time
768: may be expressed using a sequence of the form:
769: .Sm off
1.7 stevesk 770: .Ar time Op Ar qualifier ,
1.1 stevesk 771: .Sm on
772: where
773: .Ar time
774: is a positive integer value and
775: .Ar qualifier
776: is one of the following:
777: .Pp
778: .Bl -tag -width Ds -compact -offset indent
779: .It Cm <none>
780: seconds
781: .It Cm s | Cm S
782: seconds
783: .It Cm m | Cm M
784: minutes
785: .It Cm h | Cm H
786: hours
787: .It Cm d | Cm D
788: days
789: .It Cm w | Cm W
790: weeks
791: .El
792: .Pp
793: Each member of the sequence is added together to calculate
794: the total time value.
795: .Pp
796: Time format examples:
797: .Pp
798: .Bl -tag -width Ds -compact -offset indent
799: .It 600
800: 600 seconds (10 minutes)
801: .It 10m
802: 10 minutes
803: .It 1h30m
804: 1 hour 30 minutes (90 minutes)
805: .El
806: .Sh FILES
807: .Bl -tag -width Ds
808: .It Pa /etc/ssh/sshd_config
809: Contains configuration data for
810: .Nm sshd .
811: This file should be writable by root only, but it is recommended
812: (though not necessary) that it be world-readable.
813: .El
1.19 jmc 814: .Sh SEE ALSO
815: .Xr sshd 8
1.1 stevesk 816: .Sh AUTHORS
817: OpenSSH is a derivative of the original and free
818: ssh 1.2.12 release by Tatu Ylonen.
819: Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
820: Theo de Raadt and Dug Song
821: removed many bugs, re-added newer features and
822: created OpenSSH.
823: Markus Friedl contributed the support for SSH
824: protocol versions 1.5 and 2.0.
825: Niels Provos and Markus Friedl contributed support
826: for privilege separation.