sshd_config.0 revision 180750
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
37180750Sdes     AllowAgentForwarding
38180750Sdes             Specifies whether ssh-agent(1) forwarding is permitted.  The de-
39180750Sdes             fault is ``yes''.  Note that disabling agent forwarding does not
40180750Sdes             improve security unless users are also denied shell access, as
41180750Sdes             they can always install their own forwarders.
42180750Sdes
43180740Sdes     AllowGroups
44180740Sdes             This keyword can be followed by a list of group name patterns,
45180740Sdes             separated by spaces.  If specified, login is allowed only for
46180740Sdes             users whose primary group or supplementary group list matches one
47180740Sdes             of the patterns.  Only group names are valid; a numerical group
48180740Sdes             ID is not recognized.  By default, login is allowed for all
49180740Sdes             groups.  The allow/deny directives are processed in the following
50180740Sdes             order: DenyUsers, AllowUsers, DenyGroups, and finally
51180740Sdes             AllowGroups.
52180740Sdes
53180740Sdes             See PATTERNS in ssh_config(5) for more information on patterns.
54180740Sdes
55180740Sdes     AllowTcpForwarding
56180740Sdes             Specifies whether TCP forwarding is permitted.  The default is
57180740Sdes             ``yes''.  Note that disabling TCP forwarding does not improve se-
58180740Sdes             curity unless users are also denied shell access, as they can al-
59180740Sdes             ways install their own forwarders.
60180740Sdes
61180740Sdes     AllowUsers
62180740Sdes             This keyword can be followed by a list of user name patterns,
63180740Sdes             separated by spaces.  If specified, login is allowed only for us-
64180740Sdes             er names that match one of the patterns.  Only user names are
65180740Sdes             valid; a numerical user ID is not recognized.  By default, login
66180740Sdes             is allowed for all users.  If the pattern takes the form US-
67180740Sdes             ER@HOST then USER and HOST are separately checked, restricting
68180740Sdes             logins to particular users from particular hosts.  The allow/deny
69180740Sdes             directives are processed in the following order: DenyUsers,
70180740Sdes             AllowUsers, DenyGroups, and finally AllowGroups.
71180740Sdes
72180740Sdes             See PATTERNS in ssh_config(5) for more information on patterns.
73180740Sdes
74180740Sdes     AuthorizedKeysFile
75180740Sdes             Specifies the file that contains the public keys that can be used
76180740Sdes             for user authentication.  AuthorizedKeysFile may contain tokens
77180740Sdes             of the form %T which are substituted during connection setup.
78180740Sdes             The following tokens are defined: %% is replaced by a literal
79180740Sdes             '%', %h is replaced by the home directory of the user being au-
80180740Sdes             thenticated, and %u is replaced by the username of that user.
81180740Sdes             After expansion, AuthorizedKeysFile is taken to be an absolute
82180740Sdes             path or one relative to the user's home directory.  The default
83180740Sdes             is ``.ssh/authorized_keys''.
84180740Sdes
85180746Sdes     Banner  The contents of the specified file are sent to the remote user
86180746Sdes             before authentication is allowed.  If the argument is ``none''
87180746Sdes             then no banner is displayed.  This option is only available for
88180740Sdes             protocol version 2.  By default, no banner is displayed.
89180740Sdes
90180740Sdes     ChallengeResponseAuthentication
91180740Sdes             Specifies whether challenge-response authentication is allowed.
92180740Sdes             All authentication styles from login.conf(5) are supported.  The
93180740Sdes             default is ``yes''.
94180740Sdes
95180746Sdes     ChrootDirectory
96180746Sdes             Specifies a path to chroot(2) to after authentication.  This
97180746Sdes             path, and all its components, must be root-owned directories that
98180746Sdes             are not writable by any other user or group.
99180746Sdes
100180746Sdes             The path may contain the following tokens that are expanded at
101180746Sdes             runtime once the connecting user has been authenticated: %% is
102180746Sdes             replaced by a literal '%', %h is replaced by the home directory
103180746Sdes             of the user being authenticated, and %u is replaced by the user-
104180746Sdes             name of that user.
105180746Sdes
106180746Sdes             The ChrootDirectory must contain the necessary files and directo-
107180746Sdes             ries to support the users' session.  For an interactive session
108180746Sdes             this requires at least a shell, typically sh(1), and basic /dev
109180746Sdes             nodes such as null(4), zero(4), stdin(4), stdout(4), stderr(4),
110180746Sdes             arandom(4) and tty(4) devices.  For file transfer sessions using
111180746Sdes             ``sftp'', no additional configuration of the environment is nec-
112180746Sdes             essary if the in-process sftp server is used (see Subsystem for
113180746Sdes             details).
114180746Sdes
115180746Sdes             The default is not to chroot(2).
116180746Sdes
117180740Sdes     Ciphers
118180740Sdes             Specifies the ciphers allowed for protocol version 2.  Multiple
119180740Sdes             ciphers must be comma-separated.  The supported ciphers are
120180740Sdes             ``3des-cbc'', ``aes128-cbc'', ``aes192-cbc'', ``aes256-cbc'',
121180740Sdes             ``aes128-ctr'', ``aes192-ctr'', ``aes256-ctr'', ``arcfour128'',
122180740Sdes             ``arcfour256'', ``arcfour'', ``blowfish-cbc'', and
123180740Sdes             ``cast128-cbc''.  The default is:
124180740Sdes
125180740Sdes                aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,
126180740Sdes                arcfour256,arcfour,aes192-cbc,aes256-cbc,aes128-ctr,
127180740Sdes                aes192-ctr,aes256-ctr
128180740Sdes
129180740Sdes     ClientAliveCountMax
130180740Sdes             Sets the number of client alive messages (see below) which may be
131180740Sdes             sent without sshd(8) receiving any messages back from the client.
132180740Sdes             If this threshold is reached while client alive messages are be-
133180740Sdes             ing sent, sshd will disconnect the client, terminating the ses-
134180740Sdes             sion.  It is important to note that the use of client alive mes-
135180740Sdes             sages is very different from TCPKeepAlive (below).  The client
136180740Sdes             alive messages are sent through the encrypted channel and there-
137180740Sdes             fore will not be spoofable.  The TCP keepalive option enabled by
138180740Sdes             TCPKeepAlive is spoofable.  The client alive mechanism is valu-
139180740Sdes             able when the client or server depend on knowing when a connec-
140180740Sdes             tion has become inactive.
141180740Sdes
142180740Sdes             The default value is 3.  If ClientAliveInterval (see below) is
143180740Sdes             set to 15, and ClientAliveCountMax is left at the default, unre-
144180740Sdes             sponsive SSH clients will be disconnected after approximately 45
145180740Sdes             seconds.  This option applies to protocol version 2 only.
146180740Sdes
147180740Sdes     ClientAliveInterval
148180740Sdes             Sets a timeout interval in seconds after which if no data has
149180740Sdes             been received from the client, sshd(8) will send a message
150180740Sdes             through the encrypted channel to request a response from the
151180740Sdes             client.  The default is 0, indicating that these messages will
152180740Sdes             not be sent to the client.  This option applies to protocol ver-
153180740Sdes             sion 2 only.
154180740Sdes
155180740Sdes     Compression
156180740Sdes             Specifies whether compression is allowed, or delayed until the
157180740Sdes             user has authenticated successfully.  The argument must be
158180740Sdes             ``yes'', ``delayed'', or ``no''.  The default is ``delayed''.
159180740Sdes
160180740Sdes     DenyGroups
161180740Sdes             This keyword can be followed by a list of group name patterns,
162180740Sdes             separated by spaces.  Login is disallowed for users whose primary
163180740Sdes             group or supplementary group list matches one of the patterns.
164180740Sdes             Only group names are valid; a numerical group ID is not recog-
165180740Sdes             nized.  By default, login is allowed for all groups.  The al-
166180740Sdes             low/deny directives are processed in the following order:
167180740Sdes             DenyUsers, AllowUsers, DenyGroups, and finally AllowGroups.
168180740Sdes
169180740Sdes             See PATTERNS in ssh_config(5) for more information on patterns.
170180740Sdes
171180740Sdes     DenyUsers
172180740Sdes             This keyword can be followed by a list of user name patterns,
173180740Sdes             separated by spaces.  Login is disallowed for user names that
174180740Sdes             match one of the patterns.  Only user names are valid; a numeri-
175180740Sdes             cal user ID is not recognized.  By default, login is allowed for
176180740Sdes             all users.  If the pattern takes the form USER@HOST then USER and
177180740Sdes             HOST are separately checked, restricting logins to particular
178180740Sdes             users from particular hosts.  The allow/deny directives are pro-
179180740Sdes             cessed in the following order: DenyUsers, AllowUsers, DenyGroups,
180180740Sdes             and finally AllowGroups.
181180740Sdes
182180740Sdes             See PATTERNS in ssh_config(5) for more information on patterns.
183180740Sdes
184180740Sdes     ForceCommand
185180740Sdes             Forces the execution of the command specified by ForceCommand,
186180746Sdes             ignoring any command supplied by the client and ~/.ssh/rc if pre-
187180746Sdes             sent.  The command is invoked by using the user's login shell
188180746Sdes             with the -c option.  This applies to shell, command, or subsystem
189180746Sdes             execution.  It is most useful inside a Match block.  The command
190180746Sdes             originally supplied by the client is available in the
191180746Sdes             SSH_ORIGINAL_COMMAND environment variable.  Specifying a command
192180746Sdes             of ``internal-sftp'' will force the use of an in-process sftp
193180746Sdes             server that requires no support files when used with
194180746Sdes             ChrootDirectory.
195180740Sdes
196180740Sdes     GatewayPorts
197180740Sdes             Specifies whether remote hosts are allowed to connect to ports
198180740Sdes             forwarded for the client.  By default, sshd(8) binds remote port
199180740Sdes             forwardings to the loopback address.  This prevents other remote
200180740Sdes             hosts from connecting to forwarded ports.  GatewayPorts can be
201180740Sdes             used to specify that sshd should allow remote port forwardings to
202180740Sdes             bind to non-loopback addresses, thus allowing other hosts to con-
203180740Sdes             nect.  The argument may be ``no'' to force remote port forward-
204180740Sdes             ings to be available to the local host only, ``yes'' to force re-
205180740Sdes             mote port forwardings to bind to the wildcard address, or
206180740Sdes             ``clientspecified'' to allow the client to select the address to
207180740Sdes             which the forwarding is bound.  The default is ``no''.
208180740Sdes
209180740Sdes     GSSAPIAuthentication
210180740Sdes             Specifies whether user authentication based on GSSAPI is allowed.
211180740Sdes             The default is ``no''.  Note that this option applies to protocol
212180740Sdes             version 2 only.
213180740Sdes
214180740Sdes     GSSAPICleanupCredentials
215180740Sdes             Specifies whether to automatically destroy the user's credentials
216180740Sdes             cache on logout.  The default is ``yes''.  Note that this option
217180740Sdes             applies to protocol version 2 only.
218180740Sdes
219180740Sdes     HostbasedAuthentication
220180740Sdes             Specifies whether rhosts or /etc/hosts.equiv authentication to-
221180740Sdes             gether with successful public key client host authentication is
222180740Sdes             allowed (host-based authentication).  This option is similar to
223180740Sdes             RhostsRSAAuthentication and applies to protocol version 2 only.
224180740Sdes             The default is ``no''.
225180740Sdes
226180740Sdes     HostbasedUsesNameFromPacketOnly
227180740Sdes             Specifies whether or not the server will attempt to perform a re-
228180740Sdes             verse name lookup when matching the name in the ~/.shosts,
229180740Sdes             ~/.rhosts, and /etc/hosts.equiv files during
230180740Sdes             HostbasedAuthentication.  A setting of ``yes'' means that sshd(8)
231180740Sdes             uses the name supplied by the client rather than attempting to
232180740Sdes             resolve the name from the TCP connection itself.  The default is
233180740Sdes             ``no''.
234180740Sdes
235180740Sdes     HostKey
236180740Sdes             Specifies a file containing a private host key used by SSH.  The
237180740Sdes             default is /etc/ssh/ssh_host_key for protocol version 1, and
238180740Sdes             /etc/ssh/ssh_host_rsa_key and /etc/ssh/ssh_host_dsa_key for pro-
239180740Sdes             tocol version 2.  Note that sshd(8) will refuse to use a file if
240180740Sdes             it is group/world-accessible.  It is possible to have multiple
241180740Sdes             host key files.  ``rsa1'' keys are used for version 1 and ``dsa''
242180740Sdes             or ``rsa'' are used for version 2 of the SSH protocol.
243180740Sdes
244180740Sdes     IgnoreRhosts
245180740Sdes             Specifies that .rhosts and .shosts files will not be used in
246180740Sdes             RhostsRSAAuthentication or HostbasedAuthentication.
247180740Sdes
248180740Sdes             /etc/hosts.equiv and /etc/shosts.equiv are still used.  The de-
249180740Sdes             fault is ``yes''.
250180740Sdes
251180740Sdes     IgnoreUserKnownHosts
252180740Sdes             Specifies whether sshd(8) should ignore the user's
253180740Sdes             ~/.ssh/known_hosts during RhostsRSAAuthentication or
254180740Sdes             HostbasedAuthentication.  The default is ``no''.
255180740Sdes
256180740Sdes     KerberosAuthentication
257180740Sdes             Specifies whether the password provided by the user for
258180740Sdes             PasswordAuthentication will be validated through the Kerberos
259180740Sdes             KDC.  To use this option, the server needs a Kerberos servtab
260180740Sdes             which allows the verification of the KDC's identity.  The default
261180740Sdes             is ``no''.
262180740Sdes
263180740Sdes     KerberosGetAFSToken
264180740Sdes             If AFS is active and the user has a Kerberos 5 TGT, attempt to
265180740Sdes             acquire an AFS token before accessing the user's home directory.
266180740Sdes             The default is ``no''.
267180740Sdes
268180740Sdes     KerberosOrLocalPasswd
269180740Sdes             If password authentication through Kerberos fails then the pass-
270180740Sdes             word will be validated via any additional local mechanism such as
271180740Sdes             /etc/passwd.  The default is ``yes''.
272180740Sdes
273180740Sdes     KerberosTicketCleanup
274180740Sdes             Specifies whether to automatically destroy the user's ticket
275180740Sdes             cache file on logout.  The default is ``yes''.
276180740Sdes
277180740Sdes     KeyRegenerationInterval
278180740Sdes             In protocol version 1, the ephemeral server key is automatically
279180740Sdes             regenerated after this many seconds (if it has been used).  The
280180740Sdes             purpose of regeneration is to prevent decrypting captured ses-
281180740Sdes             sions by later breaking into the machine and stealing the keys.
282180740Sdes             The key is never stored anywhere.  If the value is 0, the key is
283180740Sdes             never regenerated.  The default is 3600 (seconds).
284180740Sdes
285180740Sdes     ListenAddress
286180740Sdes             Specifies the local addresses sshd(8) should listen on.  The fol-
287180740Sdes             lowing forms may be used:
288180740Sdes
289180740Sdes                   ListenAddress host|IPv4_addr|IPv6_addr
290180740Sdes                   ListenAddress host|IPv4_addr:port
291180740Sdes                   ListenAddress [host|IPv6_addr]:port
292180740Sdes
293180740Sdes             If port is not specified, sshd will listen on the address and all
294180740Sdes             prior Port options specified.  The default is to listen on all
295180740Sdes             local addresses.  Multiple ListenAddress options are permitted.
296180740Sdes             Additionally, any Port options must precede this option for non-
297180740Sdes             port qualified addresses.
298180740Sdes
299180740Sdes     LoginGraceTime
300180740Sdes             The server disconnects after this time if the user has not suc-
301180740Sdes             cessfully logged in.  If the value is 0, there is no time limit.
302180740Sdes             The default is 120 seconds.
303180740Sdes
304180740Sdes     LogLevel
305180740Sdes             Gives the verbosity level that is used when logging messages from
306180740Sdes             sshd(8).  The possible values are: QUIET, FATAL, ERROR, INFO,
307180740Sdes             VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3.  The default is INFO.
308180740Sdes             DEBUG and DEBUG1 are equivalent.  DEBUG2 and DEBUG3 each specify
309180740Sdes             higher levels of debugging output.  Logging with a DEBUG level
310180740Sdes             violates the privacy of users and is not recommended.
311180740Sdes
312180740Sdes     MACs    Specifies the available MAC (message authentication code) algo-
313180740Sdes             rithms.  The MAC algorithm is used in protocol version 2 for data
314180740Sdes             integrity protection.  Multiple algorithms must be comma-separat-
315180744Sdes             ed.  The default is:
316180740Sdes
317180744Sdes                   hmac-md5,hmac-sha1,umac-64@openssh.com,
318180744Sdes                   hmac-ripemd160,hmac-sha1-96,hmac-md5-96
319180744Sdes
320180740Sdes     Match   Introduces a conditional block.  If all of the criteria on the
321180740Sdes             Match line are satisfied, the keywords on the following lines
322180740Sdes             override those set in the global section of the config file, un-
323180750Sdes             til either another Match line or the end of the file.
324180750Sdes
325180750Sdes             The arguments to Match are one or more criteria-pattern pairs.
326180750Sdes             The available criteria are User, Group, Host, and Address.  The
327180750Sdes             match patterns may consist of single entries or comma-separated
328180750Sdes             lists and may use the wildcard and negation operators described
329180750Sdes             in the PATTERNS section of ssh_config(5).
330180750Sdes
331180750Sdes             The patterns in an Address criteria may additionally contain ad-
332180750Sdes             dresses to match in CIDR address/masklen format, e.g.
333180750Sdes             ``192.0.2.0/24'' or ``3ffe:ffff::/32''.  Note that the mask
334180750Sdes             length provided must be consistent with the address - it is an
335180750Sdes             error to specify a mask length that is too long for the address
336180750Sdes             or one with bits set in this host portion of the address.  For
337180750Sdes             example, ``192.0.2.0/33'' and ``192.0.2.0/8'' respectively.
338180750Sdes
339180750Sdes             Only a subset of keywords may be used on the lines following a
340180750Sdes             Match keyword.  Available keywords are AllowTcpForwarding,
341180750Sdes             Banner, ChrootDirectory, ForceCommand, GatewayPorts,
342180750Sdes             GSSAPIAuthentication, HostbasedAuthentication,
343180740Sdes             KbdInteractiveAuthentication, KerberosAuthentication,
344180750Sdes             MaxAuthTries, MaxSessions, PasswordAuthentication, PermitOpen,
345180750Sdes             PermitRootLogin, RhostsRSAAuthentication, RSAAuthentication,
346180750Sdes             X11DisplayOffset, X11Forwarding, and X11UseLocalHost.
347180740Sdes
348180740Sdes     MaxAuthTries
349180740Sdes             Specifies the maximum number of authentication attempts permitted
350180740Sdes             per connection.  Once the number of failures reaches half this
351180740Sdes             value, additional failures are logged.  The default is 6.
352180740Sdes
353180750Sdes     MaxSessions
354180750Sdes             Specifies the maximum number of open sessions permitted per net-
355180750Sdes             work connection.  The default is 10.
356180750Sdes
357180740Sdes     MaxStartups
358180740Sdes             Specifies the maximum number of concurrent unauthenticated con-
359180740Sdes             nections to the SSH daemon.  Additional connections will be
360180740Sdes             dropped until authentication succeeds or the LoginGraceTime ex-
361180740Sdes             pires for a connection.  The default is 10.
362180740Sdes
363180740Sdes             Alternatively, random early drop can be enabled by specifying the
364180740Sdes             three colon separated values ``start:rate:full'' (e.g.
365180740Sdes             "10:30:60").  sshd(8) will refuse connection attempts with a
366180740Sdes             probability of ``rate/100'' (30%) if there are currently
367180740Sdes             ``start'' (10) unauthenticated connections.  The probability in-
368180740Sdes             creases linearly and all connection attempts are refused if the
369180740Sdes             number of unauthenticated connections reaches ``full'' (60).
370180740Sdes
371180740Sdes     PasswordAuthentication
372180740Sdes             Specifies whether password authentication is allowed.  The de-
373180740Sdes             fault is ``yes''.
374180740Sdes
375180740Sdes     PermitEmptyPasswords
376180740Sdes             When password authentication is allowed, it specifies whether the
377180740Sdes             server allows login to accounts with empty password strings.  The
378180740Sdes             default is ``no''.
379180740Sdes
380180740Sdes     PermitOpen
381180740Sdes             Specifies the destinations to which TCP port forwarding is per-
382180740Sdes             mitted.  The forwarding specification must be one of the follow-
383180740Sdes             ing forms:
384180740Sdes
385180740Sdes                   PermitOpen host:port
386180740Sdes                   PermitOpen IPv4_addr:port
387180740Sdes                   PermitOpen [IPv6_addr]:port
388180740Sdes
389180740Sdes             Multiple forwards may be specified by separating them with
390180740Sdes             whitespace.  An argument of ``any'' can be used to remove all re-
391180740Sdes             strictions and permit any forwarding requests.  By default all
392180740Sdes             port forwarding requests are permitted.
393180740Sdes
394180740Sdes     PermitRootLogin
395180740Sdes             Specifies whether root can log in using ssh(1).  The argument
396180740Sdes             must be ``yes'', ``without-password'', ``forced-commands-only'',
397180740Sdes             or ``no''.  The default is ``yes''.
398180740Sdes
399180740Sdes             If this option is set to ``without-password'', password authenti-
400180740Sdes             cation is disabled for root.
401180740Sdes
402180740Sdes             If this option is set to ``forced-commands-only'', root login
403180740Sdes             with public key authentication will be allowed, but only if the
404180740Sdes             command option has been specified (which may be useful for taking
405180740Sdes             remote backups even if root login is normally not allowed).  All
406180740Sdes             other authentication methods are disabled for root.
407180740Sdes
408180740Sdes             If this option is set to ``no'', root is not allowed to log in.
409180740Sdes
410180740Sdes     PermitTunnel
411180740Sdes             Specifies whether tun(4) device forwarding is allowed.  The argu-
412180740Sdes             ment must be ``yes'', ``point-to-point'' (layer 3), ``ethernet''
413180740Sdes             (layer 2), or ``no''.  Specifying ``yes'' permits both ``point-
414180740Sdes             to-point'' and ``ethernet''.  The default is ``no''.
415180740Sdes
416180740Sdes     PermitUserEnvironment
417180740Sdes             Specifies whether ~/.ssh/environment and environment= options in
418180740Sdes             ~/.ssh/authorized_keys are processed by sshd(8).  The default is
419180740Sdes             ``no''.  Enabling environment processing may enable users to by-
420180740Sdes             pass access restrictions in some configurations using mechanisms
421180740Sdes             such as LD_PRELOAD.
422180740Sdes
423180740Sdes     PidFile
424180740Sdes             Specifies the file that contains the process ID of the SSH dae-
425180740Sdes             mon.  The default is /var/run/sshd.pid.
426180740Sdes
427180740Sdes     Port    Specifies the port number that sshd(8) listens on.  The default
428180740Sdes             is 22.  Multiple options of this type are permitted.  See also
429180740Sdes             ListenAddress.
430180740Sdes
431180740Sdes     PrintLastLog
432180740Sdes             Specifies whether sshd(8) should print the date and time of the
433180740Sdes             last user login when a user logs in interactively.  The default
434180740Sdes             is ``yes''.
435180740Sdes
436180740Sdes     PrintMotd
437180740Sdes             Specifies whether sshd(8) should print /etc/motd when a user logs
438180740Sdes             in interactively.  (On some systems it is also printed by the
439180740Sdes             shell, /etc/profile, or equivalent.)  The default is ``yes''.
440180740Sdes
441180740Sdes     Protocol
442180740Sdes             Specifies the protocol versions sshd(8) supports.  The possible
443180740Sdes             values are `1' and `2'.  Multiple versions must be comma-separat-
444180740Sdes             ed.  The default is ``2,1''.  Note that the order of the protocol
445180740Sdes             list does not indicate preference, because the client selects
446180740Sdes             among multiple protocol versions offered by the server.  Specify-
447180740Sdes             ing ``2,1'' is identical to ``1,2''.
448180740Sdes
449180740Sdes     PubkeyAuthentication
450180740Sdes             Specifies whether public key authentication is allowed.  The de-
451180740Sdes             fault is ``yes''.  Note that this option applies to protocol ver-
452180740Sdes             sion 2 only.
453180740Sdes
454180740Sdes     RhostsRSAAuthentication
455180740Sdes             Specifies whether rhosts or /etc/hosts.equiv authentication to-
456180740Sdes             gether with successful RSA host authentication is allowed.  The
457180740Sdes             default is ``no''.  This option applies to protocol version 1 on-
458180740Sdes             ly.
459180740Sdes
460180740Sdes     RSAAuthentication
461180740Sdes             Specifies whether pure RSA authentication is allowed.  The de-
462180740Sdes             fault is ``yes''.  This option applies to protocol version 1 on-
463180740Sdes             ly.
464180740Sdes
465180740Sdes     ServerKeyBits
466180740Sdes             Defines the number of bits in the ephemeral protocol version 1
467180750Sdes             server key.  The minimum value is 512, and the default is 1024.
468180740Sdes
469180740Sdes     StrictModes
470180740Sdes             Specifies whether sshd(8) should check file modes and ownership
471180740Sdes             of the user's files and home directory before accepting login.
472180740Sdes             This is normally desirable because novices sometimes accidentally
473180740Sdes             leave their directory or files world-writable.  The default is
474180740Sdes             ``yes''.
475180740Sdes
476180740Sdes     Subsystem
477180740Sdes             Configures an external subsystem (e.g. file transfer daemon).
478180740Sdes             Arguments should be a subsystem name and a command (with optional
479180746Sdes             arguments) to execute upon subsystem request.
480180746Sdes
481180746Sdes             The command sftp-server(8) implements the ``sftp'' file transfer
482180746Sdes             subsystem.
483180746Sdes
484180746Sdes             Alternately the name ``internal-sftp'' implements an in-process
485180746Sdes             ``sftp'' server.  This may simplify configurations using
486180746Sdes             ChrootDirectory to force a different filesystem root on clients.
487180746Sdes
488180740Sdes             By default no subsystems are defined.  Note that this option ap-
489180740Sdes             plies to protocol version 2 only.
490180740Sdes
491180740Sdes     SyslogFacility
492180740Sdes             Gives the facility code that is used when logging messages from
493180740Sdes             sshd(8).  The possible values are: DAEMON, USER, AUTH, LOCAL0,
494180740Sdes             LOCAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.  The de-
495180740Sdes             fault is AUTH.
496180740Sdes
497180740Sdes     TCPKeepAlive
498180740Sdes             Specifies whether the system should send TCP keepalive messages
499180740Sdes             to the other side.  If they are sent, death of the connection or
500180740Sdes             crash of one of the machines will be properly noticed.  However,
501180740Sdes             this means that connections will die if the route is down tem-
502180740Sdes             porarily, and some people find it annoying.  On the other hand,
503180740Sdes             if TCP keepalives are not sent, sessions may hang indefinitely on
504180740Sdes             the server, leaving ``ghost'' users and consuming server re-
505180740Sdes             sources.
506180740Sdes
507180740Sdes             The default is ``yes'' (to send TCP keepalive messages), and the
508180740Sdes             server will notice if the network goes down or the client host
509180740Sdes             crashes.  This avoids infinitely hanging sessions.
510180740Sdes
511180740Sdes             To disable TCP keepalive messages, the value should be set to
512180740Sdes             ``no''.
513180740Sdes
514180740Sdes     UseDNS  Specifies whether sshd(8) should look up the remote host name and
515180740Sdes             check that the resolved host name for the remote IP address maps
516180740Sdes             back to the very same IP address.  The default is ``yes''.
517180740Sdes
518180740Sdes     UseLogin
519180740Sdes             Specifies whether login(1) is used for interactive login ses-
520180740Sdes             sions.  The default is ``no''.  Note that login(1) is never used
521180740Sdes             for remote command execution.  Note also, that if this is en-
522180740Sdes             abled, X11Forwarding will be disabled because login(1) does not
523180740Sdes             know how to handle xauth(1) cookies.  If UsePrivilegeSeparation
524180740Sdes             is specified, it will be disabled after authentication.
525180740Sdes
526180740Sdes     UsePAM  Enables the Pluggable Authentication Module interface.  If set to
527180740Sdes             ``yes'' this will enable PAM authentication using
528180740Sdes             ChallengeResponseAuthentication and PasswordAuthentication in ad-
529180740Sdes             dition to PAM account and session module processing for all au-
530180740Sdes             thentication types.
531180740Sdes
532180740Sdes             Because PAM challenge-response authentication usually serves an
533180740Sdes             equivalent role to password authentication, you should disable
534180740Sdes             either PasswordAuthentication or ChallengeResponseAuthentication.
535180740Sdes
536180740Sdes             If UsePAM is enabled, you will not be able to run sshd(8) as a
537180740Sdes             non-root user.  The default is ``no''.
538180740Sdes
539180740Sdes     UsePrivilegeSeparation
540180740Sdes             Specifies whether sshd(8) separates privileges by creating an un-
541180740Sdes             privileged child process to deal with incoming network traffic.
542180740Sdes             After successful authentication, another process will be created
543180740Sdes             that has the privilege of the authenticated user.  The goal of
544180740Sdes             privilege separation is to prevent privilege escalation by con-
545180740Sdes             taining any corruption within the unprivileged processes.  The
546180740Sdes             default is ``yes''.
547180740Sdes
548180740Sdes     X11DisplayOffset
549180740Sdes             Specifies the first display number available for sshd(8)'s X11
550180740Sdes             forwarding.  This prevents sshd from interfering with real X11
551180740Sdes             servers.  The default is 10.
552180740Sdes
553180740Sdes     X11Forwarding
554180740Sdes             Specifies whether X11 forwarding is permitted.  The argument must
555180740Sdes             be ``yes'' or ``no''.  The default is ``no''.
556180740Sdes
557180740Sdes             When X11 forwarding is enabled, there may be additional exposure
558180740Sdes             to the server and to client displays if the sshd(8) proxy display
559180740Sdes             is configured to listen on the wildcard address (see
560180740Sdes             X11UseLocalhost below), though this is not the default.  Addi-
561180740Sdes             tionally, the authentication spoofing and authentication data
562180740Sdes             verification and substitution occur on the client side.  The se-
563180740Sdes             curity risk of using X11 forwarding is that the client's X11 dis-
564180740Sdes             play server may be exposed to attack when the SSH client requests
565180740Sdes             forwarding (see the warnings for ForwardX11 in ssh_config(5)).  A
566180740Sdes             system administrator may have a stance in which they want to pro-
567180740Sdes             tect clients that may expose themselves to attack by unwittingly
568180740Sdes             requesting X11 forwarding, which can warrant a ``no'' setting.
569180740Sdes
570180740Sdes             Note that disabling X11 forwarding does not prevent users from
571180740Sdes             forwarding X11 traffic, as users can always install their own
572180740Sdes             forwarders.  X11 forwarding is automatically disabled if UseLogin
573180740Sdes             is enabled.
574180740Sdes
575180740Sdes     X11UseLocalhost
576180740Sdes             Specifies whether sshd(8) should bind the X11 forwarding server
577180740Sdes             to the loopback address or to the wildcard address.  By default,
578180740Sdes             sshd binds the forwarding server to the loopback address and sets
579180740Sdes             the hostname part of the DISPLAY environment variable to
580180740Sdes             ``localhost''.  This prevents remote hosts from connecting to the
581180740Sdes             proxy display.  However, some older X11 clients may not function
582180740Sdes             with this configuration.  X11UseLocalhost may be set to ``no'' to
583180740Sdes             specify that the forwarding server should be bound to the wild-
584180740Sdes             card address.  The argument must be ``yes'' or ``no''.  The de-
585180740Sdes             fault is ``yes''.
586180740Sdes
587180740Sdes     XAuthLocation
588180740Sdes             Specifies the full pathname of the xauth(1) program.  The default
589180740Sdes             is /usr/X11R6/bin/xauth.
590180740Sdes
591180740SdesTIME FORMATS
592180740Sdes     sshd(8) command-line arguments and configuration file options that speci-
593180740Sdes     fy time may be expressed using a sequence of the form: time[qualifier],
594180740Sdes     where time is a positive integer value and qualifier is one of the fol-
595180740Sdes     lowing:
596180740Sdes
597180740Sdes           <none>  seconds
598180740Sdes           s | S   seconds
599180740Sdes           m | M   minutes
600180740Sdes           h | H   hours
601180740Sdes           d | D   days
602180740Sdes           w | W   weeks
603180740Sdes
604180740Sdes     Each member of the sequence is added together to calculate the total time
605180740Sdes     value.
606180740Sdes
607180740Sdes     Time format examples:
608180740Sdes
609180740Sdes           600     600 seconds (10 minutes)
610180740Sdes           10m     10 minutes
611180740Sdes           1h30m   1 hour 30 minutes (90 minutes)
612180740Sdes
613180740SdesFILES
614180740Sdes     /etc/ssh/sshd_config
615180740Sdes             Contains configuration data for sshd(8).  This file should be
616180740Sdes             writable by root only, but it is recommended (though not neces-
617180740Sdes             sary) that it be world-readable.
618180740Sdes
619180740SdesSEE ALSO
620180740Sdes     sshd(8)
621180740Sdes
622180740SdesAUTHORS
623180740Sdes     OpenSSH is a derivative of the original and free ssh 1.2.12 release by
624180740Sdes     Tatu Ylonen.  Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo
625180740Sdes     de Raadt and Dug Song removed many bugs, re-added newer features and cre-
626180740Sdes     ated OpenSSH.  Markus Friedl contributed the support for SSH protocol
627180740Sdes     versions 1.5 and 2.0.  Niels Provos and Markus Friedl contributed support
628180740Sdes     for privilege separation.
629180740Sdes
630180750SdesOpenBSD 4.4                      July 2, 2008                               10
631