blob: 86b3289a105ba279d1f3c617e97d54810400dc20 [file] [log] [blame]
Ben Lindstrom9f049032002-06-21 00:59:05 +00001.\" -*- 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.\"
Damien Millerfbf486b2003-05-23 18:44:23 +100037.\" $OpenBSD: sshd_config.5,v 1.17 2003/05/20 12:09:32 jmc Exp $
Ben Lindstrom9f049032002-06-21 00:59:05 +000038.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
50reads configuration data from
51.Pa /etc/ssh/sshd_config
52(or the file specified with
53.Fl f
54on the command line).
55The file contains keyword-argument pairs, one per line.
56Lines starting with
57.Ql #
58and empty lines are interpreted as comments.
59.Pp
60The possible
61keywords and their meanings are as follows (note that
62keywords are case-insensitive and arguments are case-sensitive):
63.Bl -tag -width Ds
64.It Cm AFSTokenPassing
65Specifies whether an AFS token may be forwarded to the server.
66Default is
67.Dq no .
68.It Cm AllowGroups
69This keyword can be followed by a list of group name patterns, separated
70by spaces.
71If specified, login is allowed only for users whose primary
72group or supplementary group list matches one of the patterns.
73.Ql \&*
74and
Damien Miller049245d2003-05-14 13:44:42 +100075.Ql \&?
Ben Lindstrom9f049032002-06-21 00:59:05 +000076can be used as
77wildcards in the patterns.
78Only group names are valid; a numerical group ID is not recognized.
79By default, login is allowed for all groups.
80.Pp
81.It Cm AllowTcpForwarding
82Specifies whether TCP forwarding is permitted.
83The default is
84.Dq yes .
85Note that disabling TCP forwarding does not improve security unless
86users are also denied shell access, as they can always install their
87own forwarders.
88.Pp
89.It Cm AllowUsers
90This keyword can be followed by a list of user name patterns, separated
91by spaces.
Damien Miller5a93add2003-01-24 11:34:52 +110092If specified, login is allowed only for user names that
Ben Lindstrom9f049032002-06-21 00:59:05 +000093match one of the patterns.
94.Ql \&*
95and
Damien Miller049245d2003-05-14 13:44:42 +100096.Ql \&?
Ben Lindstrom9f049032002-06-21 00:59:05 +000097can be used as
98wildcards in the patterns.
99Only user names are valid; a numerical user ID is not recognized.
100By default, login is allowed for all users.
101If the pattern takes the form USER@HOST then USER and HOST
102are separately checked, restricting logins to particular
103users from particular hosts.
104.Pp
105.It Cm AuthorizedKeysFile
106Specifies the file that contains the public keys that can be used
107for user authentication.
108.Cm AuthorizedKeysFile
109may contain tokens of the form %T which are substituted during connection
Damien Millerfbf486b2003-05-23 18:44:23 +1000110set-up.
111The following tokens are defined: %% is replaced by a literal '%',
Ben Lindstrom9f049032002-06-21 00:59:05 +0000112%h is replaced by the home directory of the user being authenticated and
113%u is replaced by the username of that user.
114After expansion,
115.Cm AuthorizedKeysFile
116is taken to be an absolute path or one relative to the user's home
117directory.
118The default is
119.Dq .ssh/authorized_keys .
120.It Cm Banner
121In some jurisdictions, sending a warning message before authentication
122may be relevant for getting legal protection.
123The contents of the specified file are sent to the remote user before
124authentication is allowed.
125This option is only available for protocol version 2.
126By default, no banner is displayed.
127.Pp
128.It Cm ChallengeResponseAuthentication
129Specifies whether challenge response authentication is allowed.
130All authentication styles from
131.Xr login.conf 5
132are supported.
133The default is
134.Dq yes .
135.It Cm Ciphers
136Specifies the ciphers allowed for protocol version 2.
137Multiple ciphers must be comma-separated.
138The default is
139.Pp
140.Bd -literal
141 ``aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,
142 aes192-cbc,aes256-cbc''
143.Ed
144.It Cm ClientAliveInterval
145Sets a timeout interval in seconds after which if no data has been received
146from the client,
147.Nm sshd
148will send a message through the encrypted
149channel to request a response from the client.
150The default
151is 0, indicating that these messages will not be sent to the client.
152This option applies to protocol version 2 only.
153.It Cm ClientAliveCountMax
154Sets the number of client alive messages (see above) which may be
155sent without
156.Nm sshd
Damien Millerfbf486b2003-05-23 18:44:23 +1000157receiving any messages back from the client.
158If this threshold is reached while client alive messages are being sent,
Ben Lindstrom9f049032002-06-21 00:59:05 +0000159.Nm sshd
Damien Millerfbf486b2003-05-23 18:44:23 +1000160will disconnect the client, terminating the session.
161It is important to note that the use of client alive messages is very
162different from
Ben Lindstrom9f049032002-06-21 00:59:05 +0000163.Cm KeepAlive
Damien Millerfbf486b2003-05-23 18:44:23 +1000164(below).
165The client alive messages are sent through the encrypted channel
166and therefore will not be spoofable.
167The TCP keepalive option enabled by
Ben Lindstrom9f049032002-06-21 00:59:05 +0000168.Cm KeepAlive
Damien Millerfbf486b2003-05-23 18:44:23 +1000169is spoofable.
170The client alive mechanism is valuable when the client or
Ben Lindstrom9f049032002-06-21 00:59:05 +0000171server depend on knowing when a connection has become inactive.
172.Pp
Damien Millerfbf486b2003-05-23 18:44:23 +1000173The default value is 3.
174If
Ben Lindstrom9f049032002-06-21 00:59:05 +0000175.Cm ClientAliveInterval
176(above) is set to 15, and
177.Cm ClientAliveCountMax
178is left at the default, unresponsive ssh clients
179will be disconnected after approximately 45 seconds.
180.It Cm Compression
181Specifies whether compression is allowed.
182The argument must be
183.Dq yes
184or
185.Dq no .
186The default is
187.Dq yes .
188.It Cm DenyGroups
189This keyword can be followed by a list of group name patterns, separated
190by spaces.
191Login is disallowed for users whose primary group or supplementary
192group list matches one of the patterns.
193.Ql \&*
194and
Damien Miller049245d2003-05-14 13:44:42 +1000195.Ql \&?
Ben Lindstrom9f049032002-06-21 00:59:05 +0000196can be used as
197wildcards in the patterns.
198Only group names are valid; a numerical group ID is not recognized.
199By default, login is allowed for all groups.
200.Pp
201.It Cm DenyUsers
202This keyword can be followed by a list of user name patterns, separated
203by spaces.
204Login is disallowed for user names that match one of the patterns.
205.Ql \&*
206and
Damien Miller049245d2003-05-14 13:44:42 +1000207.Ql \&?
Ben Lindstrom9f049032002-06-21 00:59:05 +0000208can be used as wildcards in the patterns.
209Only user names are valid; a numerical user ID is not recognized.
210By default, login is allowed for all users.
211If the pattern takes the form USER@HOST then USER and HOST
212are separately checked, restricting logins to particular
213users from particular hosts.
214.It Cm GatewayPorts
215Specifies whether remote hosts are allowed to connect to ports
216forwarded for the client.
217By default,
218.Nm sshd
Damien Miller495dca32003-04-01 21:42:14 +1000219binds remote port forwardings to the loopback address.
220This prevents other remote hosts from connecting to forwarded ports.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000221.Cm GatewayPorts
222can be used to specify that
223.Nm sshd
224should bind remote port forwardings to the wildcard address,
225thus allowing remote hosts to connect to forwarded ports.
226The argument must be
227.Dq yes
228or
229.Dq no .
230The default is
231.Dq no .
232.It Cm HostbasedAuthentication
233Specifies whether rhosts or /etc/hosts.equiv authentication together
234with successful public key client host authentication is allowed
235(hostbased authentication).
236This option is similar to
237.Cm RhostsRSAAuthentication
238and applies to protocol version 2 only.
239The default is
240.Dq no .
241.It Cm HostKey
242Specifies a file containing a private host key
243used by SSH.
244The default is
245.Pa /etc/ssh/ssh_host_key
246for protocol version 1, and
247.Pa /etc/ssh/ssh_host_rsa_key
248and
249.Pa /etc/ssh/ssh_host_dsa_key
250for protocol version 2.
251Note that
252.Nm sshd
253will refuse to use a file if it is group/world-accessible.
254It is possible to have multiple host key files.
255.Dq rsa1
256keys are used for version 1 and
257.Dq dsa
258or
259.Dq rsa
260are used for version 2 of the SSH protocol.
261.It Cm IgnoreRhosts
262Specifies that
263.Pa .rhosts
264and
265.Pa .shosts
266files will not be used in
267.Cm RhostsAuthentication ,
268.Cm RhostsRSAAuthentication
269or
270.Cm HostbasedAuthentication .
271.Pp
272.Pa /etc/hosts.equiv
273and
274.Pa /etc/shosts.equiv
275are still used.
276The default is
277.Dq yes .
278.It Cm IgnoreUserKnownHosts
279Specifies whether
280.Nm sshd
281should ignore the user's
282.Pa $HOME/.ssh/known_hosts
283during
284.Cm RhostsRSAAuthentication
285or
286.Cm HostbasedAuthentication .
287The default is
288.Dq no .
289.It Cm KeepAlive
290Specifies whether the system should send TCP keepalive messages to the
291other side.
292If they are sent, death of the connection or crash of one
293of the machines will be properly noticed.
294However, this means that
295connections will die if the route is down temporarily, and some people
296find it annoying.
297On the other hand, if keepalives are not sent,
298sessions may hang indefinitely on the server, leaving
299.Dq ghost
300users and consuming server resources.
301.Pp
302The default is
303.Dq yes
304(to send keepalives), and the server will notice
305if the network goes down or the client host crashes.
306This avoids infinitely hanging sessions.
307.Pp
308To disable keepalives, the value should be set to
309.Dq no .
310.It Cm KerberosAuthentication
311Specifies whether Kerberos authentication is allowed.
312This can be in the form of a Kerberos ticket, or if
Ben Lindstrom9f049032002-06-21 00:59:05 +0000313.Cm PasswordAuthentication
314is yes, the password provided by the user will be validated through
315the Kerberos KDC.
316To use this option, the server needs a
317Kerberos servtab which allows the verification of the KDC's identity.
318Default is
319.Dq no .
320.It Cm KerberosOrLocalPasswd
321If set then if password authentication through Kerberos fails then
322the password will be validated via any additional local mechanism
323such as
324.Pa /etc/passwd .
325Default is
326.Dq yes .
327.It Cm KerberosTgtPassing
328Specifies whether a Kerberos TGT may be forwarded to the server.
329Default is
330.Dq no ,
331as this only works when the Kerberos KDC is actually an AFS kaserver.
332.It Cm KerberosTicketCleanup
333Specifies whether to automatically destroy the user's ticket cache
334file on logout.
335Default is
336.Dq yes .
337.It Cm KeyRegenerationInterval
338In protocol version 1, the ephemeral server key is automatically regenerated
339after this many seconds (if it has been used).
340The purpose of regeneration is to prevent
341decrypting captured sessions by later breaking into the machine and
342stealing the keys.
343The key is never stored anywhere.
344If the value is 0, the key is never regenerated.
345The default is 3600 (seconds).
346.It Cm ListenAddress
347Specifies the local addresses
348.Nm sshd
349should listen on.
350The following forms may be used:
351.Pp
352.Bl -item -offset indent -compact
353.It
354.Cm ListenAddress
355.Sm off
356.Ar host No | Ar IPv4_addr No | Ar IPv6_addr
357.Sm on
358.It
359.Cm ListenAddress
360.Sm off
361.Ar host No | Ar IPv4_addr No : Ar port
362.Sm on
363.It
364.Cm ListenAddress
365.Sm off
366.Oo
367.Ar host No | Ar IPv6_addr Oc : Ar port
368.Sm on
369.El
370.Pp
371If
372.Ar port
373is not specified,
374.Nm sshd
375will listen on the address and all prior
376.Cm Port
Damien Millerfbf486b2003-05-23 18:44:23 +1000377options specified.
378The default is to listen on all local addresses.
Damien Miller495dca32003-04-01 21:42:14 +1000379Multiple
Ben Lindstrom9f049032002-06-21 00:59:05 +0000380.Cm ListenAddress
Damien Millerfbf486b2003-05-23 18:44:23 +1000381options are permitted.
382Additionally, any
Ben Lindstrom9f049032002-06-21 00:59:05 +0000383.Cm Port
384options must precede this option for non port qualified addresses.
385.It Cm LoginGraceTime
386The server disconnects after this time if the user has not
387successfully logged in.
388If the value is 0, there is no time limit.
Damien Millerc1348632002-09-05 14:35:14 +1000389The default is 120 seconds.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000390.It Cm LogLevel
391Gives the verbosity level that is used when logging messages from
392.Nm sshd .
393The possible values are:
394QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2 and DEBUG3.
Damien Miller495dca32003-04-01 21:42:14 +1000395The default is INFO.
396DEBUG and DEBUG1 are equivalent.
397DEBUG2 and DEBUG3 each specify higher levels of debugging output.
398Logging with a DEBUG level violates the privacy of users and is not recommended.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000399.It Cm MACs
400Specifies the available MAC (message authentication code) algorithms.
401The MAC algorithm is used in protocol version 2
402for data integrity protection.
403Multiple algorithms must be comma-separated.
404The default is
405.Dq hmac-md5,hmac-sha1,hmac-ripemd160,hmac-sha1-96,hmac-md5-96 .
406.It Cm MaxStartups
407Specifies the maximum number of concurrent unauthenticated connections to the
408.Nm sshd
409daemon.
410Additional connections will be dropped until authentication succeeds or the
411.Cm LoginGraceTime
412expires for a connection.
413The default is 10.
414.Pp
415Alternatively, random early drop can be enabled by specifying
416the three colon separated values
417.Dq start:rate:full
418(e.g., "10:30:60").
419.Nm sshd
420will refuse connection attempts with a probability of
421.Dq rate/100
422(30%)
423if there are currently
424.Dq start
425(10)
426unauthenticated connections.
427The probability increases linearly and all connection attempts
428are refused if the number of unauthenticated connections reaches
429.Dq full
430(60).
431.It Cm PasswordAuthentication
432Specifies whether password authentication is allowed.
433The default is
434.Dq yes .
435.It Cm PermitEmptyPasswords
436When password authentication is allowed, it specifies whether the
437server allows login to accounts with empty password strings.
438The default is
439.Dq no .
440.It Cm PermitRootLogin
441Specifies whether root can login using
442.Xr ssh 1 .
443The argument must be
444.Dq yes ,
445.Dq without-password ,
446.Dq forced-commands-only
447or
448.Dq no .
449The default is
450.Dq yes .
451.Pp
452If this option is set to
453.Dq without-password
454password authentication is disabled for root.
455.Pp
456If this option is set to
457.Dq forced-commands-only
458root login with public key authentication will be allowed,
459but only if the
460.Ar command
461option has been specified
462(which may be useful for taking remote backups even if root login is
Damien Millerfbf486b2003-05-23 18:44:23 +1000463normally not allowed).
464All other authentication methods are disabled for root.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000465.Pp
466If this option is set to
467.Dq no
468root is not allowed to login.
Ben Lindstrom5d860f02002-08-01 01:28:38 +0000469.It Cm PermitUserEnvironment
470Specifies whether
471.Pa ~/.ssh/environment
Ben Lindstrombd9bf382002-08-20 18:54:20 +0000472and
Ben Lindstrom5d860f02002-08-01 01:28:38 +0000473.Cm environment=
474options in
475.Pa ~/.ssh/authorized_keys
Ben Lindstrombd9bf382002-08-20 18:54:20 +0000476are processed by
477.Nm sshd .
Ben Lindstrom5d860f02002-08-01 01:28:38 +0000478The default is
479.Dq no .
Ben Lindstrombd9bf382002-08-20 18:54:20 +0000480Enabling environment processing may enable users to bypass access
481restrictions in some configurations using mechanisms such as
482.Ev LD_PRELOAD .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000483.It Cm PidFile
Ben Lindstrom959de992002-06-23 00:35:25 +0000484Specifies the file that contains the process ID of the
Ben Lindstrom9f049032002-06-21 00:59:05 +0000485.Nm sshd
486daemon.
487The default is
488.Pa /var/run/sshd.pid .
489.It Cm Port
490Specifies the port number that
491.Nm sshd
492listens on.
493The default is 22.
494Multiple options of this type are permitted.
495See also
496.Cm ListenAddress .
497.It Cm PrintLastLog
498Specifies whether
499.Nm sshd
500should print the date and time when the user last logged in.
501The default is
502.Dq yes .
503.It Cm PrintMotd
504Specifies whether
505.Nm sshd
506should print
507.Pa /etc/motd
508when a user logs in interactively.
509(On some systems it is also printed by the shell,
510.Pa /etc/profile ,
511or equivalent.)
512The default is
513.Dq yes .
514.It Cm Protocol
515Specifies the protocol versions
516.Nm sshd
Ben Lindstrom9c445542002-07-11 03:59:18 +0000517supports.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000518The possible values are
519.Dq 1
520and
521.Dq 2 .
522Multiple versions must be comma-separated.
523The default is
524.Dq 2,1 .
Ben Lindstrom9c445542002-07-11 03:59:18 +0000525Note that the order of the protocol list does not indicate preference,
526because the client selects among multiple protocol versions offered
527by the server.
528Specifying
529.Dq 2,1
530is identical to
531.Dq 1,2 .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000532.It Cm PubkeyAuthentication
533Specifies whether public key authentication is allowed.
534The default is
535.Dq yes .
536Note that this option applies to protocol version 2 only.
537.It Cm RhostsAuthentication
538Specifies whether authentication using rhosts or /etc/hosts.equiv
539files is sufficient.
540Normally, this method should not be permitted because it is insecure.
541.Cm RhostsRSAAuthentication
542should be used
543instead, because it performs RSA-based host authentication in addition
544to normal rhosts or /etc/hosts.equiv authentication.
545The default is
546.Dq no .
547This option applies to protocol version 1 only.
548.It Cm RhostsRSAAuthentication
549Specifies whether rhosts or /etc/hosts.equiv authentication together
550with successful RSA host authentication is allowed.
551The default is
552.Dq no .
553This option applies to protocol version 1 only.
554.It Cm RSAAuthentication
555Specifies whether pure RSA authentication is allowed.
556The default is
557.Dq yes .
558This option applies to protocol version 1 only.
559.It Cm ServerKeyBits
560Defines the number of bits in the ephemeral protocol version 1 server key.
561The minimum value is 512, and the default is 768.
562.It Cm StrictModes
563Specifies whether
564.Nm sshd
565should check file modes and ownership of the
566user's files and home directory before accepting login.
567This is normally desirable because novices sometimes accidentally leave their
568directory or files world-writable.
569The default is
570.Dq yes .
571.It Cm Subsystem
572Configures an external subsystem (e.g., file transfer daemon).
573Arguments should be a subsystem name and a command to execute upon subsystem
574request.
575The command
576.Xr sftp-server 8
577implements the
578.Dq sftp
579file transfer subsystem.
580By default no subsystems are defined.
581Note that this option applies to protocol version 2 only.
582.It Cm SyslogFacility
583Gives the facility code that is used when logging messages from
584.Nm sshd .
585The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2,
586LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
587The default is AUTH.
588.It Cm UseLogin
589Specifies whether
590.Xr login 1
591is used for interactive login sessions.
592The default is
593.Dq no .
594Note that
595.Xr login 1
596is never used for remote command execution.
597Note also, that if this is enabled,
598.Cm X11Forwarding
599will be disabled because
600.Xr login 1
601does not know how to handle
602.Xr xauth 1
Damien Miller495dca32003-04-01 21:42:14 +1000603cookies.
604If
Ben Lindstrom9f049032002-06-21 00:59:05 +0000605.Cm UsePrivilegeSeparation
606is specified, it will be disabled after authentication.
Damien Miller2e193e22003-05-14 15:13:03 +1000607.It Cm UsePAM
608Enables PAM authentication (via challenge-response) and session set up.
609If you enable this, you should probably disable
610.Cm PasswordAuthentication .
611If you enable
612.CM UsePAM
613then you will not be able to run sshd as a non-root user.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000614.It Cm UsePrivilegeSeparation
615Specifies whether
616.Nm sshd
617separates privileges by creating an unprivileged child process
Damien Miller495dca32003-04-01 21:42:14 +1000618to deal with incoming network traffic.
619After successful authentication, another process will be created that has
620the privilege of the authenticated user.
621The goal of privilege separation is to prevent privilege
Ben Lindstrom9f049032002-06-21 00:59:05 +0000622escalation by containing any corruption within the unprivileged processes.
623The default is
624.Dq yes .
625.It Cm VerifyReverseMapping
626Specifies whether
627.Nm sshd
628should try to verify the remote host name and check that
629the resolved host name for the remote IP address maps back to the
630very same IP address.
631The default is
632.Dq no .
633.It Cm X11DisplayOffset
634Specifies the first display number available for
635.Nm sshd Ns 's
636X11 forwarding.
637This prevents
638.Nm sshd
639from interfering with real X11 servers.
640The default is 10.
641.It Cm X11Forwarding
642Specifies whether X11 forwarding is permitted.
Damien Miller101c4a72002-09-19 11:51:21 +1000643The argument must be
644.Dq yes
645or
646.Dq no .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000647The default is
648.Dq no .
Damien Miller101c4a72002-09-19 11:51:21 +1000649.Pp
650When X11 forwarding is enabled, there may be additional exposure to
651the server and to client displays if the
652.Nm sshd
653proxy display is configured to listen on the wildcard address (see
654.Cm X11UseLocalhost
655below), however this is not the default.
656Additionally, the authentication spoofing and authentication data
657verification and substitution occur on the client side.
658The security risk of using X11 forwarding is that the client's X11
659display server may be exposed to attack when the ssh client requests
660forwarding (see the warnings for
661.Cm ForwardX11
662in
663.Xr ssh_config 5 ).
664A system administrator may have a stance in which they want to
665protect clients that may expose themselves to attack by unwittingly
666requesting X11 forwarding, which can warrant a
667.Dq no
668setting.
669.Pp
670Note that disabling X11 forwarding does not prevent users from
671forwarding X11 traffic, as users can always install their own forwarders.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000672X11 forwarding is automatically disabled if
673.Cm UseLogin
674is enabled.
675.It Cm X11UseLocalhost
676Specifies whether
677.Nm sshd
678should bind the X11 forwarding server to the loopback address or to
Damien Miller495dca32003-04-01 21:42:14 +1000679the wildcard address.
680By default,
Ben Lindstrom9f049032002-06-21 00:59:05 +0000681.Nm sshd
682binds the forwarding server to the loopback address and sets the
683hostname part of the
684.Ev DISPLAY
685environment variable to
686.Dq localhost .
Ben Lindstrom15b61202002-08-20 18:44:24 +0000687This prevents remote hosts from connecting to the proxy display.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000688However, some older X11 clients may not function with this
689configuration.
690.Cm X11UseLocalhost
691may be set to
692.Dq no
693to specify that the forwarding server should be bound to the wildcard
694address.
695The argument must be
696.Dq yes
697or
698.Dq no .
699The default is
700.Dq yes .
701.It Cm XAuthLocation
Damien Miller05913ba2002-09-04 16:51:03 +1000702Specifies the full pathname of the
Ben Lindstrom9f049032002-06-21 00:59:05 +0000703.Xr xauth 1
704program.
705The default is
706.Pa /usr/X11R6/bin/xauth .
707.El
708.Ss Time Formats
709.Pp
710.Nm sshd
711command-line arguments and configuration file options that specify time
712may be expressed using a sequence of the form:
713.Sm off
Ben Lindstrom1f8cf4f2002-08-20 18:43:27 +0000714.Ar time Op Ar qualifier ,
Ben Lindstrom9f049032002-06-21 00:59:05 +0000715.Sm on
716where
717.Ar time
718is a positive integer value and
719.Ar qualifier
720is one of the following:
721.Pp
722.Bl -tag -width Ds -compact -offset indent
723.It Cm <none>
724seconds
725.It Cm s | Cm S
726seconds
727.It Cm m | Cm M
728minutes
729.It Cm h | Cm H
730hours
731.It Cm d | Cm D
732days
733.It Cm w | Cm W
734weeks
735.El
736.Pp
737Each member of the sequence is added together to calculate
738the total time value.
739.Pp
740Time format examples:
741.Pp
742.Bl -tag -width Ds -compact -offset indent
743.It 600
744600 seconds (10 minutes)
745.It 10m
74610 minutes
747.It 1h30m
7481 hour 30 minutes (90 minutes)
749.El
750.Sh FILES
751.Bl -tag -width Ds
752.It Pa /etc/ssh/sshd_config
753Contains configuration data for
754.Nm sshd .
755This file should be writable by root only, but it is recommended
756(though not necessary) that it be world-readable.
757.El
758.Sh AUTHORS
759OpenSSH is a derivative of the original and free
760ssh 1.2.12 release by Tatu Ylonen.
761Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
762Theo de Raadt and Dug Song
763removed many bugs, re-added newer features and
764created OpenSSH.
765Markus Friedl contributed the support for SSH
766protocol versions 1.5 and 2.0.
767Niels Provos and Markus Friedl contributed support
768for privilege separation.
769.Sh SEE ALSO
770.Xr sshd 8