blob: b0160aa87fb97b3cf94e0b906098aa10cf197759 [file] [log] [blame]
Adam Langleyd0592972015-03-30 14:49:51 -07001SSHD_CONFIG(5) File Formats Manual SSHD_CONFIG(5)
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002
3NAME
Adam Langleyd0592972015-03-30 14:49:51 -07004 sshd_config M-bM-^@M-^S OpenSSH SSH daemon configuration file
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005
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-
Adam Langleyd0592972015-03-30 14:49:51 -070012 argument pairs, one per line. Lines starting with M-bM-^@M-^X#M-bM-^@M-^Y and empty lines
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013 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
Greg Hartman9768ca42017-06-22 20:49:52 -070022 ssh_config(5) for how to configure the client. The TERM
23 environment variable is always sent whenever the client requests
24 a pseudo-terminal as it is required by the protocol. Variables
25 are specified by name, which may contain the wildcard characters
26 M-bM-^@M-^X*M-bM-^@M-^Y and M-bM-^@M-^X?M-bM-^@M-^Y. Multiple environment variables may be separated by
27 whitespace or spread across multiple AcceptEnv directives. Be
28 warned that some environment variables could be used to bypass
29 restricted user environments. For this reason, care should be
30 taken in the use of this directive. The default is not to accept
31 any environment variables.
Greg Hartmanbd77cf72015-02-25 13:21:06 -080032
33 AddressFamily
34 Specifies which address family should be used by sshd(8). Valid
Greg Hartman9768ca42017-06-22 20:49:52 -070035 arguments are any (the default), inet (use IPv4 only), or inet6
36 (use IPv6 only).
Greg Hartmanbd77cf72015-02-25 13:21:06 -080037
38 AllowAgentForwarding
39 Specifies whether ssh-agent(1) forwarding is permitted. The
Greg Hartman9768ca42017-06-22 20:49:52 -070040 default is yes. Note that disabling agent forwarding does not
Adam Langleyd0592972015-03-30 14:49:51 -070041 improve security unless users are also denied shell access, as
42 they can always install their own forwarders.
Greg Hartmanbd77cf72015-02-25 13:21:06 -080043
44 AllowGroups
45 This keyword can be followed by a list of group name patterns,
46 separated by spaces. If specified, login is allowed only for
47 users whose primary group or supplementary group list matches one
48 of the patterns. Only group names are valid; a numerical group
49 ID is not recognized. By default, login is allowed for all
50 groups. The allow/deny directives are processed in the following
51 order: DenyUsers, AllowUsers, DenyGroups, and finally
52 AllowGroups.
53
54 See PATTERNS in ssh_config(5) for more information on patterns.
55
Adam Langleyd0592972015-03-30 14:49:51 -070056 AllowStreamLocalForwarding
57 Specifies whether StreamLocal (Unix-domain socket) forwarding is
Greg Hartman9768ca42017-06-22 20:49:52 -070058 permitted. The available options are yes (the default) or all to
59 allow StreamLocal forwarding, no to prevent all StreamLocal
60 forwarding, local to allow local (from the perspective of ssh(1))
61 forwarding only or remote to allow remote forwarding only. Note
62 that disabling StreamLocal forwarding does not improve security
63 unless users are also denied shell access, as they can always
64 install their own forwarders.
65
66 AllowTcpForwarding
67 Specifies whether TCP forwarding is permitted. The available
68 options are yes (the default) or all to allow TCP forwarding, no
69 to prevent all TCP forwarding, local to allow local (from the
70 perspective of ssh(1)) forwarding only or remote to allow remote
71 forwarding only. Note that disabling TCP forwarding does not
72 improve security unless users are also denied shell access, as
73 they can always install their own forwarders.
Greg Hartmanbd77cf72015-02-25 13:21:06 -080074
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
Greg Hartman9768ca42017-06-22 20:49:52 -070082 logins to particular users from particular hosts. HOST criteria
83 may additionally contain addresses to match in CIDR
84 address/masklen format. The allow/deny directives are processed
85 in the following order: DenyUsers, AllowUsers, DenyGroups, and
86 finally AllowGroups.
Greg Hartmanbd77cf72015-02-25 13:21:06 -080087
88 See PATTERNS in ssh_config(5) for more information on patterns.
89
Adam Langleyd0592972015-03-30 14:49:51 -070090 AuthenticationMethods
91 Specifies the authentication methods that must be successfully
92 completed for a user to be granted access. This option must be
93 followed by one or more comma-separated lists of authentication
Greg Hartman9768ca42017-06-22 20:49:52 -070094 method names, or by the single string any to indicate the default
95 behaviour of accepting any single authentication method. If the
96 default is overridden, then successful authentication requires
97 completion of every method in at least one of these lists.
Adam Langleyd0592972015-03-30 14:49:51 -070098
Greg Hartman9768ca42017-06-22 20:49:52 -070099 For example, "publickey,password publickey,keyboard-interactive"
100 would require the user to complete public key authentication,
101 followed by either password or keyboard interactive
102 authentication. Only methods that are next in one or more lists
103 are offered at each stage, so for this example it would not be
104 possible to attempt password or keyboard-interactive
105 authentication before public key.
Adam Langleyd0592972015-03-30 14:49:51 -0700106
107 For keyboard interactive authentication it is also possible to
108 restrict authentication to a specific device by appending a colon
Greg Hartman9768ca42017-06-22 20:49:52 -0700109 followed by the device identifier bsdauth, pam, or skey,
Adam Langleyd0592972015-03-30 14:49:51 -0700110 depending on the server configuration. For example,
Greg Hartman9768ca42017-06-22 20:49:52 -0700111 "keyboard-interactive:bsdauth" would restrict keyboard
112 interactive authentication to the bsdauth device.
Adam Langleyd0592972015-03-30 14:49:51 -0700113
Greg Hartman9768ca42017-06-22 20:49:52 -0700114 If the publickey method is listed more than once, sshd(8)
Adam Langleyd0592972015-03-30 14:49:51 -0700115 verifies that keys that have been used successfully are not
Greg Hartman9768ca42017-06-22 20:49:52 -0700116 reused for subsequent authentications. For example,
117 "publickey,publickey" requires successful authentication using
118 two different public keys.
Adam Langleyd0592972015-03-30 14:49:51 -0700119
Greg Hartman9768ca42017-06-22 20:49:52 -0700120 Note that each authentication method listed should also be
121 explicitly enabled in the configuration.
Adam Langleyd0592972015-03-30 14:49:51 -0700122
123 AuthorizedKeysCommand
124 Specifies a program to be used to look up the user's public keys.
Greg Hartmanccacbc92016-02-03 09:59:44 -0800125 The program must be owned by root, not writable by group or
Greg Hartman9768ca42017-06-22 20:49:52 -0700126 others and specified by an absolute path. Arguments to
127 AuthorizedKeysCommand accept the tokens described in the TOKENS
128 section. If no arguments are specified then the username of the
129 target user is used.
Greg Hartmanccacbc92016-02-03 09:59:44 -0800130
131 The program should produce on standard output zero or more lines
132 of authorized_keys output (see AUTHORIZED_KEYS in sshd(8)). If a
133 key supplied by AuthorizedKeysCommand does not successfully
134 authenticate and authorize the user then public key
135 authentication continues using the usual AuthorizedKeysFile
136 files. By default, no AuthorizedKeysCommand is run.
Adam Langleyd0592972015-03-30 14:49:51 -0700137
138 AuthorizedKeysCommandUser
139 Specifies the user under whose account the AuthorizedKeysCommand
140 is run. It is recommended to use a dedicated user that has no
141 other role on the host than running authorized keys commands. If
142 AuthorizedKeysCommand is specified but AuthorizedKeysCommandUser
143 is not, then sshd(8) will refuse to start.
144
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800145 AuthorizedKeysFile
Greg Hartman9768ca42017-06-22 20:49:52 -0700146 Specifies the file that contains the public keys used for user
147 authentication. The format is described in the AUTHORIZED_KEYS
148 FILE FORMAT section of sshd(8). Arguments to AuthorizedKeysFile
149 accept the tokens described in the TOKENS section. After
150 expansion, AuthorizedKeysFile is taken to be an absolute path or
151 one relative to the user's home directory. Multiple files may be
152 listed, separated by whitespace. Alternately this option may be
153 set to none to skip checking for user keys in files. The default
154 is ".ssh/authorized_keys .ssh/authorized_keys2".
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800155
Greg Hartmanccacbc92016-02-03 09:59:44 -0800156 AuthorizedPrincipalsCommand
157 Specifies a program to be used to generate the list of allowed
158 certificate principals as per AuthorizedPrincipalsFile. The
159 program must be owned by root, not writable by group or others
Greg Hartman9768ca42017-06-22 20:49:52 -0700160 and specified by an absolute path. Arguments to
161 AuthorizedPrincipalsCommand accept the tokens described in the
162 TOKENS section. If no arguments are specified then the username
163 of the target user is used.
Greg Hartmanccacbc92016-02-03 09:59:44 -0800164
165 The program should produce on standard output zero or more lines
166 of AuthorizedPrincipalsFile output. If either
167 AuthorizedPrincipalsCommand or AuthorizedPrincipalsFile is
168 specified, then certificates offered by the client for
169 authentication must contain a principal that is listed. By
170 default, no AuthorizedPrincipalsCommand is run.
171
172 AuthorizedPrincipalsCommandUser
173 Specifies the user under whose account the
174 AuthorizedPrincipalsCommand is run. It is recommended to use a
175 dedicated user that has no other role on the host than running
176 authorized principals commands. If AuthorizedPrincipalsCommand
177 is specified but AuthorizedPrincipalsCommandUser is not, then
178 sshd(8) will refuse to start.
179
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800180 AuthorizedPrincipalsFile
181 Specifies a file that lists principal names that are accepted for
182 certificate authentication. When using certificates signed by a
183 key listed in TrustedUserCAKeys, this file lists names, one of
184 which must appear in the certificate for it to be accepted for
185 authentication. Names are listed one per line preceded by key
186 options (as described in AUTHORIZED_KEYS FILE FORMAT in sshd(8)).
Adam Langleyd0592972015-03-30 14:49:51 -0700187 Empty lines and comments starting with M-bM-^@M-^X#M-bM-^@M-^Y are ignored.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800188
Greg Hartman9768ca42017-06-22 20:49:52 -0700189 Arguments to AuthorizedPrincipalsFile accept the tokens described
190 in the TOKENS section. After expansion, AuthorizedPrincipalsFile
191 is taken to be an absolute path or one relative to the user's
192 home directory. The default is none, i.e. not to use a
193 principals file M-bM-^@M-^S in this case, the username of the user must
194 appear in a certificate's principals list for it to be accepted.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800195
Greg Hartman9768ca42017-06-22 20:49:52 -0700196 Note that AuthorizedPrincipalsFile is only used when
197 authentication proceeds using a CA listed in TrustedUserCAKeys
198 and is not consulted for certification authorities trusted via
Adam Langleyd0592972015-03-30 14:49:51 -0700199 ~/.ssh/authorized_keys, though the principals= key option offers
200 a similar facility (see sshd(8) for details).
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800201
202 Banner The contents of the specified file are sent to the remote user
Greg Hartman9768ca42017-06-22 20:49:52 -0700203 before authentication is allowed. If the argument is none then
204 no banner is displayed. By default, no banner is displayed.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800205
206 ChallengeResponseAuthentication
207 Specifies whether challenge-response authentication is allowed
Adam Langleyd0592972015-03-30 14:49:51 -0700208 (e.g. via PAM or through authentication styles supported in
Greg Hartman9768ca42017-06-22 20:49:52 -0700209 login.conf(5)) The default is yes.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800210
211 ChrootDirectory
212 Specifies the pathname of a directory to chroot(2) to after
Adam Langleyd0592972015-03-30 14:49:51 -0700213 authentication. At session startup sshd(8) checks that all
214 components of the pathname are root-owned directories which are
215 not writable by any other user or group. After the chroot,
216 sshd(8) changes the working directory to the user's home
Greg Hartman9768ca42017-06-22 20:49:52 -0700217 directory. Arguments to ChrootDirectory accept the tokens
218 described in the TOKENS section.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800219
220 The ChrootDirectory must contain the necessary files and
221 directories to support the user's session. For an interactive
222 session this requires at least a shell, typically sh(1), and
223 basic /dev nodes such as null(4), zero(4), stdin(4), stdout(4),
Adam Langleyd0592972015-03-30 14:49:51 -0700224 stderr(4), and tty(4) devices. For file transfer sessions using
Greg Hartman9768ca42017-06-22 20:49:52 -0700225 SFTP no additional configuration of the environment is necessary
226 if the in-process sftp-server is used, though sessions which use
227 logging may require /dev/log inside the chroot directory on some
228 operating systems (see sftp-server(8) for details).
Adam Langleyd0592972015-03-30 14:49:51 -0700229
230 For safety, it is very important that the directory hierarchy be
231 prevented from modification by other processes on the system
232 (especially those outside the jail). Misconfiguration can lead
233 to unsafe environments which sshd(8) cannot detect.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800234
Greg Hartman9768ca42017-06-22 20:49:52 -0700235 The default is none, indicating not to chroot(2).
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800236
237 Ciphers
Greg Hartman9768ca42017-06-22 20:49:52 -0700238 Specifies the ciphers allowed. Multiple ciphers must be comma-
239 separated. If the specified value begins with a M-bM-^@M-^X+M-bM-^@M-^Y character,
240 then the specified ciphers will be appended to the default set
241 instead of replacing them. If the specified value begins with a
242 M-bM-^@M-^X-M-bM-^@M-^Y character, then the specified ciphers (including wildcards)
243 will be removed from the default set instead of replacing them.
Greg Hartmanccacbc92016-02-03 09:59:44 -0800244
245 The supported ciphers are:
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800246
Adam Langleyd0592972015-03-30 14:49:51 -0700247 3des-cbc
248 aes128-cbc
249 aes192-cbc
250 aes256-cbc
251 aes128-ctr
252 aes192-ctr
253 aes256-ctr
254 aes128-gcm@openssh.com
255 aes256-gcm@openssh.com
256 arcfour
257 arcfour128
258 arcfour256
259 blowfish-cbc
260 cast128-cbc
261 chacha20-poly1305@openssh.com
262
263 The default is:
264
Greg Hartmanccacbc92016-02-03 09:59:44 -0800265 chacha20-poly1305@openssh.com,
Adam Langleyd0592972015-03-30 14:49:51 -0700266 aes128-ctr,aes192-ctr,aes256-ctr,
Greg Hartmanccacbc92016-02-03 09:59:44 -0800267 aes128-gcm@openssh.com,aes256-gcm@openssh.com
Adam Langleyd0592972015-03-30 14:49:51 -0700268
Greg Hartman9768ca42017-06-22 20:49:52 -0700269 The list of available ciphers may also be obtained using "ssh -Q
270 cipher".
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800271
272 ClientAliveCountMax
Greg Hartman9768ca42017-06-22 20:49:52 -0700273 Sets the number of client alive messages which may be sent
274 without sshd(8) receiving any messages back from the client. If
275 this threshold is reached while client alive messages are being
276 sent, sshd will disconnect the client, terminating the session.
277 It is important to note that the use of client alive messages is
278 very different from TCPKeepAlive. The client alive messages are
279 sent through the encrypted channel and therefore will not be
280 spoofable. The TCP keepalive option enabled by TCPKeepAlive is
281 spoofable. The client alive mechanism is valuable when the
282 client or server depend on knowing when a connection has become
283 inactive.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800284
Greg Hartman9768ca42017-06-22 20:49:52 -0700285 The default value is 3. If ClientAliveInterval is set to 15, and
286 ClientAliveCountMax is left at the default, unresponsive SSH
287 clients will be disconnected after approximately 45 seconds.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800288
289 ClientAliveInterval
290 Sets a timeout interval in seconds after which if no data has
291 been received from the client, sshd(8) will send a message
292 through the encrypted channel to request a response from the
293 client. The default is 0, indicating that these messages will
Greg Hartman9768ca42017-06-22 20:49:52 -0700294 not be sent to the client.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800295
296 Compression
Greg Hartman9768ca42017-06-22 20:49:52 -0700297 Specifies whether compression is enabled after the user has
298 authenticated successfully. The argument must be yes, delayed (a
299 legacy synonym for yes) or no. The default is yes.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800300
301 DenyGroups
302 This keyword can be followed by a list of group name patterns,
303 separated by spaces. Login is disallowed for users whose primary
304 group or supplementary group list matches one of the patterns.
305 Only group names are valid; a numerical group ID is not
306 recognized. By default, login is allowed for all groups. The
307 allow/deny directives are processed in the following order:
308 DenyUsers, AllowUsers, DenyGroups, and finally AllowGroups.
309
310 See PATTERNS in ssh_config(5) for more information on patterns.
311
312 DenyUsers
313 This keyword can be followed by a list of user name patterns,
314 separated by spaces. Login is disallowed for user names that
315 match one of the patterns. Only user names are valid; a
316 numerical user ID is not recognized. By default, login is
317 allowed for all users. If the pattern takes the form USER@HOST
318 then USER and HOST are separately checked, restricting logins to
Greg Hartman9768ca42017-06-22 20:49:52 -0700319 particular users from particular hosts. HOST criteria may
320 additionally contain addresses to match in CIDR address/masklen
321 format. The allow/deny directives are processed in the following
322 order: DenyUsers, AllowUsers, DenyGroups, and finally
323 AllowGroups.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800324
325 See PATTERNS in ssh_config(5) for more information on patterns.
326
Greg Hartman9768ca42017-06-22 20:49:52 -0700327 DisableForwarding
328 Disables all forwarding features, including X11, ssh-agent(1),
329 TCP and StreamLocal. This option overrides all other forwarding-
330 related options and may simplify restricted configurations.
331
Adam Langleyd0592972015-03-30 14:49:51 -0700332 FingerprintHash
333 Specifies the hash algorithm used when logging key fingerprints.
Greg Hartman9768ca42017-06-22 20:49:52 -0700334 Valid options are: md5 and sha256. The default is sha256.
Adam Langleyd0592972015-03-30 14:49:51 -0700335
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800336 ForceCommand
337 Forces the execution of the command specified by ForceCommand,
338 ignoring any command supplied by the client and ~/.ssh/rc if
339 present. The command is invoked by using the user's login shell
340 with the -c option. This applies to shell, command, or subsystem
341 execution. It is most useful inside a Match block. The command
342 originally supplied by the client is available in the
343 SSH_ORIGINAL_COMMAND environment variable. Specifying a command
Greg Hartman9768ca42017-06-22 20:49:52 -0700344 of internal-sftp will force the use of an in-process SFTP server
345 that requires no support files when used with ChrootDirectory.
346 The default is none.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800347
348 GatewayPorts
349 Specifies whether remote hosts are allowed to connect to ports
350 forwarded for the client. By default, sshd(8) binds remote port
351 forwardings to the loopback address. This prevents other remote
352 hosts from connecting to forwarded ports. GatewayPorts can be
353 used to specify that sshd should allow remote port forwardings to
354 bind to non-loopback addresses, thus allowing other hosts to
Greg Hartman9768ca42017-06-22 20:49:52 -0700355 connect. The argument may be no to force remote port forwardings
356 to be available to the local host only, yes to force remote port
357 forwardings to bind to the wildcard address, or clientspecified
358 to allow the client to select the address to which the forwarding
359 is bound. The default is no.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800360
361 GSSAPIAuthentication
362 Specifies whether user authentication based on GSSAPI is allowed.
Greg Hartman9768ca42017-06-22 20:49:52 -0700363 The default is no.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800364
365 GSSAPICleanupCredentials
366 Specifies whether to automatically destroy the user's credentials
Greg Hartman9768ca42017-06-22 20:49:52 -0700367 cache on logout. The default is yes.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800368
Greg Hartmanccacbc92016-02-03 09:59:44 -0800369 GSSAPIStrictAcceptorCheck
370 Determines whether to be strict about the identity of the GSSAPI
Greg Hartman9768ca42017-06-22 20:49:52 -0700371 acceptor a client authenticates against. If set to yes then the
372 client must authenticate against the host service on the current
373 hostname. If set to no then the client may authenticate against
374 any service key stored in the machine's default store. This
375 facility is provided to assist with operation on multi homed
376 machines. The default is yes.
Greg Hartmanccacbc92016-02-03 09:59:44 -0800377
Adam Langleyd0592972015-03-30 14:49:51 -0700378 HostbasedAcceptedKeyTypes
379 Specifies the key types that will be accepted for hostbased
Greg Hartmanccacbc92016-02-03 09:59:44 -0800380 authentication as a comma-separated pattern list. Alternately if
381 the specified value begins with a M-bM-^@M-^X+M-bM-^@M-^Y character, then the
382 specified key types will be appended to the default set instead
Greg Hartman9768ca42017-06-22 20:49:52 -0700383 of replacing them. If the specified value begins with a M-bM-^@M-^X-M-bM-^@M-^Y
384 character, then the specified key types (including wildcards)
385 will be removed from the default set instead of replacing them.
386 The default for this option is:
Greg Hartmanccacbc92016-02-03 09:59:44 -0800387
388 ecdsa-sha2-nistp256-cert-v01@openssh.com,
389 ecdsa-sha2-nistp384-cert-v01@openssh.com,
390 ecdsa-sha2-nistp521-cert-v01@openssh.com,
391 ssh-ed25519-cert-v01@openssh.com,
392 ssh-rsa-cert-v01@openssh.com,
393 ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
394 ssh-ed25519,ssh-rsa
395
Greg Hartman9768ca42017-06-22 20:49:52 -0700396 The list of available key types may also be obtained using "ssh
397 -Q key".
Adam Langleyd0592972015-03-30 14:49:51 -0700398
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800399 HostbasedAuthentication
400 Specifies whether rhosts or /etc/hosts.equiv authentication
401 together with successful public key client host authentication is
Greg Hartman9768ca42017-06-22 20:49:52 -0700402 allowed (host-based authentication). The default is no.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800403
404 HostbasedUsesNameFromPacketOnly
405 Specifies whether or not the server will attempt to perform a
406 reverse name lookup when matching the name in the ~/.shosts,
407 ~/.rhosts, and /etc/hosts.equiv files during
Greg Hartman9768ca42017-06-22 20:49:52 -0700408 HostbasedAuthentication. A setting of yes means that sshd(8)
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800409 uses the name supplied by the client rather than attempting to
410 resolve the name from the TCP connection itself. The default is
Greg Hartman9768ca42017-06-22 20:49:52 -0700411 no.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800412
413 HostCertificate
414 Specifies a file containing a public host certificate. The
415 certificate's public key must match a private host key already
416 specified by HostKey. The default behaviour of sshd(8) is not to
417 load any certificates.
418
419 HostKey
420 Specifies a file containing a private host key used by SSH. The
Greg Hartman9768ca42017-06-22 20:49:52 -0700421 defaults are /etc/ssh/ssh_host_dsa_key,
422 /etc/ssh/ssh_host_ecdsa_key, /etc/ssh/ssh_host_ed25519_key and
423 /etc/ssh/ssh_host_rsa_key.
Greg Hartmanccacbc92016-02-03 09:59:44 -0800424
425 Note that sshd(8) will refuse to use a file if it is group/world-
426 accessible and that the HostKeyAlgorithms option restricts which
427 of the keys are actually used by sshd(8).
428
Greg Hartman9768ca42017-06-22 20:49:52 -0700429 It is possible to have multiple host key files. It is also
430 possible to specify public host key files instead. In this case
431 operations on the private key will be delegated to an
432 ssh-agent(1).
Adam Langleyd0592972015-03-30 14:49:51 -0700433
434 HostKeyAgent
435 Identifies the UNIX-domain socket used to communicate with an
Greg Hartman9768ca42017-06-22 20:49:52 -0700436 agent that has access to the private host keys. If the string
437 "SSH_AUTH_SOCK" is specified, the location of the socket will be
Adam Langleyd0592972015-03-30 14:49:51 -0700438 read from the SSH_AUTH_SOCK environment variable.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800439
Greg Hartmanccacbc92016-02-03 09:59:44 -0800440 HostKeyAlgorithms
Greg Hartman9768ca42017-06-22 20:49:52 -0700441 Specifies the host key algorithms that the server offers. The
442 default for this option is:
Greg Hartmanccacbc92016-02-03 09:59:44 -0800443
444 ecdsa-sha2-nistp256-cert-v01@openssh.com,
445 ecdsa-sha2-nistp384-cert-v01@openssh.com,
446 ecdsa-sha2-nistp521-cert-v01@openssh.com,
447 ssh-ed25519-cert-v01@openssh.com,
448 ssh-rsa-cert-v01@openssh.com,
449 ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
450 ssh-ed25519,ssh-rsa
451
Greg Hartman9768ca42017-06-22 20:49:52 -0700452 The list of available key types may also be obtained using "ssh
453 -Q key".
Greg Hartmanccacbc92016-02-03 09:59:44 -0800454
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800455 IgnoreRhosts
456 Specifies that .rhosts and .shosts files will not be used in
Greg Hartman9768ca42017-06-22 20:49:52 -0700457 HostbasedAuthentication.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800458
459 /etc/hosts.equiv and /etc/shosts.equiv are still used. The
Greg Hartman9768ca42017-06-22 20:49:52 -0700460 default is yes.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800461
462 IgnoreUserKnownHosts
463 Specifies whether sshd(8) should ignore the user's
Greg Hartman9768ca42017-06-22 20:49:52 -0700464 ~/.ssh/known_hosts during HostbasedAuthentication. The default
465 is no.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800466
467 IPQoS Specifies the IPv4 type-of-service or DSCP class for the
Greg Hartman9768ca42017-06-22 20:49:52 -0700468 connection. Accepted values are af11, af12, af13, af21, af22,
469 af23, af31, af32, af33, af41, af42, af43, cs0, cs1, cs2, cs3,
470 cs4, cs5, cs6, cs7, ef, lowdelay, throughput, reliability, or a
471 numeric value. This option may take one or two arguments,
472 separated by whitespace. If one argument is specified, it is
473 used as the packet class unconditionally. If two values are
474 specified, the first is automatically selected for interactive
475 sessions and the second for non-interactive sessions. The
476 default is lowdelay for interactive sessions and throughput for
477 non-interactive sessions.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800478
Adam Langleyd0592972015-03-30 14:49:51 -0700479 KbdInteractiveAuthentication
480 Specifies whether to allow keyboard-interactive authentication.
Greg Hartman9768ca42017-06-22 20:49:52 -0700481 The argument to this keyword must be yes or no. The default is
482 to use whatever value ChallengeResponseAuthentication is set to
483 (by default yes).
Adam Langleyd0592972015-03-30 14:49:51 -0700484
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800485 KerberosAuthentication
486 Specifies whether the password provided by the user for
487 PasswordAuthentication will be validated through the Kerberos
488 KDC. To use this option, the server needs a Kerberos servtab
489 which allows the verification of the KDC's identity. The default
Greg Hartman9768ca42017-06-22 20:49:52 -0700490 is no.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800491
492 KerberosGetAFSToken
493 If AFS is active and the user has a Kerberos 5 TGT, attempt to
494 acquire an AFS token before accessing the user's home directory.
Greg Hartman9768ca42017-06-22 20:49:52 -0700495 The default is no.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800496
497 KerberosOrLocalPasswd
498 If password authentication through Kerberos fails then the
499 password will be validated via any additional local mechanism
Greg Hartman9768ca42017-06-22 20:49:52 -0700500 such as /etc/passwd. The default is yes.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800501
502 KerberosTicketCleanup
503 Specifies whether to automatically destroy the user's ticket
Greg Hartman9768ca42017-06-22 20:49:52 -0700504 cache file on logout. The default is yes.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800505
506 KexAlgorithms
507 Specifies the available KEX (Key Exchange) algorithms. Multiple
Greg Hartmanccacbc92016-02-03 09:59:44 -0800508 algorithms must be comma-separated. Alternately if the specified
509 value begins with a M-bM-^@M-^X+M-bM-^@M-^Y character, then the specified methods
510 will be appended to the default set instead of replacing them.
Greg Hartman9768ca42017-06-22 20:49:52 -0700511 If the specified value begins with a M-bM-^@M-^X-M-bM-^@M-^Y character, then the
512 specified methods (including wildcards) will be removed from the
513 default set instead of replacing them. The supported algorithms
514 are:
Adam Langleyd0592972015-03-30 14:49:51 -0700515
Greg Hartman9768ca42017-06-22 20:49:52 -0700516 curve25519-sha256
Adam Langleyd0592972015-03-30 14:49:51 -0700517 curve25519-sha256@libssh.org
518 diffie-hellman-group1-sha1
519 diffie-hellman-group14-sha1
520 diffie-hellman-group-exchange-sha1
521 diffie-hellman-group-exchange-sha256
522 ecdh-sha2-nistp256
523 ecdh-sha2-nistp384
524 ecdh-sha2-nistp521
525
526 The default is:
527
Greg Hartman9768ca42017-06-22 20:49:52 -0700528 curve25519-sha256,curve25519-sha256@libssh.org,
Adam Langleyd0592972015-03-30 14:49:51 -0700529 ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
530 diffie-hellman-group-exchange-sha256,
531 diffie-hellman-group14-sha1
532
533 The list of available key exchange algorithms may also be
Greg Hartman9768ca42017-06-22 20:49:52 -0700534 obtained using "ssh -Q kex".
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800535
536 ListenAddress
537 Specifies the local addresses sshd(8) should listen on. The
538 following forms may be used:
539
540 ListenAddress host|IPv4_addr|IPv6_addr
541 ListenAddress host|IPv4_addr:port
542 ListenAddress [host|IPv6_addr]:port
543
544 If port is not specified, sshd will listen on the address and all
Greg Hartmanccacbc92016-02-03 09:59:44 -0800545 Port options specified. The default is to listen on all local
546 addresses. Multiple ListenAddress options are permitted.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800547
548 LoginGraceTime
549 The server disconnects after this time if the user has not
550 successfully logged in. If the value is 0, there is no time
551 limit. The default is 120 seconds.
552
553 LogLevel
554 Gives the verbosity level that is used when logging messages from
555 sshd(8). The possible values are: QUIET, FATAL, ERROR, INFO,
556 VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3. The default is INFO.
557 DEBUG and DEBUG1 are equivalent. DEBUG2 and DEBUG3 each specify
558 higher levels of debugging output. Logging with a DEBUG level
559 violates the privacy of users and is not recommended.
560
561 MACs Specifies the available MAC (message authentication code)
Greg Hartman9768ca42017-06-22 20:49:52 -0700562 algorithms. The MAC algorithm is used for data integrity
563 protection. Multiple algorithms must be comma-separated. If the
564 specified value begins with a M-bM-^@M-^X+M-bM-^@M-^Y character, then the specified
565 algorithms will be appended to the default set instead of
566 replacing them. If the specified value begins with a M-bM-^@M-^X-M-bM-^@M-^Y
567 character, then the specified algorithms (including wildcards)
568 will be removed from the default set instead of replacing them.
Greg Hartmanccacbc92016-02-03 09:59:44 -0800569
Greg Hartman9768ca42017-06-22 20:49:52 -0700570 The algorithms that contain "-etm" calculate the MAC after
Greg Hartmanccacbc92016-02-03 09:59:44 -0800571 encryption (encrypt-then-mac). These are considered safer and
572 their use recommended. The supported MACs are:
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800573
Adam Langleyd0592972015-03-30 14:49:51 -0700574 hmac-md5
575 hmac-md5-96
576 hmac-ripemd160
577 hmac-sha1
578 hmac-sha1-96
579 hmac-sha2-256
580 hmac-sha2-512
581 umac-64@openssh.com
582 umac-128@openssh.com
583 hmac-md5-etm@openssh.com
584 hmac-md5-96-etm@openssh.com
585 hmac-ripemd160-etm@openssh.com
586 hmac-sha1-etm@openssh.com
587 hmac-sha1-96-etm@openssh.com
588 hmac-sha2-256-etm@openssh.com
589 hmac-sha2-512-etm@openssh.com
590 umac-64-etm@openssh.com
591 umac-128-etm@openssh.com
592
593 The default is:
594
595 umac-64-etm@openssh.com,umac-128-etm@openssh.com,
596 hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
Greg Hartman9768ca42017-06-22 20:49:52 -0700597 hmac-sha1-etm@openssh.com,
Adam Langleyd0592972015-03-30 14:49:51 -0700598 umac-64@openssh.com,umac-128@openssh.com,
Greg Hartman9768ca42017-06-22 20:49:52 -0700599 hmac-sha2-256,hmac-sha2-512,hmac-sha1
Adam Langleyd0592972015-03-30 14:49:51 -0700600
601 The list of available MAC algorithms may also be obtained using
Greg Hartman9768ca42017-06-22 20:49:52 -0700602 "ssh -Q mac".
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800603
604 Match Introduces a conditional block. If all of the criteria on the
605 Match line are satisfied, the keywords on the following lines
606 override those set in the global section of the config file,
Adam Langleyd0592972015-03-30 14:49:51 -0700607 until either another Match line or the end of the file. If a
608 keyword appears in multiple Match blocks that are satisfied, only
609 the first instance of the keyword is applied.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800610
Adam Langleyd0592972015-03-30 14:49:51 -0700611 The arguments to Match are one or more criteria-pattern pairs or
612 the single token All which matches all criteria. The available
613 criteria are User, Group, Host, LocalAddress, LocalPort, and
614 Address. The match patterns may consist of single entries or
615 comma-separated lists and may use the wildcard and negation
616 operators described in the PATTERNS section of ssh_config(5).
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800617
618 The patterns in an Address criteria may additionally contain
Greg Hartman9768ca42017-06-22 20:49:52 -0700619 addresses to match in CIDR address/masklen format, such as
620 192.0.2.0/24 or 2001:db8::/32. Note that the mask length
Adam Langleyd0592972015-03-30 14:49:51 -0700621 provided must be consistent with the address - it is an error to
622 specify a mask length that is too long for the address or one
623 with bits set in this host portion of the address. For example,
Greg Hartman9768ca42017-06-22 20:49:52 -0700624 192.0.2.0/33 and 192.0.2.0/8, respectively.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800625
626 Only a subset of keywords may be used on the lines following a
Adam Langleyd0592972015-03-30 14:49:51 -0700627 Match keyword. Available keywords are AcceptEnv,
628 AllowAgentForwarding, AllowGroups, AllowStreamLocalForwarding,
629 AllowTcpForwarding, AllowUsers, AuthenticationMethods,
630 AuthorizedKeysCommand, AuthorizedKeysCommandUser,
Greg Hartman9768ca42017-06-22 20:49:52 -0700631 AuthorizedKeysFile, AuthorizedPrincipalsCommand,
632 AuthorizedPrincipalsCommandUser, AuthorizedPrincipalsFile,
633 Banner, ChrootDirectory, ClientAliveCountMax,
634 ClientAliveInterval, DenyGroups, DenyUsers, ForceCommand,
Adam Langleyd0592972015-03-30 14:49:51 -0700635 GatewayPorts, GSSAPIAuthentication, HostbasedAcceptedKeyTypes,
636 HostbasedAuthentication, HostbasedUsesNameFromPacketOnly, IPQoS,
637 KbdInteractiveAuthentication, KerberosAuthentication,
638 MaxAuthTries, MaxSessions, PasswordAuthentication,
639 PermitEmptyPasswords, PermitOpen, PermitRootLogin, PermitTTY,
640 PermitTunnel, PermitUserRC, PubkeyAcceptedKeyTypes,
641 PubkeyAuthentication, RekeyLimit, RevokedKeys,
Greg Hartman9768ca42017-06-22 20:49:52 -0700642 StreamLocalBindMask, StreamLocalBindUnlink, TrustedUserCAKeys,
643 X11DisplayOffset, X11Forwarding and X11UseLocalHost.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800644
645 MaxAuthTries
646 Specifies the maximum number of authentication attempts permitted
647 per connection. Once the number of failures reaches half this
648 value, additional failures are logged. The default is 6.
649
650 MaxSessions
Greg Hartman9768ca42017-06-22 20:49:52 -0700651 Specifies the maximum number of open shell, login or subsystem
652 (e.g. sftp) sessions permitted per network connection. Multiple
653 sessions may be established by clients that support connection
654 multiplexing. Setting MaxSessions to 1 will effectively disable
655 session multiplexing, whereas setting it to 0 will prevent all
656 shell, login and subsystem sessions while still permitting
657 forwarding. The default is 10.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800658
659 MaxStartups
660 Specifies the maximum number of concurrent unauthenticated
661 connections to the SSH daemon. Additional connections will be
662 dropped until authentication succeeds or the LoginGraceTime
Adam Langleyd0592972015-03-30 14:49:51 -0700663 expires for a connection. The default is 10:30:100.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800664
665 Alternatively, random early drop can be enabled by specifying the
Greg Hartman9768ca42017-06-22 20:49:52 -0700666 three colon separated values start:rate:full (e.g. "10:30:60").
Adam Langleyd0592972015-03-30 14:49:51 -0700667 sshd(8) will refuse connection attempts with a probability of
Greg Hartman9768ca42017-06-22 20:49:52 -0700668 rate/100 (30%) if there are currently start (10) unauthenticated
669 connections. The probability increases linearly and all
670 connection attempts are refused if the number of unauthenticated
671 connections reaches full (60).
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800672
673 PasswordAuthentication
674 Specifies whether password authentication is allowed. The
Greg Hartman9768ca42017-06-22 20:49:52 -0700675 default is yes.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800676
677 PermitEmptyPasswords
678 When password authentication is allowed, it specifies whether the
679 server allows login to accounts with empty password strings. The
Greg Hartman9768ca42017-06-22 20:49:52 -0700680 default is no.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800681
682 PermitOpen
683 Specifies the destinations to which TCP port forwarding is
684 permitted. The forwarding specification must be one of the
685 following forms:
686
687 PermitOpen host:port
688 PermitOpen IPv4_addr:port
689 PermitOpen [IPv6_addr]:port
690
691 Multiple forwards may be specified by separating them with
Greg Hartman9768ca42017-06-22 20:49:52 -0700692 whitespace. An argument of any can be used to remove all
Adam Langleyd0592972015-03-30 14:49:51 -0700693 restrictions and permit any forwarding requests. An argument of
Greg Hartman9768ca42017-06-22 20:49:52 -0700694 none can be used to prohibit all forwarding requests. The
695 wildcard M-bM-^@M-^X*M-bM-^@M-^Y can be used for host or port to allow all hosts or
696 ports, respectively. By default all port forwarding requests are
697 permitted.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800698
699 PermitRootLogin
700 Specifies whether root can log in using ssh(1). The argument
Greg Hartman9768ca42017-06-22 20:49:52 -0700701 must be yes, prohibit-password, without-password,
702 forced-commands-only, or no. The default is prohibit-password.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800703
Greg Hartman9768ca42017-06-22 20:49:52 -0700704 If this option is set to prohibit-password or without-password,
705 password and keyboard-interactive authentication are disabled for
706 root.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800707
Greg Hartman9768ca42017-06-22 20:49:52 -0700708 If this option is set to forced-commands-only, root login with
Adam Langleyd0592972015-03-30 14:49:51 -0700709 public key authentication will be allowed, but only if the
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800710 command option has been specified (which may be useful for taking
711 remote backups even if root login is normally not allowed). All
712 other authentication methods are disabled for root.
713
Greg Hartman9768ca42017-06-22 20:49:52 -0700714 If this option is set to no, root is not allowed to log in.
715
716 PermitTTY
717 Specifies whether pty(4) allocation is permitted. The default is
718 yes.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800719
720 PermitTunnel
721 Specifies whether tun(4) device forwarding is allowed. The
Greg Hartman9768ca42017-06-22 20:49:52 -0700722 argument must be yes, point-to-point (layer 3), ethernet (layer
723 2), or no. Specifying yes permits both point-to-point and
724 ethernet. The default is no.
Adam Langleyd0592972015-03-30 14:49:51 -0700725
726 Independent of this setting, the permissions of the selected
727 tun(4) device must allow access to the user.
728
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800729 PermitUserEnvironment
730 Specifies whether ~/.ssh/environment and environment= options in
731 ~/.ssh/authorized_keys are processed by sshd(8). The default is
Greg Hartman9768ca42017-06-22 20:49:52 -0700732 no. Enabling environment processing may enable users to bypass
Adam Langleyd0592972015-03-30 14:49:51 -0700733 access restrictions in some configurations using mechanisms such
734 as LD_PRELOAD.
735
736 PermitUserRC
737 Specifies whether any ~/.ssh/rc file is executed. The default is
Greg Hartman9768ca42017-06-22 20:49:52 -0700738 yes.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800739
740 PidFile
741 Specifies the file that contains the process ID of the SSH
Greg Hartman9768ca42017-06-22 20:49:52 -0700742 daemon, or none to not write one. The default is
Greg Hartmanccacbc92016-02-03 09:59:44 -0800743 /var/run/sshd.pid.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800744
745 Port Specifies the port number that sshd(8) listens on. The default
746 is 22. Multiple options of this type are permitted. See also
747 ListenAddress.
748
749 PrintLastLog
750 Specifies whether sshd(8) should print the date and time of the
751 last user login when a user logs in interactively. The default
Greg Hartman9768ca42017-06-22 20:49:52 -0700752 is yes.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800753
754 PrintMotd
755 Specifies whether sshd(8) should print /etc/motd when a user logs
756 in interactively. (On some systems it is also printed by the
Greg Hartman9768ca42017-06-22 20:49:52 -0700757 shell, /etc/profile, or equivalent.) The default is yes.
Adam Langleyd0592972015-03-30 14:49:51 -0700758
759 PubkeyAcceptedKeyTypes
760 Specifies the key types that will be accepted for public key
Greg Hartmanccacbc92016-02-03 09:59:44 -0800761 authentication as a comma-separated pattern list. Alternately if
762 the specified value begins with a M-bM-^@M-^X+M-bM-^@M-^Y character, then the
763 specified key types will be appended to the default set instead
Greg Hartman9768ca42017-06-22 20:49:52 -0700764 of replacing them. If the specified value begins with a M-bM-^@M-^X-M-bM-^@M-^Y
765 character, then the specified key types (including wildcards)
766 will be removed from the default set instead of replacing them.
767 The default for this option is:
Greg Hartmanccacbc92016-02-03 09:59:44 -0800768
769 ecdsa-sha2-nistp256-cert-v01@openssh.com,
770 ecdsa-sha2-nistp384-cert-v01@openssh.com,
771 ecdsa-sha2-nistp521-cert-v01@openssh.com,
772 ssh-ed25519-cert-v01@openssh.com,
773 ssh-rsa-cert-v01@openssh.com,
774 ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
775 ssh-ed25519,ssh-rsa
776
Greg Hartman9768ca42017-06-22 20:49:52 -0700777 The list of available key types may also be obtained using "ssh
778 -Q key".
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800779
780 PubkeyAuthentication
781 Specifies whether public key authentication is allowed. The
Greg Hartman9768ca42017-06-22 20:49:52 -0700782 default is yes.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800783
Adam Langleyd0592972015-03-30 14:49:51 -0700784 RekeyLimit
785 Specifies the maximum amount of data that may be transmitted
786 before the session key is renegotiated, optionally followed a
787 maximum amount of time that may pass before the session key is
788 renegotiated. The first argument is specified in bytes and may
789 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,
790 Megabytes, or Gigabytes, respectively. The default is between
791 M-bM-^@M-^X1GM-bM-^@M-^Y and M-bM-^@M-^X4GM-bM-^@M-^Y, depending on the cipher. The optional second
792 value is specified in seconds and may use any of the units
793 documented in the TIME FORMATS section. The default value for
Greg Hartman9768ca42017-06-22 20:49:52 -0700794 RekeyLimit is default none, which means that rekeying is
Adam Langleyd0592972015-03-30 14:49:51 -0700795 performed after the cipher's default amount of data has been sent
Greg Hartman9768ca42017-06-22 20:49:52 -0700796 or received and no time based rekeying is done.
Adam Langleyd0592972015-03-30 14:49:51 -0700797
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800798 RevokedKeys
Greg Hartman9768ca42017-06-22 20:49:52 -0700799 Specifies revoked public keys file, or none to not use one. Keys
800 listed in this file will be refused for public key
Greg Hartmanccacbc92016-02-03 09:59:44 -0800801 authentication. Note that if this file is not readable, then
802 public key authentication will be refused for all users. Keys
803 may be specified as a text file, listing one public key per line,
804 or as an OpenSSH Key Revocation List (KRL) as generated by
805 ssh-keygen(1). For more information on KRLs, see the KEY
806 REVOCATION LISTS section in ssh-keygen(1).
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800807
Adam Langleyd0592972015-03-30 14:49:51 -0700808 StreamLocalBindMask
809 Sets the octal file creation mode mask (umask) used when creating
810 a Unix-domain socket file for local or remote port forwarding.
811 This option is only used for port forwarding to a Unix-domain
812 socket file.
813
814 The default value is 0177, which creates a Unix-domain socket
815 file that is readable and writable only by the owner. Note that
816 not all operating systems honor the file mode on Unix-domain
817 socket files.
818
819 StreamLocalBindUnlink
820 Specifies whether to remove an existing Unix-domain socket file
821 for local or remote port forwarding before creating a new one.
822 If the socket file already exists and StreamLocalBindUnlink is
823 not enabled, sshd will be unable to forward the port to the Unix-
824 domain socket file. This option is only used for port forwarding
825 to a Unix-domain socket file.
826
Greg Hartman9768ca42017-06-22 20:49:52 -0700827 The argument must be yes or no. The default is no.
Adam Langleyd0592972015-03-30 14:49:51 -0700828
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800829 StrictModes
830 Specifies whether sshd(8) should check file modes and ownership
831 of the user's files and home directory before accepting login.
832 This is normally desirable because novices sometimes accidentally
833 leave their directory or files world-writable. The default is
Greg Hartman9768ca42017-06-22 20:49:52 -0700834 yes. Note that this does not apply to ChrootDirectory, whose
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800835 permissions and ownership are checked unconditionally.
836
837 Subsystem
838 Configures an external subsystem (e.g. file transfer daemon).
839 Arguments should be a subsystem name and a command (with optional
840 arguments) to execute upon subsystem request.
841
Greg Hartman9768ca42017-06-22 20:49:52 -0700842 The command sftp-server implements the SFTP file transfer
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800843 subsystem.
844
Greg Hartman9768ca42017-06-22 20:49:52 -0700845 Alternately the name internal-sftp implements an in-process SFTP
846 server. This may simplify configurations using ChrootDirectory
847 to force a different filesystem root on clients.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800848
Greg Hartman9768ca42017-06-22 20:49:52 -0700849 By default no subsystems are defined.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800850
851 SyslogFacility
852 Gives the facility code that is used when logging messages from
853 sshd(8). The possible values are: DAEMON, USER, AUTH, LOCAL0,
854 LOCAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7. The
855 default is AUTH.
856
857 TCPKeepAlive
858 Specifies whether the system should send TCP keepalive messages
859 to the other side. If they are sent, death of the connection or
860 crash of one of the machines will be properly noticed. However,
861 this means that connections will die if the route is down
862 temporarily, and some people find it annoying. On the other
863 hand, if TCP keepalives are not sent, sessions may hang
Greg Hartman9768ca42017-06-22 20:49:52 -0700864 indefinitely on the server, leaving "ghost" users and consuming
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800865 server resources.
866
Greg Hartman9768ca42017-06-22 20:49:52 -0700867 The default is yes (to send TCP keepalive messages), and the
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800868 server will notice if the network goes down or the client host
869 crashes. This avoids infinitely hanging sessions.
870
Greg Hartman9768ca42017-06-22 20:49:52 -0700871 To disable TCP keepalive messages, the value should be set to no.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800872
873 TrustedUserCAKeys
874 Specifies a file containing public keys of certificate
875 authorities that are trusted to sign user certificates for
Greg Hartman9768ca42017-06-22 20:49:52 -0700876 authentication, or none to not use one. Keys are listed one per
877 line; empty lines and comments starting with M-bM-^@M-^X#M-bM-^@M-^Y are allowed. If
878 a certificate is presented for authentication and has its signing
879 CA key listed in this file, then it may be used for
Greg Hartmanccacbc92016-02-03 09:59:44 -0800880 authentication for any user listed in the certificate's
881 principals list. Note that certificates that lack a list of
882 principals will not be permitted for authentication using
883 TrustedUserCAKeys. For more details on certificates, see the
884 CERTIFICATES section in ssh-keygen(1).
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800885
Greg Hartmanccacbc92016-02-03 09:59:44 -0800886 UseDNS Specifies whether sshd(8) should look up the remote host name,
887 and to check that the resolved host name for the remote IP
888 address maps back to the very same IP address.
889
Greg Hartman9768ca42017-06-22 20:49:52 -0700890 If this option is set to no (the default) then only addresses and
891 not host names may be used in ~/.ssh/authorized_keys from and
Greg Hartmanccacbc92016-02-03 09:59:44 -0800892 sshd_config Match Host directives.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800893
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800894 UsePAM Enables the Pluggable Authentication Module interface. If set to
Greg Hartman9768ca42017-06-22 20:49:52 -0700895 yes this will enable PAM authentication using
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800896 ChallengeResponseAuthentication and PasswordAuthentication in
897 addition to PAM account and session module processing for all
898 authentication types.
899
900 Because PAM challenge-response authentication usually serves an
901 equivalent role to password authentication, you should disable
902 either PasswordAuthentication or ChallengeResponseAuthentication.
903
904 If UsePAM is enabled, you will not be able to run sshd(8) as a
Greg Hartman9768ca42017-06-22 20:49:52 -0700905 non-root user. The default is no.
Adam Langleyd0592972015-03-30 14:49:51 -0700906
907 VersionAddendum
908 Optionally specifies additional text to append to the SSH
909 protocol banner sent by the server upon connection. The default
Greg Hartman9768ca42017-06-22 20:49:52 -0700910 is none.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800911
912 X11DisplayOffset
913 Specifies the first display number available for sshd(8)'s X11
914 forwarding. This prevents sshd from interfering with real X11
915 servers. The default is 10.
916
917 X11Forwarding
918 Specifies whether X11 forwarding is permitted. The argument must
Greg Hartman9768ca42017-06-22 20:49:52 -0700919 be yes or no. The default is no.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800920
921 When X11 forwarding is enabled, there may be additional exposure
922 to the server and to client displays if the sshd(8) proxy display
923 is configured to listen on the wildcard address (see
Greg Hartman9768ca42017-06-22 20:49:52 -0700924 X11UseLocalhost), though this is not the default. Additionally,
925 the authentication spoofing and authentication data verification
926 and substitution occur on the client side. The security risk of
927 using X11 forwarding is that the client's X11 display server may
928 be exposed to attack when the SSH client requests forwarding (see
929 the warnings for ForwardX11 in ssh_config(5)). A system
930 administrator may have a stance in which they want to protect
931 clients that may expose themselves to attack by unwittingly
932 requesting X11 forwarding, which can warrant a no setting.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800933
934 Note that disabling X11 forwarding does not prevent users from
935 forwarding X11 traffic, as users can always install their own
Greg Hartman9768ca42017-06-22 20:49:52 -0700936 forwarders.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800937
938 X11UseLocalhost
939 Specifies whether sshd(8) should bind the X11 forwarding server
940 to the loopback address or to the wildcard address. By default,
941 sshd binds the forwarding server to the loopback address and sets
942 the hostname part of the DISPLAY environment variable to
Greg Hartman9768ca42017-06-22 20:49:52 -0700943 localhost. This prevents remote hosts from connecting to the
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800944 proxy display. However, some older X11 clients may not function
Greg Hartman9768ca42017-06-22 20:49:52 -0700945 with this configuration. X11UseLocalhost may be set to no to
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800946 specify that the forwarding server should be bound to the
Greg Hartman9768ca42017-06-22 20:49:52 -0700947 wildcard address. The argument must be yes or no. The default
948 is yes.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800949
950 XAuthLocation
Greg Hartman9768ca42017-06-22 20:49:52 -0700951 Specifies the full pathname of the xauth(1) program, or none to
Greg Hartmanccacbc92016-02-03 09:59:44 -0800952 not use one. The default is /usr/X11R6/bin/xauth.
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800953
954TIME FORMATS
955 sshd(8) command-line arguments and configuration file options that
956 specify time may be expressed using a sequence of the form:
957 time[qualifier], where time is a positive integer value and qualifier is
958 one of the following:
959
Adam Langleyd0592972015-03-30 14:49:51 -0700960 M-bM-^_M-(noneM-bM-^_M-) seconds
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800961 s | S seconds
962 m | M minutes
963 h | H hours
964 d | D days
965 w | W weeks
966
967 Each member of the sequence is added together to calculate the total time
968 value.
969
970 Time format examples:
971
972 600 600 seconds (10 minutes)
973 10m 10 minutes
974 1h30m 1 hour 30 minutes (90 minutes)
975
Greg Hartman9768ca42017-06-22 20:49:52 -0700976TOKENS
977 Arguments to some keywords can make use of tokens, which are expanded at
978 runtime:
979
980 %% A literal M-bM-^@M-^X%M-bM-^@M-^Y.
981 %F The fingerprint of the CA key.
982 %f The fingerprint of the key or certificate.
983 %h The home directory of the user.
984 %i The key ID in the certificate.
985 %K The base64-encoded CA key.
986 %k The base64-encoded key or certificate for authentication.
987 %s The serial number of the certificate.
988 %T The type of the CA key.
989 %t The key or certificate type.
990 %u The username.
991
992 AuthorizedKeysCommand accepts the tokens %%, %f, %h, %k, %t, and %u.
993
994 AuthorizedKeysFile accepts the tokens %%, %h, and %u.
995
996 AuthorizedPrincipalsCommand accepts the tokens %%, %F, %f, %h, %i, %K,
997 %k, %s, %T, %t, and %u.
998
999 AuthorizedPrincipalsFile accepts the tokens %%, %h, and %u.
1000
1001 ChrootDirectory accepts the tokens %%, %h, and %u.
1002
Greg Hartmanbd77cf72015-02-25 13:21:06 -08001003FILES
1004 /etc/ssh/sshd_config
1005 Contains configuration data for sshd(8). This file should be
1006 writable by root only, but it is recommended (though not
1007 necessary) that it be world-readable.
1008
1009SEE ALSO
Greg Hartman9768ca42017-06-22 20:49:52 -07001010 sftp-server(8), sshd(8)
Greg Hartmanbd77cf72015-02-25 13:21:06 -08001011
1012AUTHORS
1013 OpenSSH is a derivative of the original and free ssh 1.2.12 release by
1014 Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo
1015 de Raadt and Dug Song removed many bugs, re-added newer features and
1016 created OpenSSH. Markus Friedl contributed the support for SSH protocol
1017 versions 1.5 and 2.0. Niels Provos and Markus Friedl contributed support
1018 for privilege separation.
1019
Greg Hartman9768ca42017-06-22 20:49:52 -07001020OpenBSD 6.0 March 14, 2017 OpenBSD 6.0