Fixed the build error for gcc-14
[platform/upstream/openssh.git] / sshd_config.0
1 SSHD_CONFIG(5)            OpenBSD Programmer's Manual           SSHD_CONFIG(5)
2
3 NAME
4      sshd_config - OpenSSH SSH daemon configuration file
5
6 SYNOPSIS
7      /etc/ssh/sshd_config
8
9 DESCRIPTION
10      sshd(8) reads configuration data from /etc/ssh/sshd_config (or the file
11      specified with -f on the command line).  The file contains keyword-
12      argument pairs, one per line.  Lines starting with `#' and empty lines
13      are interpreted as comments.  Arguments may optionally be enclosed in
14      double quotes (") in order to represent arguments containing spaces.
15
16      The possible keywords and their meanings are as follows (note that
17      keywords are case-insensitive and arguments are case-sensitive):
18
19      AcceptEnv
20              Specifies what environment variables sent by the client will be
21              copied into the session's environ(7).  See SendEnv in
22              ssh_config(5) for how to configure the client.  Note that
23              environment passing is only supported for protocol 2.  Variables
24              are specified by name, which may contain the wildcard characters
25              `*' and `?'.  Multiple environment variables may be separated by
26              whitespace or spread across multiple AcceptEnv directives.  Be
27              warned that some environment variables could be used to bypass
28              restricted user environments.  For this reason, care should be
29              taken in the use of this directive.  The default is not to accept
30              any environment variables.
31
32      AddressFamily
33              Specifies which address family should be used by sshd(8).  Valid
34              arguments are ``any'', ``inet'' (use IPv4 only), or ``inet6''
35              (use IPv6 only).  The default is ``any''.
36
37      AllowAgentForwarding
38              Specifies whether ssh-agent(1) forwarding is permitted.  The
39              default is ``yes''.  Note that disabling agent forwarding does
40              not improve security unless users are also denied shell access,
41              as they can always install their own forwarders.
42
43      AllowGroups
44              This keyword can be followed by a list of group name patterns,
45              separated by spaces.  If specified, login is allowed only for
46              users whose primary group or supplementary group list matches one
47              of the patterns.  Only group names are valid; a numerical group
48              ID is not recognized.  By default, login is allowed for all
49              groups.  The allow/deny directives are processed in the following
50              order: DenyUsers, AllowUsers, DenyGroups, and finally
51              AllowGroups.
52
53              See PATTERNS in ssh_config(5) for more information on patterns.
54
55      AllowTcpForwarding
56              Specifies whether TCP forwarding is permitted.  The available
57              options are ``yes'' or ``all'' to allow TCP forwarding, ``no'' to
58              prevent all TCP forwarding, ``local'' to allow local (from the
59              perspective of ssh(1)) forwarding only or ``remote'' to allow
60              remote forwarding only.  The default is ``yes''.  Note that
61              disabling TCP forwarding does not improve security unless users
62              are also denied shell access, as they can always install their
63              own forwarders.
64
65      AllowUsers
66              This keyword can be followed by a list of user name patterns,
67              separated by spaces.  If specified, login is allowed only for
68              user names that match one of the patterns.  Only user names are
69              valid; a numerical user ID is not recognized.  By default, login
70              is allowed for all users.  If the pattern takes the form
71              USER@HOST then USER and HOST are separately checked, restricting
72              logins to particular users from particular hosts.  The allow/deny
73              directives are processed in the following order: DenyUsers,
74              AllowUsers, DenyGroups, and finally AllowGroups.
75
76              See PATTERNS in ssh_config(5) for more information on patterns.
77
78      AuthenticationMethods
79              Specifies the authentication methods that must be successfully
80              completed for a user to be granted access.  This option must be
81              followed by one or more comma-separated lists of authentication
82              method names.  Successful authentication requires completion of
83              every method in at least one of these lists.
84
85              For example, an argument of ``publickey,password
86              publickey,keyboard-interactive'' would require the user to
87              complete public key authentication, followed by either password
88              or keyboard interactive authentication.  Only methods that are
89              next in one or more lists are offered at each stage, so for this
90              example, it would not be possible to attempt password or
91              keyboard-interactive authentication before public key.
92
93              For keyboard interactive authentication it is also possible to
94              restrict authentication to a specific device by appending a colon
95              followed by the device identifier ``bsdauth'', ``pam'', or
96              ``skey'', depending on the server configuration.  For example,
97              ``keyboard-interactive:bsdauth'' would restrict keyboard
98              interactive authentication to the ``bsdauth'' device.
99
100              This option is only available for SSH protocol 2 and will yield a
101              fatal error if enabled if protocol 1 is also enabled.  Note that
102              each authentication method listed should also be explicitly
103              enabled in the configuration.  The default is not to require
104              multiple authentication; successful completion of a single
105              authentication method is sufficient.
106
107      AuthorizedKeysCommand
108              Specifies a program to be used to look up the user's public keys.
109              The program must be owned by root and not writable by group or
110              others.  It will be invoked with a single argument of the
111              username being authenticated, and should produce on standard
112              output zero or more lines of authorized_keys output (see
113              AUTHORIZED_KEYS in sshd(8)).  If a key supplied by
114              AuthorizedKeysCommand does not successfully authenticate and
115              authorize the user then public key authentication continues using
116              the usual AuthorizedKeysFile files.  By default, no
117              AuthorizedKeysCommand is run.
118
119      AuthorizedKeysCommandUser
120              Specifies the user under whose account the AuthorizedKeysCommand
121              is run.  It is recommended to use a dedicated user that has no
122              other role on the host than running authorized keys commands.
123
124      AuthorizedKeysFile
125              Specifies the file that contains the public keys that can be used
126              for user authentication.  The format is described in the
127              AUTHORIZED_KEYS FILE FORMAT section of sshd(8).
128              AuthorizedKeysFile may contain tokens of the form %T which are
129              substituted during connection setup.  The following tokens are
130              defined: %% is replaced by a literal '%', %h is replaced by the
131              home directory of the user being authenticated, and %u is
132              replaced by the username of that user.  After expansion,
133              AuthorizedKeysFile is taken to be an absolute path or one
134              relative to the user's home directory.  Multiple files may be
135              listed, separated by whitespace.  The default is
136              ``.ssh/authorized_keys .ssh/authorized_keys2''.
137
138      AuthorizedPrincipalsFile
139              Specifies a file that lists principal names that are accepted for
140              certificate authentication.  When using certificates signed by a
141              key listed in TrustedUserCAKeys, this file lists names, one of
142              which must appear in the certificate for it to be accepted for
143              authentication.  Names are listed one per line preceded by key
144              options (as described in AUTHORIZED_KEYS FILE FORMAT in sshd(8)).
145              Empty lines and comments starting with `#' are ignored.
146
147              AuthorizedPrincipalsFile may contain tokens of the form %T which
148              are substituted during connection setup.  The following tokens
149              are defined: %% is replaced by a literal '%', %h is replaced by
150              the home directory of the user being authenticated, and %u is
151              replaced by the username of that user.  After expansion,
152              AuthorizedPrincipalsFile is taken to be an absolute path or one
153              relative to the user's home directory.
154
155              The default is ``none'', i.e. not to use a principals file - in
156              this case, the username of the user must appear in a
157              certificate's principals list for it to be accepted.  Note that
158              AuthorizedPrincipalsFile is only used when authentication
159              proceeds using a CA listed in TrustedUserCAKeys and is not
160              consulted for certification authorities trusted via
161              ~/.ssh/authorized_keys, though the principals= key option offers
162              a similar facility (see sshd(8) for details).
163
164      Banner  The contents of the specified file are sent to the remote user
165              before authentication is allowed.  If the argument is ``none''
166              then no banner is displayed.  This option is only available for
167              protocol version 2.  By default, no banner is displayed.
168
169      ChallengeResponseAuthentication
170              Specifies whether challenge-response authentication is allowed
171              (e.g. via PAM or though authentication styles supported in
172              login.conf(5)) The default is ``yes''.
173
174      ChrootDirectory
175              Specifies the pathname of a directory to chroot(2) to after
176              authentication.  All components of the pathname must be root-
177              owned directories that are not writable by any other user or
178              group.  After the chroot, sshd(8) changes the working directory
179              to the user's home directory.
180
181              The pathname may contain the following tokens that are expanded
182              at runtime once the connecting user has been authenticated: %% is
183              replaced by a literal '%', %h is replaced by the home directory
184              of the user being authenticated, and %u is replaced by the
185              username of that user.
186
187              The ChrootDirectory must contain the necessary files and
188              directories to support the user's session.  For an interactive
189              session this requires at least a shell, typically sh(1), and
190              basic /dev nodes such as null(4), zero(4), stdin(4), stdout(4),
191              stderr(4), arandom(4) and tty(4) devices.  For file transfer
192              sessions using ``sftp'', no additional configuration of the
193              environment is necessary if the in-process sftp server is used,
194              though sessions which use logging do require /dev/log inside the
195              chroot directory (see sftp-server(8) for details).
196
197              In the special case when only sftp is used, not ssh nor scp, it
198              is possible to use ChrootDirectory %h or ChrootDirectory
199              /some/path/%u. The file system containing this directory must be
200              mounted with options nodev and either nosuid or noexec. The owner
201              of the directory should be the user. The ownership of the other
202              components of the path must fulfill the usual conditions. No adi-
203              tional files are required to be present in the directory.
204
205              The default is not to chroot(2).
206
207      Ciphers
208              Specifies the ciphers allowed for protocol version 2.  Multiple
209              ciphers must be comma-separated.  The supported ciphers are:
210
211              ``3des-cbc'', ``aes128-cbc'', ``aes192-cbc'', ``aes256-cbc'',
212              ``aes128-ctr'', ``aes192-ctr'', ``aes256-ctr'',
213              ``aes128-gcm@openssh.com'', ``aes256-gcm@openssh.com'',
214              ``arcfour128'', ``arcfour256'', ``arcfour'', ``blowfish-cbc'',
215              ``cast128-cbc'', and ``chacha20-poly1305@openssh.com''.
216
217              The default is:
218
219                 aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,
220                 aes128-gcm@openssh.com,aes256-gcm@openssh.com,
221                 chacha20-poly1305@openssh.com,
222                 aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,
223                 aes256-cbc,arcfour
224
225              The list of available ciphers may also be obtained using the -Q
226              option of ssh(1).
227
228      ClientAliveCountMax
229              Sets the number of client alive messages (see below) which may be
230              sent without sshd(8) receiving any messages back from the client.
231              If this threshold is reached while client alive messages are
232              being sent, sshd will disconnect the client, terminating the
233              session.  It is important to note that the use of client alive
234              messages is very different from TCPKeepAlive (below).  The client
235              alive messages are sent through the encrypted channel and
236              therefore will not be spoofable.  The TCP keepalive option
237              enabled by TCPKeepAlive is spoofable.  The client alive mechanism
238              is valuable when the client or server depend on knowing when a
239              connection has become inactive.
240
241              The default value is 3.  If ClientAliveInterval (see below) is
242              set to 15, and ClientAliveCountMax is left at the default,
243              unresponsive SSH clients will be disconnected after approximately
244              45 seconds.  This option applies to protocol version 2 only.
245
246      ClientAliveInterval
247              Sets a timeout interval in seconds after which if no data has
248              been received from the client, sshd(8) will send a message
249              through the encrypted channel to request a response from the
250              client.  The default is 0, indicating that these messages will
251              not be sent to the client.  This option applies to protocol
252              version 2 only.
253
254      Compression
255              Specifies whether compression is allowed, or delayed until the
256              user has authenticated successfully.  The argument must be
257              ``yes'', ``delayed'', or ``no''.  The default is ``delayed''.
258
259      DenyGroups
260              This keyword can be followed by a list of group name patterns,
261              separated by spaces.  Login is disallowed for users whose primary
262              group or supplementary group list matches one of the patterns.
263              Only group names are valid; a numerical group ID is not
264              recognized.  By default, login is allowed for all groups.  The
265              allow/deny directives are processed in the following order:
266              DenyUsers, AllowUsers, DenyGroups, and finally AllowGroups.
267
268              See PATTERNS in ssh_config(5) for more information on patterns.
269
270      DenyUsers
271              This keyword can be followed by a list of user name patterns,
272              separated by spaces.  Login is disallowed for user names that
273              match one of the patterns.  Only user names are valid; a
274              numerical user ID is not recognized.  By default, login is
275              allowed for all users.  If the pattern takes the form USER@HOST
276              then USER and HOST are separately checked, restricting logins to
277              particular users from particular hosts.  The allow/deny
278              directives are processed in the following order: DenyUsers,
279              AllowUsers, DenyGroups, and finally AllowGroups.
280
281              See PATTERNS in ssh_config(5) for more information on patterns.
282
283      ForceCommand
284              Forces the execution of the command specified by ForceCommand,
285              ignoring any command supplied by the client and ~/.ssh/rc if
286              present.  The command is invoked by using the user's login shell
287              with the -c option.  This applies to shell, command, or subsystem
288              execution.  It is most useful inside a Match block.  The command
289              originally supplied by the client is available in the
290              SSH_ORIGINAL_COMMAND environment variable.  Specifying a command
291              of ``internal-sftp'' will force the use of an in-process sftp
292              server that requires no support files when used with
293              ChrootDirectory.
294
295      GatewayPorts
296              Specifies whether remote hosts are allowed to connect to ports
297              forwarded for the client.  By default, sshd(8) binds remote port
298              forwardings to the loopback address.  This prevents other remote
299              hosts from connecting to forwarded ports.  GatewayPorts can be
300              used to specify that sshd should allow remote port forwardings to
301              bind to non-loopback addresses, thus allowing other hosts to
302              connect.  The argument may be ``no'' to force remote port
303              forwardings to be available to the local host only, ``yes'' to
304              force remote port forwardings to bind to the wildcard address, or
305              ``clientspecified'' to allow the client to select the address to
306              which the forwarding is bound.  The default is ``no''.
307
308      GSSAPIAuthentication
309              Specifies whether user authentication based on GSSAPI is allowed.
310              The default is ``no''.  Note that this option applies to protocol
311              version 2 only.
312
313      GSSAPICleanupCredentials
314              Specifies whether to automatically destroy the user's credentials
315              cache on logout.  The default is ``yes''.  Note that this option
316              applies to protocol version 2 only.
317
318      HostbasedAuthentication
319              Specifies whether rhosts or /etc/hosts.equiv authentication
320              together with successful public key client host authentication is
321              allowed (host-based authentication).  This option is similar to
322              RhostsRSAAuthentication and applies to protocol version 2 only.
323              The default is ``no''.
324
325      HostbasedUsesNameFromPacketOnly
326              Specifies whether or not the server will attempt to perform a
327              reverse name lookup when matching the name in the ~/.shosts,
328              ~/.rhosts, and /etc/hosts.equiv files during
329              HostbasedAuthentication.  A setting of ``yes'' means that sshd(8)
330              uses the name supplied by the client rather than attempting to
331              resolve the name from the TCP connection itself.  The default is
332              ``no''.
333
334      HostCertificate
335              Specifies a file containing a public host certificate.  The
336              certificate's public key must match a private host key already
337              specified by HostKey.  The default behaviour of sshd(8) is not to
338              load any certificates.
339
340      HostKey
341              Specifies a file containing a private host key used by SSH.  The
342              default is /etc/ssh/ssh_host_key for protocol version 1, and
343              /etc/ssh/ssh_host_dsa_key, /etc/ssh/ssh_host_ecdsa_key,
344              /etc/ssh/ssh_host_ed25519_key and /etc/ssh/ssh_host_rsa_key for
345              protocol version 2.  Note that sshd(8) will refuse to use a file
346              if it is group/world-accessible.  It is possible to have multiple
347              host key files.  ``rsa1'' keys are used for version 1 and
348              ``dsa'', ``ecdsa'', ``ed25519'' or ``rsa'' are used for version 2
349              of the SSH protocol.  It is also possible to specify public host
350              key files instead.  In this case operations on the private key
351              will be delegated to an ssh-agent(1).
352
353      HostKeyAgent
354              Identifies the UNIX-domain socket used to communicate with an
355              agent that has access to the private host keys.  If
356              ``SSH_AUTH_SOCK'' is specified, the location of the socket will
357              be read from the SSH_AUTH_SOCK environment variable.
358
359      IgnoreRhosts
360              Specifies that .rhosts and .shosts files will not be used in
361              RhostsRSAAuthentication or HostbasedAuthentication.
362
363              /etc/hosts.equiv and /etc/shosts.equiv are still used.  The
364              default is ``yes''.
365
366      IgnoreUserKnownHosts
367              Specifies whether sshd(8) should ignore the user's
368              ~/.ssh/known_hosts during RhostsRSAAuthentication or
369              HostbasedAuthentication.  The default is ``no''.
370
371      IPQoS   Specifies the IPv4 type-of-service or DSCP class for the
372              connection.  Accepted values are ``af11'', ``af12'', ``af13'',
373              ``af21'', ``af22'', ``af23'', ``af31'', ``af32'', ``af33'',
374              ``af41'', ``af42'', ``af43'', ``cs0'', ``cs1'', ``cs2'', ``cs3'',
375              ``cs4'', ``cs5'', ``cs6'', ``cs7'', ``ef'', ``lowdelay'',
376              ``throughput'', ``reliability'', or a numeric value.  This option
377              may take one or two arguments, separated by whitespace.  If one
378              argument is specified, it is used as the packet class
379              unconditionally.  If two values are specified, the first is
380              automatically selected for interactive sessions and the second
381              for non-interactive sessions.  The default is ``lowdelay'' for
382              interactive sessions and ``throughput'' for non-interactive
383              sessions.
384
385      KbdInteractiveAuthentication
386              Specifies whether to allow keyboard-interactive authentication.
387              The argument to this keyword must be ``yes'' or ``no''.  The
388              default is to use whatever value ChallengeResponseAuthentication
389              is set to (by default ``yes'').
390
391      KerberosAuthentication
392              Specifies whether the password provided by the user for
393              PasswordAuthentication will be validated through the Kerberos
394              KDC.  To use this option, the server needs a Kerberos servtab
395              which allows the verification of the KDC's identity.  The default
396              is ``no''.
397
398      KerberosGetAFSToken
399              If AFS is active and the user has a Kerberos 5 TGT, attempt to
400              acquire an AFS token before accessing the user's home directory.
401              The default is ``no''.
402
403      KerberosOrLocalPasswd
404              If password authentication through Kerberos fails then the
405              password will be validated via any additional local mechanism
406              such as /etc/passwd.  The default is ``yes''.
407
408      KerberosTicketCleanup
409              Specifies whether to automatically destroy the user's ticket
410              cache file on logout.  The default is ``yes''.
411
412      KexAlgorithms
413              Specifies the available KEX (Key Exchange) algorithms.  Multiple
414              algorithms must be comma-separated.  The default is
415
416                    curve25519-sha256@libssh.org,
417                    ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
418                    diffie-hellman-group-exchange-sha256,
419                    diffie-hellman-group-exchange-sha1,
420                    diffie-hellman-group14-sha1,
421                    diffie-hellman-group1-sha1
422
423      KeyRegenerationInterval
424              In protocol version 1, the ephemeral server key is automatically
425              regenerated after this many seconds (if it has been used).  The
426              purpose of regeneration is to prevent decrypting captured
427              sessions by later breaking into the machine and stealing the
428              keys.  The key is never stored anywhere.  If the value is 0, the
429              key is never regenerated.  The default is 3600 (seconds).
430
431      ListenAddress
432              Specifies the local addresses sshd(8) should listen on.  The
433              following forms may be used:
434
435                    ListenAddress host|IPv4_addr|IPv6_addr
436                    ListenAddress host|IPv4_addr:port
437                    ListenAddress [host|IPv6_addr]:port
438
439              If port is not specified, sshd will listen on the address and all
440              prior Port options specified.  The default is to listen on all
441              local addresses.  Multiple ListenAddress options are permitted.
442              Additionally, any Port options must precede this option for non-
443              port qualified addresses.
444
445      LoginGraceTime
446              The server disconnects after this time if the user has not
447              successfully logged in.  If the value is 0, there is no time
448              limit.  The default is 120 seconds.
449
450      LogLevel
451              Gives the verbosity level that is used when logging messages from
452              sshd(8).  The possible values are: QUIET, FATAL, ERROR, INFO,
453              VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3.  The default is INFO.
454              DEBUG and DEBUG1 are equivalent.  DEBUG2 and DEBUG3 each specify
455              higher levels of debugging output.  Logging with a DEBUG level
456              violates the privacy of users and is not recommended.
457
458      MACs    Specifies the available MAC (message authentication code)
459              algorithms.  The MAC algorithm is used in protocol version 2 for
460              data integrity protection.  Multiple algorithms must be comma-
461              separated.  The algorithms that contain ``-etm'' calculate the
462              MAC after encryption (encrypt-then-mac).  These are considered
463              safer and their use recommended.  The default is:
464
465                    hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,
466                    umac-64-etm@openssh.com,umac-128-etm@openssh.com,
467                    hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
468                    hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,
469                    hmac-md5-96-etm@openssh.com,
470                    hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,
471                    hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,
472                    hmac-sha1-96,hmac-md5-96
473
474      Match   Introduces a conditional block.  If all of the criteria on the
475              Match line are satisfied, the keywords on the following lines
476              override those set in the global section of the config file,
477              until either another Match line or the end of the file.  If a
478              keyword appears in multiple Match blocks that are satisified,
479              only the first instance of the keyword is applied.
480
481              The arguments to Match are one or more criteria-pattern pairs or
482              the single token All which matches all criteria.  The available
483              criteria are User, Group, Host, LocalAddress, LocalPort, and
484              Address.  The match patterns may consist of single entries or
485              comma-separated lists and may use the wildcard and negation
486              operators described in the PATTERNS section of ssh_config(5).
487
488              The patterns in an Address criteria may additionally contain
489              addresses to match in CIDR address/masklen format, e.g.
490              ``192.0.2.0/24'' or ``3ffe:ffff::/32''.  Note that the mask
491              length provided must be consistent with the address - it is an
492              error to specify a mask length that is too long for the address
493              or one with bits set in this host portion of the address.  For
494              example, ``192.0.2.0/33'' and ``192.0.2.0/8'' respectively.
495
496              Only a subset of keywords may be used on the lines following a
497              Match keyword.  Available keywords are AcceptEnv,
498              AllowAgentForwarding, AllowGroups, AllowTcpForwarding,
499              AllowUsers, AuthenticationMethods, AuthorizedKeysCommand,
500              AuthorizedKeysCommandUser, AuthorizedKeysFile,
501              AuthorizedPrincipalsFile, Banner, ChrootDirectory, DenyGroups,
502              DenyUsers, ForceCommand, GatewayPorts, GSSAPIAuthentication,
503              HostbasedAuthentication, HostbasedUsesNameFromPacketOnly,
504              KbdInteractiveAuthentication, KerberosAuthentication,
505              MaxAuthTries, MaxSessions, PasswordAuthentication,
506              PermitEmptyPasswords, PermitOpen, PermitRootLogin, PermitTTY,
507              PermitTunnel, PubkeyAuthentication, RekeyLimit,
508              RhostsRSAAuthentication, RSAAuthentication, X11DisplayOffset,
509              X11Forwarding and X11UseLocalHost.
510
511      MaxAuthTries
512              Specifies the maximum number of authentication attempts permitted
513              per connection.  Once the number of failures reaches half this
514              value, additional failures are logged.  The default is 6.
515
516      MaxSessions
517              Specifies the maximum number of open sessions permitted per
518              network connection.  The default is 10.
519
520      MaxStartups
521              Specifies the maximum number of concurrent unauthenticated
522              connections to the SSH daemon.  Additional connections will be
523              dropped until authentication succeeds or the LoginGraceTime
524              expires for a connection.  The default is 10:30:100.
525
526              Alternatively, random early drop can be enabled by specifying the
527              three colon separated values ``start:rate:full'' (e.g.
528              "10:30:60").  sshd(8) will refuse connection attempts with a
529              probability of ``rate/100'' (30%) if there are currently
530              ``start'' (10) unauthenticated connections.  The probability
531              increases linearly and all connection attempts are refused if the
532              number of unauthenticated connections reaches ``full'' (60).
533
534      PasswordAuthentication
535              Specifies whether password authentication is allowed.  The
536              default is ``yes''.
537
538      PermitEmptyPasswords
539              When password authentication is allowed, it specifies whether the
540              server allows login to accounts with empty password strings.  The
541              default is ``no''.
542
543      PermitOpen
544              Specifies the destinations to which TCP port forwarding is
545              permitted.  The forwarding specification must be one of the
546              following forms:
547
548                    PermitOpen host:port
549                    PermitOpen IPv4_addr:port
550                    PermitOpen [IPv6_addr]:port
551
552              Multiple forwards may be specified by separating them with
553              whitespace.  An argument of ``any'' can be used to remove all
554              restrictions and permit any forwarding requests.  An argument of
555              ``none'' can be used to prohibit all forwarding requests.  By
556              default all port forwarding requests are permitted.
557
558      PermitRootLogin
559              Specifies whether root can log in using ssh(1).  The argument
560              must be ``yes'', ``without-password'', ``forced-commands-only'',
561              or ``no''.  The default is ``yes''.
562
563              If this option is set to ``without-password'', password
564              authentication is disabled for root.
565
566              If this option is set to ``forced-commands-only'', root login
567              with public key authentication will be allowed, but only if the
568              command option has been specified (which may be useful for taking
569              remote backups even if root login is normally not allowed).  All
570              other authentication methods are disabled for root.
571
572              If this option is set to ``no'', root is not allowed to log in.
573
574      PermitTunnel
575              Specifies whether tun(4) device forwarding is allowed.  The
576              argument must be ``yes'', ``point-to-point'' (layer 3),
577              ``ethernet'' (layer 2), or ``no''.  Specifying ``yes'' permits
578              both ``point-to-point'' and ``ethernet''.  The default is ``no''.
579
580      PermitTTY
581              Specifies whether pty(4) allocation is permitted.  The default is
582              ``yes''.
583
584      PermitUserEnvironment
585              Specifies whether ~/.ssh/environment and environment= options in
586              ~/.ssh/authorized_keys are processed by sshd(8).  The default is
587              ``no''.  Enabling environment processing may enable users to
588              bypass access restrictions in some configurations using
589              mechanisms such as LD_PRELOAD.
590
591      PidFile
592              Specifies the file that contains the process ID of the SSH
593              daemon.  The default is /var/run/sshd.pid.
594
595      Port    Specifies the port number that sshd(8) listens on.  The default
596              is 22.  Multiple options of this type are permitted.  See also
597              ListenAddress.
598
599      PrintLastLog
600              Specifies whether sshd(8) should print the date and time of the
601              last user login when a user logs in interactively.  The default
602              is ``yes''.
603
604      PrintMotd
605              Specifies whether sshd(8) should print /etc/motd when a user logs
606              in interactively.  (On some systems it is also printed by the
607              shell, /etc/profile, or equivalent.)  The default is ``yes''.
608
609      Protocol
610              Specifies the protocol versions sshd(8) supports.  The possible
611              values are `1' and `2'.  Multiple versions must be comma-
612              separated.  The default is `2'.  Note that the order of the
613              protocol list does not indicate preference, because the client
614              selects among multiple protocol versions offered by the server.
615              Specifying ``2,1'' is identical to ``1,2''.
616
617      PubkeyAuthentication
618              Specifies whether public key authentication is allowed.  The
619              default is ``yes''.  Note that this option applies to protocol
620              version 2 only.
621
622      RekeyLimit
623              Specifies the maximum amount of data that may be transmitted
624              before the session key is renegotiated, optionally followed a
625              maximum amount of time that may pass before the session key is
626              renegotiated.  The first argument is specified in bytes and may
627              have a suffix of `K', `M', or `G' to indicate Kilobytes,
628              Megabytes, or Gigabytes, respectively.  The default is between
629              `1G' and `4G', depending on the cipher.  The optional second
630              value is specified in seconds and may use any of the units
631              documented in the TIME FORMATS section.  The default value for
632              RekeyLimit is ``default none'', which means that rekeying is
633              performed after the cipher's default amount of data has been sent
634              or received and no time based rekeying is done.  This option
635              applies to protocol version 2 only.
636
637      RevokedKeys
638              Specifies revoked public keys.  Keys listed in this file will be
639              refused for public key authentication.  Note that if this file is
640              not readable, then public key authentication will be refused for
641              all users.  Keys may be specified as a text file, listing one
642              public key per line, or as an OpenSSH Key Revocation List (KRL)
643              as generated by ssh-keygen(1).  For more information on KRLs, see
644              the KEY REVOCATION LISTS section in ssh-keygen(1).
645
646      RhostsRSAAuthentication
647              Specifies whether rhosts or /etc/hosts.equiv authentication
648              together with successful RSA host authentication is allowed.  The
649              default is ``no''.  This option applies to protocol version 1
650              only.
651
652      RSAAuthentication
653              Specifies whether pure RSA authentication is allowed.  The
654              default is ``yes''.  This option applies to protocol version 1
655              only.
656
657      ServerKeyBits
658              Defines the number of bits in the ephemeral protocol version 1
659              server key.  The minimum value is 512, and the default is 1024.
660
661      StrictModes
662              Specifies whether sshd(8) should check file modes and ownership
663              of the user's files and home directory before accepting login.
664              This is normally desirable because novices sometimes accidentally
665              leave their directory or files world-writable.  The default is
666              ``yes''.  Note that this does not apply to ChrootDirectory, whose
667              permissions and ownership are checked unconditionally.
668
669      Subsystem
670              Configures an external subsystem (e.g. file transfer daemon).
671              Arguments should be a subsystem name and a command (with optional
672              arguments) to execute upon subsystem request.
673
674              The command sftp-server(8) implements the ``sftp'' file transfer
675              subsystem.
676
677              Alternately the name ``internal-sftp'' implements an in-process
678              ``sftp'' server.  This may simplify configurations using
679              ChrootDirectory to force a different filesystem root on clients.
680
681              By default no subsystems are defined.  Note that this option
682              applies to protocol version 2 only.
683
684      SyslogFacility
685              Gives the facility code that is used when logging messages from
686              sshd(8).  The possible values are: DAEMON, USER, AUTH, LOCAL0,
687              LOCAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.  The
688              default is AUTH.
689
690      TCPKeepAlive
691              Specifies whether the system should send TCP keepalive messages
692              to the other side.  If they are sent, death of the connection or
693              crash of one of the machines will be properly noticed.  However,
694              this means that connections will die if the route is down
695              temporarily, and some people find it annoying.  On the other
696              hand, if TCP keepalives are not sent, sessions may hang
697              indefinitely on the server, leaving ``ghost'' users and consuming
698              server resources.
699
700              The default is ``yes'' (to send TCP keepalive messages), and the
701              server will notice if the network goes down or the client host
702              crashes.  This avoids infinitely hanging sessions.
703
704              To disable TCP keepalive messages, the value should be set to
705              ``no''.
706
707      TrustedUserCAKeys
708              Specifies a file containing public keys of certificate
709              authorities that are trusted to sign user certificates for
710              authentication.  Keys are listed one per line; empty lines and
711              comments starting with `#' are allowed.  If a certificate is
712              presented for authentication and has its signing CA key listed in
713              this file, then it may be used for authentication for any user
714              listed in the certificate's principals list.  Note that
715              certificates that lack a list of principals will not be permitted
716              for authentication using TrustedUserCAKeys.  For more details on
717              certificates, see the CERTIFICATES section in ssh-keygen(1).
718
719      UseDNS  Specifies whether sshd(8) should look up the remote host name and
720              check that the resolved host name for the remote IP address maps
721              back to the very same IP address.  The default is ``yes''.
722
723      UseLogin
724              Specifies whether login(1) is used for interactive login
725              sessions.  The default is ``no''.  Note that login(1) is never
726              used for remote command execution.  Note also, that if this is
727              enabled, X11Forwarding will be disabled because login(1) does not
728              know how to handle xauth(1) cookies.  If UsePrivilegeSeparation
729              is specified, it will be disabled after authentication.
730
731      UsePAM  Enables the Pluggable Authentication Module interface.  If set to
732              ``yes'' this will enable PAM authentication using
733              ChallengeResponseAuthentication and PasswordAuthentication in
734              addition to PAM account and session module processing for all
735              authentication types.
736
737              Because PAM challenge-response authentication usually serves an
738              equivalent role to password authentication, you should disable
739              either PasswordAuthentication or ChallengeResponseAuthentication.
740
741              If UsePAM is enabled, you will not be able to run sshd(8) as a
742              non-root user.  The default is ``no''.
743
744      UsePrivilegeSeparation
745              Specifies whether sshd(8) separates privileges by creating an
746              unprivileged child process to deal with incoming network traffic.
747              After successful authentication, another process will be created
748              that has the privilege of the authenticated user.  The goal of
749              privilege separation is to prevent privilege escalation by
750              containing any corruption within the unprivileged processes.  The
751              default is ``yes''.  If UsePrivilegeSeparation is set to
752              ``sandbox'' then the pre-authentication unprivileged process is
753              subject to additional restrictions.
754
755      VersionAddendum
756              Optionally specifies additional text to append to the SSH
757              protocol banner sent by the server upon connection.  The default
758              is ``none''.
759
760      X11DisplayOffset
761              Specifies the first display number available for sshd(8)'s X11
762              forwarding.  This prevents sshd from interfering with real X11
763              servers.  The default is 10.
764
765      X11Forwarding
766              Specifies whether X11 forwarding is permitted.  The argument must
767              be ``yes'' or ``no''.  The default is ``no''.
768
769              When X11 forwarding is enabled, there may be additional exposure
770              to the server and to client displays if the sshd(8) proxy display
771              is configured to listen on the wildcard address (see
772              X11UseLocalhost below), though this is not the default.
773              Additionally, the authentication spoofing and authentication data
774              verification and substitution occur on the client side.  The
775              security risk of using X11 forwarding is that the client's X11
776              display server may be exposed to attack when the SSH client
777              requests forwarding (see the warnings for ForwardX11 in
778              ssh_config(5)).  A system administrator may have a stance in
779              which they want to protect clients that may expose themselves to
780              attack by unwittingly requesting X11 forwarding, which can
781              warrant a ``no'' setting.
782
783              Note that disabling X11 forwarding does not prevent users from
784              forwarding X11 traffic, as users can always install their own
785              forwarders.  X11 forwarding is automatically disabled if UseLogin
786              is enabled.
787
788      X11UseLocalhost
789              Specifies whether sshd(8) should bind the X11 forwarding server
790              to the loopback address or to the wildcard address.  By default,
791              sshd binds the forwarding server to the loopback address and sets
792              the hostname part of the DISPLAY environment variable to
793              ``localhost''.  This prevents remote hosts from connecting to the
794              proxy display.  However, some older X11 clients may not function
795              with this configuration.  X11UseLocalhost may be set to ``no'' to
796              specify that the forwarding server should be bound to the
797              wildcard address.  The argument must be ``yes'' or ``no''.  The
798              default is ``yes''.
799
800      XAuthLocation
801              Specifies the full pathname of the xauth(1) program.  The default
802              is /usr/X11R6/bin/xauth.
803
804 TIME FORMATS
805      sshd(8) command-line arguments and configuration file options that
806      specify time may be expressed using a sequence of the form:
807      time[qualifier], where time is a positive integer value and qualifier is
808      one of the following:
809
810            <none>  seconds
811            s | S   seconds
812            m | M   minutes
813            h | H   hours
814            d | D   days
815            w | W   weeks
816
817      Each member of the sequence is added together to calculate the total time
818      value.
819
820      Time format examples:
821
822            600     600 seconds (10 minutes)
823            10m     10 minutes
824            1h30m   1 hour 30 minutes (90 minutes)
825
826 FILES
827      /etc/ssh/sshd_config
828              Contains configuration data for sshd(8).  This file should be
829              writable by root only, but it is recommended (though not
830              necessary) that it be world-readable.
831
832 SEE ALSO
833      sshd(8)
834
835 AUTHORS
836      OpenSSH is a derivative of the original and free ssh 1.2.12 release by
837      Tatu Ylonen.  Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo
838      de Raadt and Dug Song removed many bugs, re-added newer features and
839      created OpenSSH.  Markus Friedl contributed the support for SSH protocol
840      versions 1.5 and 2.0.  Niels Provos and Markus Friedl contributed support
841      for privilege separation.
842
843 OpenBSD 5.5                    February 27, 2014                   OpenBSD 5.5