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