sshd_config.0 revision 180744
1180740SdesSSHD_CONFIG(5)            OpenBSD Programmer's Manual           SSHD_CONFIG(5)
2180740Sdes
3180740SdesNAME
4180740Sdes     sshd_config - OpenSSH SSH daemon configuration file
5180740Sdes
6180740SdesSYNOPSIS
7180740Sdes     /etc/ssh/sshd_config
8180740Sdes
9180740SdesDESCRIPTION
10180740Sdes     sshd(8) reads configuration data from /etc/ssh/sshd_config (or the file
11180740Sdes     specified with -f on the command line).  The file contains keyword-argu-
12180740Sdes     ment pairs, one per line.  Lines starting with `#' and empty lines are
13180740Sdes     interpreted as comments.  Arguments may optionally be enclosed in double
14180740Sdes     quotes (") in order to represent arguments containing spaces.
15180740Sdes
16180740Sdes     The possible keywords and their meanings are as follows (note that key-
17180740Sdes     words are case-insensitive and arguments are case-sensitive):
18180740Sdes
19180740Sdes     AcceptEnv
20180740Sdes             Specifies what environment variables sent by the client will be
21180740Sdes             copied into the session's environ(7).  See SendEnv in
22180740Sdes             ssh_config(5) for how to configure the client.  Note that envi-
23180740Sdes             ronment passing is only supported for protocol 2.  Variables are
24180740Sdes             specified by name, which may contain the wildcard characters `*'
25180740Sdes             and `?'.  Multiple environment variables may be separated by
26180740Sdes             whitespace or spread across multiple AcceptEnv directives.  Be
27180740Sdes             warned that some environment variables could be used to bypass
28180740Sdes             restricted user environments.  For this reason, care should be
29180740Sdes             taken in the use of this directive.  The default is not to accept
30180740Sdes             any environment variables.
31180740Sdes
32180740Sdes     AddressFamily
33180740Sdes             Specifies which address family should be used by sshd(8).  Valid
34180740Sdes             arguments are ``any'', ``inet'' (use IPv4 only), or ``inet6''
35180740Sdes             (use IPv6 only).  The default is ``any''.
36180740Sdes
37180740Sdes     AllowGroups
38180740Sdes             This keyword can be followed by a list of group name patterns,
39180740Sdes             separated by spaces.  If specified, login is allowed only for
40180740Sdes             users whose primary group or supplementary group list matches one
41180740Sdes             of the patterns.  Only group names are valid; a numerical group
42180740Sdes             ID is not recognized.  By default, login is allowed for all
43180740Sdes             groups.  The allow/deny directives are processed in the following
44180740Sdes             order: DenyUsers, AllowUsers, DenyGroups, and finally
45180740Sdes             AllowGroups.
46180740Sdes
47180740Sdes             See PATTERNS in ssh_config(5) for more information on patterns.
48180740Sdes
49180740Sdes     AllowTcpForwarding
50180740Sdes             Specifies whether TCP forwarding is permitted.  The default is
51180740Sdes             ``yes''.  Note that disabling TCP forwarding does not improve se-
52180740Sdes             curity unless users are also denied shell access, as they can al-
53180740Sdes             ways install their own forwarders.
54180740Sdes
55180740Sdes     AllowUsers
56180740Sdes             This keyword can be followed by a list of user name patterns,
57180740Sdes             separated by spaces.  If specified, login is allowed only for us-
58180740Sdes             er names that match one of the patterns.  Only user names are
59180740Sdes             valid; a numerical user ID is not recognized.  By default, login
60180740Sdes             is allowed for all users.  If the pattern takes the form US-
61180740Sdes             ER@HOST then USER and HOST are separately checked, restricting
62180740Sdes             logins to particular users from particular hosts.  The allow/deny
63180740Sdes             directives are processed in the following order: DenyUsers,
64180740Sdes             AllowUsers, DenyGroups, and finally AllowGroups.
65180740Sdes
66180740Sdes             See PATTERNS in ssh_config(5) for more information on patterns.
67180740Sdes
68180740Sdes     AuthorizedKeysFile
69180740Sdes             Specifies the file that contains the public keys that can be used
70180740Sdes             for user authentication.  AuthorizedKeysFile may contain tokens
71180740Sdes             of the form %T which are substituted during connection setup.
72180740Sdes             The following tokens are defined: %% is replaced by a literal
73180740Sdes             '%', %h is replaced by the home directory of the user being au-
74180740Sdes             thenticated, and %u is replaced by the username of that user.
75180740Sdes             After expansion, AuthorizedKeysFile is taken to be an absolute
76180740Sdes             path or one relative to the user's home directory.  The default
77180740Sdes             is ``.ssh/authorized_keys''.
78180740Sdes
79180740Sdes     Banner  In some jurisdictions, sending a warning message before authenti-
80180740Sdes             cation may be relevant for getting legal protection.  The con-
81180740Sdes             tents of the specified file are sent to the remote user before
82180740Sdes             authentication is allowed.  This option is only available for
83180740Sdes             protocol version 2.  By default, no banner is displayed.
84180740Sdes
85180740Sdes     ChallengeResponseAuthentication
86180740Sdes             Specifies whether challenge-response authentication is allowed.
87180740Sdes             All authentication styles from login.conf(5) are supported.  The
88180740Sdes             default is ``yes''.
89180740Sdes
90180740Sdes     Ciphers
91180740Sdes             Specifies the ciphers allowed for protocol version 2.  Multiple
92180740Sdes             ciphers must be comma-separated.  The supported ciphers are
93180740Sdes             ``3des-cbc'', ``aes128-cbc'', ``aes192-cbc'', ``aes256-cbc'',
94180740Sdes             ``aes128-ctr'', ``aes192-ctr'', ``aes256-ctr'', ``arcfour128'',
95180740Sdes             ``arcfour256'', ``arcfour'', ``blowfish-cbc'', and
96180740Sdes             ``cast128-cbc''.  The default is:
97180740Sdes
98180740Sdes                aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,
99180740Sdes                arcfour256,arcfour,aes192-cbc,aes256-cbc,aes128-ctr,
100180740Sdes                aes192-ctr,aes256-ctr
101180740Sdes
102180740Sdes     ClientAliveCountMax
103180740Sdes             Sets the number of client alive messages (see below) which may be
104180740Sdes             sent without sshd(8) receiving any messages back from the client.
105180740Sdes             If this threshold is reached while client alive messages are be-
106180740Sdes             ing sent, sshd will disconnect the client, terminating the ses-
107180740Sdes             sion.  It is important to note that the use of client alive mes-
108180740Sdes             sages is very different from TCPKeepAlive (below).  The client
109180740Sdes             alive messages are sent through the encrypted channel and there-
110180740Sdes             fore will not be spoofable.  The TCP keepalive option enabled by
111180740Sdes             TCPKeepAlive is spoofable.  The client alive mechanism is valu-
112180740Sdes             able when the client or server depend on knowing when a connec-
113180740Sdes             tion has become inactive.
114180740Sdes
115180740Sdes             The default value is 3.  If ClientAliveInterval (see below) is
116180740Sdes             set to 15, and ClientAliveCountMax is left at the default, unre-
117180740Sdes             sponsive SSH clients will be disconnected after approximately 45
118180740Sdes             seconds.  This option applies to protocol version 2 only.
119180740Sdes
120180740Sdes     ClientAliveInterval
121180740Sdes             Sets a timeout interval in seconds after which if no data has
122180740Sdes             been received from the client, sshd(8) will send a message
123180740Sdes             through the encrypted channel to request a response from the
124180740Sdes             client.  The default is 0, indicating that these messages will
125180740Sdes             not be sent to the client.  This option applies to protocol ver-
126180740Sdes             sion 2 only.
127180740Sdes
128180740Sdes     Compression
129180740Sdes             Specifies whether compression is allowed, or delayed until the
130180740Sdes             user has authenticated successfully.  The argument must be
131180740Sdes             ``yes'', ``delayed'', or ``no''.  The default is ``delayed''.
132180740Sdes
133180740Sdes     DenyGroups
134180740Sdes             This keyword can be followed by a list of group name patterns,
135180740Sdes             separated by spaces.  Login is disallowed for users whose primary
136180740Sdes             group or supplementary group list matches one of the patterns.
137180740Sdes             Only group names are valid; a numerical group ID is not recog-
138180740Sdes             nized.  By default, login is allowed for all groups.  The al-
139180740Sdes             low/deny directives are processed in the following order:
140180740Sdes             DenyUsers, AllowUsers, DenyGroups, and finally AllowGroups.
141180740Sdes
142180740Sdes             See PATTERNS in ssh_config(5) for more information on patterns.
143180740Sdes
144180740Sdes     DenyUsers
145180740Sdes             This keyword can be followed by a list of user name patterns,
146180740Sdes             separated by spaces.  Login is disallowed for user names that
147180740Sdes             match one of the patterns.  Only user names are valid; a numeri-
148180740Sdes             cal user ID is not recognized.  By default, login is allowed for
149180740Sdes             all users.  If the pattern takes the form USER@HOST then USER and
150180740Sdes             HOST are separately checked, restricting logins to particular
151180740Sdes             users from particular hosts.  The allow/deny directives are pro-
152180740Sdes             cessed in the following order: DenyUsers, AllowUsers, DenyGroups,
153180740Sdes             and finally AllowGroups.
154180740Sdes
155180740Sdes             See PATTERNS in ssh_config(5) for more information on patterns.
156180740Sdes
157180740Sdes     ForceCommand
158180740Sdes             Forces the execution of the command specified by ForceCommand,
159180740Sdes             ignoring any command supplied by the client.  The command is in-
160180740Sdes             voked by using the user's login shell with the -c option.  This
161180740Sdes             applies to shell, command, or subsystem execution.  It is most
162180740Sdes             useful inside a Match block.  The command originally supplied by
163180740Sdes             the client is available in the SSH_ORIGINAL_COMMAND environment
164180740Sdes             variable.
165180740Sdes
166180740Sdes     GatewayPorts
167180740Sdes             Specifies whether remote hosts are allowed to connect to ports
168180740Sdes             forwarded for the client.  By default, sshd(8) binds remote port
169180740Sdes             forwardings to the loopback address.  This prevents other remote
170180740Sdes             hosts from connecting to forwarded ports.  GatewayPorts can be
171180740Sdes             used to specify that sshd should allow remote port forwardings to
172180740Sdes             bind to non-loopback addresses, thus allowing other hosts to con-
173180740Sdes             nect.  The argument may be ``no'' to force remote port forward-
174180740Sdes             ings to be available to the local host only, ``yes'' to force re-
175180740Sdes             mote port forwardings to bind to the wildcard address, or
176180740Sdes             ``clientspecified'' to allow the client to select the address to
177180740Sdes             which the forwarding is bound.  The default is ``no''.
178180740Sdes
179180740Sdes     GSSAPIAuthentication
180180740Sdes             Specifies whether user authentication based on GSSAPI is allowed.
181180740Sdes             The default is ``no''.  Note that this option applies to protocol
182180740Sdes             version 2 only.
183180740Sdes
184180740Sdes     GSSAPICleanupCredentials
185180740Sdes             Specifies whether to automatically destroy the user's credentials
186180740Sdes             cache on logout.  The default is ``yes''.  Note that this option
187180740Sdes             applies to protocol version 2 only.
188180740Sdes
189180740Sdes     HostbasedAuthentication
190180740Sdes             Specifies whether rhosts or /etc/hosts.equiv authentication to-
191180740Sdes             gether with successful public key client host authentication is
192180740Sdes             allowed (host-based authentication).  This option is similar to
193180740Sdes             RhostsRSAAuthentication and applies to protocol version 2 only.
194180740Sdes             The default is ``no''.
195180740Sdes
196180740Sdes     HostbasedUsesNameFromPacketOnly
197180740Sdes             Specifies whether or not the server will attempt to perform a re-
198180740Sdes             verse name lookup when matching the name in the ~/.shosts,
199180740Sdes             ~/.rhosts, and /etc/hosts.equiv files during
200180740Sdes             HostbasedAuthentication.  A setting of ``yes'' means that sshd(8)
201180740Sdes             uses the name supplied by the client rather than attempting to
202180740Sdes             resolve the name from the TCP connection itself.  The default is
203180740Sdes             ``no''.
204180740Sdes
205180740Sdes     HostKey
206180740Sdes             Specifies a file containing a private host key used by SSH.  The
207180740Sdes             default is /etc/ssh/ssh_host_key for protocol version 1, and
208180740Sdes             /etc/ssh/ssh_host_rsa_key and /etc/ssh/ssh_host_dsa_key for pro-
209180740Sdes             tocol version 2.  Note that sshd(8) will refuse to use a file if
210180740Sdes             it is group/world-accessible.  It is possible to have multiple
211180740Sdes             host key files.  ``rsa1'' keys are used for version 1 and ``dsa''
212180740Sdes             or ``rsa'' are used for version 2 of the SSH protocol.
213180740Sdes
214180740Sdes     IgnoreRhosts
215180740Sdes             Specifies that .rhosts and .shosts files will not be used in
216180740Sdes             RhostsRSAAuthentication or HostbasedAuthentication.
217180740Sdes
218180740Sdes             /etc/hosts.equiv and /etc/shosts.equiv are still used.  The de-
219180740Sdes             fault is ``yes''.
220180740Sdes
221180740Sdes     IgnoreUserKnownHosts
222180740Sdes             Specifies whether sshd(8) should ignore the user's
223180740Sdes             ~/.ssh/known_hosts during RhostsRSAAuthentication or
224180740Sdes             HostbasedAuthentication.  The default is ``no''.
225180740Sdes
226180740Sdes     KerberosAuthentication
227180740Sdes             Specifies whether the password provided by the user for
228180740Sdes             PasswordAuthentication will be validated through the Kerberos
229180740Sdes             KDC.  To use this option, the server needs a Kerberos servtab
230180740Sdes             which allows the verification of the KDC's identity.  The default
231180740Sdes             is ``no''.
232180740Sdes
233180740Sdes     KerberosGetAFSToken
234180740Sdes             If AFS is active and the user has a Kerberos 5 TGT, attempt to
235180740Sdes             acquire an AFS token before accessing the user's home directory.
236180740Sdes             The default is ``no''.
237180740Sdes
238180740Sdes     KerberosOrLocalPasswd
239180740Sdes             If password authentication through Kerberos fails then the pass-
240180740Sdes             word will be validated via any additional local mechanism such as
241180740Sdes             /etc/passwd.  The default is ``yes''.
242180740Sdes
243180740Sdes     KerberosTicketCleanup
244180740Sdes             Specifies whether to automatically destroy the user's ticket
245180740Sdes             cache file on logout.  The default is ``yes''.
246180740Sdes
247180740Sdes     KeyRegenerationInterval
248180740Sdes             In protocol version 1, the ephemeral server key is automatically
249180740Sdes             regenerated after this many seconds (if it has been used).  The
250180740Sdes             purpose of regeneration is to prevent decrypting captured ses-
251180740Sdes             sions by later breaking into the machine and stealing the keys.
252180740Sdes             The key is never stored anywhere.  If the value is 0, the key is
253180740Sdes             never regenerated.  The default is 3600 (seconds).
254180740Sdes
255180740Sdes     ListenAddress
256180740Sdes             Specifies the local addresses sshd(8) should listen on.  The fol-
257180740Sdes             lowing forms may be used:
258180740Sdes
259180740Sdes                   ListenAddress host|IPv4_addr|IPv6_addr
260180740Sdes                   ListenAddress host|IPv4_addr:port
261180740Sdes                   ListenAddress [host|IPv6_addr]:port
262180740Sdes
263180740Sdes             If port is not specified, sshd will listen on the address and all
264180740Sdes             prior Port options specified.  The default is to listen on all
265180740Sdes             local addresses.  Multiple ListenAddress options are permitted.
266180740Sdes             Additionally, any Port options must precede this option for non-
267180740Sdes             port qualified addresses.
268180740Sdes
269180740Sdes     LoginGraceTime
270180740Sdes             The server disconnects after this time if the user has not suc-
271180740Sdes             cessfully logged in.  If the value is 0, there is no time limit.
272180740Sdes             The default is 120 seconds.
273180740Sdes
274180740Sdes     LogLevel
275180740Sdes             Gives the verbosity level that is used when logging messages from
276180740Sdes             sshd(8).  The possible values are: QUIET, FATAL, ERROR, INFO,
277180740Sdes             VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3.  The default is INFO.
278180740Sdes             DEBUG and DEBUG1 are equivalent.  DEBUG2 and DEBUG3 each specify
279180740Sdes             higher levels of debugging output.  Logging with a DEBUG level
280180740Sdes             violates the privacy of users and is not recommended.
281180740Sdes
282180740Sdes     MACs    Specifies the available MAC (message authentication code) algo-
283180740Sdes             rithms.  The MAC algorithm is used in protocol version 2 for data
284180740Sdes             integrity protection.  Multiple algorithms must be comma-separat-
285180744Sdes             ed.  The default is:
286180740Sdes
287180744Sdes                   hmac-md5,hmac-sha1,umac-64@openssh.com,
288180744Sdes                   hmac-ripemd160,hmac-sha1-96,hmac-md5-96
289180744Sdes
290180740Sdes     Match   Introduces a conditional block.  If all of the criteria on the
291180740Sdes             Match line are satisfied, the keywords on the following lines
292180740Sdes             override those set in the global section of the config file, un-
293180740Sdes             til either another Match line or the end of the file.  The argu-
294180740Sdes             ments to Match are one or more criteria-pattern pairs.  The
295180740Sdes             available criteria are User, Group, Host, and Address.  Only a
296180740Sdes             subset of keywords may be used on the lines following a Match
297180740Sdes             keyword.  Available keywords are AllowTcpForwarding, Banner,
298180740Sdes             ForceCommand, GatewayPorts, GSSApiAuthentication,
299180740Sdes             KbdInteractiveAuthentication, KerberosAuthentication,
300180740Sdes             PasswordAuthentication, PermitOpen, RhostsRSAAuthentication,
301180740Sdes             RSAAuthentication, X11DisplayOffset, X11Forwarding, and
302180740Sdes             X11UseLocalHost.
303180740Sdes
304180740Sdes     MaxAuthTries
305180740Sdes             Specifies the maximum number of authentication attempts permitted
306180740Sdes             per connection.  Once the number of failures reaches half this
307180740Sdes             value, additional failures are logged.  The default is 6.
308180740Sdes
309180740Sdes     MaxStartups
310180740Sdes             Specifies the maximum number of concurrent unauthenticated con-
311180740Sdes             nections to the SSH daemon.  Additional connections will be
312180740Sdes             dropped until authentication succeeds or the LoginGraceTime ex-
313180740Sdes             pires for a connection.  The default is 10.
314180740Sdes
315180740Sdes             Alternatively, random early drop can be enabled by specifying the
316180740Sdes             three colon separated values ``start:rate:full'' (e.g.
317180740Sdes             "10:30:60").  sshd(8) will refuse connection attempts with a
318180740Sdes             probability of ``rate/100'' (30%) if there are currently
319180740Sdes             ``start'' (10) unauthenticated connections.  The probability in-
320180740Sdes             creases linearly and all connection attempts are refused if the
321180740Sdes             number of unauthenticated connections reaches ``full'' (60).
322180740Sdes
323180740Sdes     PasswordAuthentication
324180740Sdes             Specifies whether password authentication is allowed.  The de-
325180740Sdes             fault is ``yes''.
326180740Sdes
327180740Sdes     PermitEmptyPasswords
328180740Sdes             When password authentication is allowed, it specifies whether the
329180740Sdes             server allows login to accounts with empty password strings.  The
330180740Sdes             default is ``no''.
331180740Sdes
332180740Sdes     PermitOpen
333180740Sdes             Specifies the destinations to which TCP port forwarding is per-
334180740Sdes             mitted.  The forwarding specification must be one of the follow-
335180740Sdes             ing forms:
336180740Sdes
337180740Sdes                   PermitOpen host:port
338180740Sdes                   PermitOpen IPv4_addr:port
339180740Sdes                   PermitOpen [IPv6_addr]:port
340180740Sdes
341180740Sdes             Multiple forwards may be specified by separating them with
342180740Sdes             whitespace.  An argument of ``any'' can be used to remove all re-
343180740Sdes             strictions and permit any forwarding requests.  By default all
344180740Sdes             port forwarding requests are permitted.
345180740Sdes
346180740Sdes     PermitRootLogin
347180740Sdes             Specifies whether root can log in using ssh(1).  The argument
348180740Sdes             must be ``yes'', ``without-password'', ``forced-commands-only'',
349180740Sdes             or ``no''.  The default is ``yes''.
350180740Sdes
351180740Sdes             If this option is set to ``without-password'', password authenti-
352180740Sdes             cation is disabled for root.
353180740Sdes
354180740Sdes             If this option is set to ``forced-commands-only'', root login
355180740Sdes             with public key authentication will be allowed, but only if the
356180740Sdes             command option has been specified (which may be useful for taking
357180740Sdes             remote backups even if root login is normally not allowed).  All
358180740Sdes             other authentication methods are disabled for root.
359180740Sdes
360180740Sdes             If this option is set to ``no'', root is not allowed to log in.
361180740Sdes
362180740Sdes     PermitTunnel
363180740Sdes             Specifies whether tun(4) device forwarding is allowed.  The argu-
364180740Sdes             ment must be ``yes'', ``point-to-point'' (layer 3), ``ethernet''
365180740Sdes             (layer 2), or ``no''.  Specifying ``yes'' permits both ``point-
366180740Sdes             to-point'' and ``ethernet''.  The default is ``no''.
367180740Sdes
368180740Sdes     PermitUserEnvironment
369180740Sdes             Specifies whether ~/.ssh/environment and environment= options in
370180740Sdes             ~/.ssh/authorized_keys are processed by sshd(8).  The default is
371180740Sdes             ``no''.  Enabling environment processing may enable users to by-
372180740Sdes             pass access restrictions in some configurations using mechanisms
373180740Sdes             such as LD_PRELOAD.
374180740Sdes
375180740Sdes     PidFile
376180740Sdes             Specifies the file that contains the process ID of the SSH dae-
377180740Sdes             mon.  The default is /var/run/sshd.pid.
378180740Sdes
379180740Sdes     Port    Specifies the port number that sshd(8) listens on.  The default
380180740Sdes             is 22.  Multiple options of this type are permitted.  See also
381180740Sdes             ListenAddress.
382180740Sdes
383180740Sdes     PrintLastLog
384180740Sdes             Specifies whether sshd(8) should print the date and time of the
385180740Sdes             last user login when a user logs in interactively.  The default
386180740Sdes             is ``yes''.
387180740Sdes
388180740Sdes     PrintMotd
389180740Sdes             Specifies whether sshd(8) should print /etc/motd when a user logs
390180740Sdes             in interactively.  (On some systems it is also printed by the
391180740Sdes             shell, /etc/profile, or equivalent.)  The default is ``yes''.
392180740Sdes
393180740Sdes     Protocol
394180740Sdes             Specifies the protocol versions sshd(8) supports.  The possible
395180740Sdes             values are `1' and `2'.  Multiple versions must be comma-separat-
396180740Sdes             ed.  The default is ``2,1''.  Note that the order of the protocol
397180740Sdes             list does not indicate preference, because the client selects
398180740Sdes             among multiple protocol versions offered by the server.  Specify-
399180740Sdes             ing ``2,1'' is identical to ``1,2''.
400180740Sdes
401180740Sdes     PubkeyAuthentication
402180740Sdes             Specifies whether public key authentication is allowed.  The de-
403180740Sdes             fault is ``yes''.  Note that this option applies to protocol ver-
404180740Sdes             sion 2 only.
405180740Sdes
406180740Sdes     RhostsRSAAuthentication
407180740Sdes             Specifies whether rhosts or /etc/hosts.equiv authentication to-
408180740Sdes             gether with successful RSA host authentication is allowed.  The
409180740Sdes             default is ``no''.  This option applies to protocol version 1 on-
410180740Sdes             ly.
411180740Sdes
412180740Sdes     RSAAuthentication
413180740Sdes             Specifies whether pure RSA authentication is allowed.  The de-
414180740Sdes             fault is ``yes''.  This option applies to protocol version 1 on-
415180740Sdes             ly.
416180740Sdes
417180740Sdes     ServerKeyBits
418180740Sdes             Defines the number of bits in the ephemeral protocol version 1
419180740Sdes             server key.  The minimum value is 512, and the default is 768.
420180740Sdes
421180740Sdes     StrictModes
422180740Sdes             Specifies whether sshd(8) should check file modes and ownership
423180740Sdes             of the user's files and home directory before accepting login.
424180740Sdes             This is normally desirable because novices sometimes accidentally
425180740Sdes             leave their directory or files world-writable.  The default is
426180740Sdes             ``yes''.
427180740Sdes
428180740Sdes     Subsystem
429180740Sdes             Configures an external subsystem (e.g. file transfer daemon).
430180740Sdes             Arguments should be a subsystem name and a command (with optional
431180740Sdes             arguments) to execute upon subsystem request.  The command
432180740Sdes             sftp-server(8) implements the ``sftp'' file transfer subsystem.
433180740Sdes             By default no subsystems are defined.  Note that this option ap-
434180740Sdes             plies to protocol version 2 only.
435180740Sdes
436180740Sdes     SyslogFacility
437180740Sdes             Gives the facility code that is used when logging messages from
438180740Sdes             sshd(8).  The possible values are: DAEMON, USER, AUTH, LOCAL0,
439180740Sdes             LOCAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.  The de-
440180740Sdes             fault is AUTH.
441180740Sdes
442180740Sdes     TCPKeepAlive
443180740Sdes             Specifies whether the system should send TCP keepalive messages
444180740Sdes             to the other side.  If they are sent, death of the connection or
445180740Sdes             crash of one of the machines will be properly noticed.  However,
446180740Sdes             this means that connections will die if the route is down tem-
447180740Sdes             porarily, and some people find it annoying.  On the other hand,
448180740Sdes             if TCP keepalives are not sent, sessions may hang indefinitely on
449180740Sdes             the server, leaving ``ghost'' users and consuming server re-
450180740Sdes             sources.
451180740Sdes
452180740Sdes             The default is ``yes'' (to send TCP keepalive messages), and the
453180740Sdes             server will notice if the network goes down or the client host
454180740Sdes             crashes.  This avoids infinitely hanging sessions.
455180740Sdes
456180740Sdes             To disable TCP keepalive messages, the value should be set to
457180740Sdes             ``no''.
458180740Sdes
459180740Sdes     UseDNS  Specifies whether sshd(8) should look up the remote host name and
460180740Sdes             check that the resolved host name for the remote IP address maps
461180740Sdes             back to the very same IP address.  The default is ``yes''.
462180740Sdes
463180740Sdes     UseLogin
464180740Sdes             Specifies whether login(1) is used for interactive login ses-
465180740Sdes             sions.  The default is ``no''.  Note that login(1) is never used
466180740Sdes             for remote command execution.  Note also, that if this is en-
467180740Sdes             abled, X11Forwarding will be disabled because login(1) does not
468180740Sdes             know how to handle xauth(1) cookies.  If UsePrivilegeSeparation
469180740Sdes             is specified, it will be disabled after authentication.
470180740Sdes
471180740Sdes     UsePAM  Enables the Pluggable Authentication Module interface.  If set to
472180740Sdes             ``yes'' this will enable PAM authentication using
473180740Sdes             ChallengeResponseAuthentication and PasswordAuthentication in ad-
474180740Sdes             dition to PAM account and session module processing for all au-
475180740Sdes             thentication types.
476180740Sdes
477180740Sdes             Because PAM challenge-response authentication usually serves an
478180740Sdes             equivalent role to password authentication, you should disable
479180740Sdes             either PasswordAuthentication or ChallengeResponseAuthentication.
480180740Sdes
481180740Sdes             If UsePAM is enabled, you will not be able to run sshd(8) as a
482180740Sdes             non-root user.  The default is ``no''.
483180740Sdes
484180740Sdes     UsePrivilegeSeparation
485180740Sdes             Specifies whether sshd(8) separates privileges by creating an un-
486180740Sdes             privileged child process to deal with incoming network traffic.
487180740Sdes             After successful authentication, another process will be created
488180740Sdes             that has the privilege of the authenticated user.  The goal of
489180740Sdes             privilege separation is to prevent privilege escalation by con-
490180740Sdes             taining any corruption within the unprivileged processes.  The
491180740Sdes             default is ``yes''.
492180740Sdes
493180740Sdes     X11DisplayOffset
494180740Sdes             Specifies the first display number available for sshd(8)'s X11
495180740Sdes             forwarding.  This prevents sshd from interfering with real X11
496180740Sdes             servers.  The default is 10.
497180740Sdes
498180740Sdes     X11Forwarding
499180740Sdes             Specifies whether X11 forwarding is permitted.  The argument must
500180740Sdes             be ``yes'' or ``no''.  The default is ``no''.
501180740Sdes
502180740Sdes             When X11 forwarding is enabled, there may be additional exposure
503180740Sdes             to the server and to client displays if the sshd(8) proxy display
504180740Sdes             is configured to listen on the wildcard address (see
505180740Sdes             X11UseLocalhost below), though this is not the default.  Addi-
506180740Sdes             tionally, the authentication spoofing and authentication data
507180740Sdes             verification and substitution occur on the client side.  The se-
508180740Sdes             curity risk of using X11 forwarding is that the client's X11 dis-
509180740Sdes             play server may be exposed to attack when the SSH client requests
510180740Sdes             forwarding (see the warnings for ForwardX11 in ssh_config(5)).  A
511180740Sdes             system administrator may have a stance in which they want to pro-
512180740Sdes             tect clients that may expose themselves to attack by unwittingly
513180740Sdes             requesting X11 forwarding, which can warrant a ``no'' setting.
514180740Sdes
515180740Sdes             Note that disabling X11 forwarding does not prevent users from
516180740Sdes             forwarding X11 traffic, as users can always install their own
517180740Sdes             forwarders.  X11 forwarding is automatically disabled if UseLogin
518180740Sdes             is enabled.
519180740Sdes
520180740Sdes     X11UseLocalhost
521180740Sdes             Specifies whether sshd(8) should bind the X11 forwarding server
522180740Sdes             to the loopback address or to the wildcard address.  By default,
523180740Sdes             sshd binds the forwarding server to the loopback address and sets
524180740Sdes             the hostname part of the DISPLAY environment variable to
525180740Sdes             ``localhost''.  This prevents remote hosts from connecting to the
526180740Sdes             proxy display.  However, some older X11 clients may not function
527180740Sdes             with this configuration.  X11UseLocalhost may be set to ``no'' to
528180740Sdes             specify that the forwarding server should be bound to the wild-
529180740Sdes             card address.  The argument must be ``yes'' or ``no''.  The de-
530180740Sdes             fault is ``yes''.
531180740Sdes
532180740Sdes     XAuthLocation
533180740Sdes             Specifies the full pathname of the xauth(1) program.  The default
534180740Sdes             is /usr/X11R6/bin/xauth.
535180740Sdes
536180740SdesTIME FORMATS
537180740Sdes     sshd(8) command-line arguments and configuration file options that speci-
538180740Sdes     fy time may be expressed using a sequence of the form: time[qualifier],
539180740Sdes     where time is a positive integer value and qualifier is one of the fol-
540180740Sdes     lowing:
541180740Sdes
542180740Sdes           <none>  seconds
543180740Sdes           s | S   seconds
544180740Sdes           m | M   minutes
545180740Sdes           h | H   hours
546180740Sdes           d | D   days
547180740Sdes           w | W   weeks
548180740Sdes
549180740Sdes     Each member of the sequence is added together to calculate the total time
550180740Sdes     value.
551180740Sdes
552180740Sdes     Time format examples:
553180740Sdes
554180740Sdes           600     600 seconds (10 minutes)
555180740Sdes           10m     10 minutes
556180740Sdes           1h30m   1 hour 30 minutes (90 minutes)
557180740Sdes
558180740SdesFILES
559180740Sdes     /etc/ssh/sshd_config
560180740Sdes             Contains configuration data for sshd(8).  This file should be
561180740Sdes             writable by root only, but it is recommended (though not neces-
562180740Sdes             sary) that it be world-readable.
563180740Sdes
564180740SdesSEE ALSO
565180740Sdes     sshd(8)
566180740Sdes
567180740SdesAUTHORS
568180740Sdes     OpenSSH is a derivative of the original and free ssh 1.2.12 release by
569180740Sdes     Tatu Ylonen.  Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo
570180740Sdes     de Raadt and Dug Song removed many bugs, re-added newer features and cre-
571180740Sdes     ated OpenSSH.  Markus Friedl contributed the support for SSH protocol
572180740Sdes     versions 1.5 and 2.0.  Niels Provos and Markus Friedl contributed support
573180740Sdes     for privilege separation.
574180740Sdes
575180744SdesOpenBSD 4.2                      June 11, 2007                               9
576