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