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