1.\" 2.\" Author: Tatu Ylonen <ylo@cs.hut.fi> 3.\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4.\" All rights reserved 5.\" 6.\" As far as I am concerned, the code I have written for this software 7.\" can be used freely for any purpose. Any derived versions of this 8.\" software must be clearly marked as such, and if the derived work is 9.\" incompatible with the protocol description in the RFC file, it must be 10.\" called by a name other than "ssh" or "Secure Shell". 11.\" 12.\" Copyright (c) 1999,2000 Markus Friedl. All rights reserved. 13.\" Copyright (c) 1999 Aaron Campbell. All rights reserved. 14.\" Copyright (c) 1999 Theo de Raadt. All rights reserved. 15.\" 16.\" Redistribution and use in source and binary forms, with or without 17.\" modification, are permitted provided that the following conditions 18.\" are met: 19.\" 1. Redistributions of source code must retain the above copyright 20.\" notice, this list of conditions and the following disclaimer. 21.\" 2. Redistributions in binary form must reproduce the above copyright 22.\" notice, this list of conditions and the following disclaimer in the 23.\" documentation and/or other materials provided with the distribution. 24.\" 25.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 26.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 27.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 28.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 29.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 30.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 31.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 32.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 33.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 34.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35.\" 36.\" $OpenBSD: sshd_config.5,v 1.243 2017/03/14 07:19:07 djm Exp $ 37.\" $FreeBSD$ 38.Dd $Mdocdate: March 14 2017 $ 39.Dt SSHD_CONFIG 5 40.Os 41.Sh NAME 42.Nm sshd_config 43.Nd OpenSSH SSH daemon configuration file 44.Sh SYNOPSIS 45.Nm /etc/ssh/sshd_config 46.Sh DESCRIPTION 47.Xr sshd 8 48reads configuration data from 49.Pa /etc/ssh/sshd_config 50(or the file specified with 51.Fl f 52on the command line). 53The file contains keyword-argument pairs, one per line. 54Lines starting with 55.Ql # 56and empty lines are interpreted as comments. 57Arguments may optionally be enclosed in double quotes 58.Pq \&" 59in order to represent arguments containing spaces. 60.Pp 61The possible 62keywords and their meanings are as follows (note that 63keywords are case-insensitive and arguments are case-sensitive): 64.Bl -tag -width Ds 65.It Cm AcceptEnv 66Specifies what environment variables sent by the client will be copied into 67the session's 68.Xr environ 7 . 69See 70.Cm SendEnv 71in 72.Xr ssh_config 5 73for how to configure the client. 74The 75.Ev TERM 76environment variable is always sent whenever the client 77requests a pseudo-terminal as it is required by the protocol. 78Variables are specified by name, which may contain the wildcard characters 79.Ql * 80and 81.Ql \&? . 82Multiple environment variables may be separated by whitespace or spread 83across multiple 84.Cm AcceptEnv 85directives. 86Be warned that some environment variables could be used to bypass restricted 87user environments. 88For this reason, care should be taken in the use of this directive. 89The default is not to accept any environment variables. 90.It Cm AddressFamily 91Specifies which address family should be used by 92.Xr sshd 8 . 93Valid arguments are 94.Cm any 95(the default), 96.Cm inet 97(use IPv4 only), or 98.Cm inet6 99(use IPv6 only). 100.It Cm AllowAgentForwarding 101Specifies whether 102.Xr ssh-agent 1 103forwarding is permitted. 104The default is 105.Cm yes . 106Note that disabling agent forwarding does not improve security 107unless users are also denied shell access, as they can always install 108their own forwarders. 109.It Cm AllowGroups 110This keyword can be followed by a list of group name patterns, separated 111by spaces. 112If specified, login is allowed only for users whose primary 113group or supplementary group list matches one of the patterns. 114Only group names are valid; a numerical group ID is not recognized. 115By default, login is allowed for all groups. 116The allow/deny directives are processed in the following order: 117.Cm DenyUsers , 118.Cm AllowUsers , 119.Cm DenyGroups , 120and finally 121.Cm AllowGroups . 122.Pp 123See PATTERNS in 124.Xr ssh_config 5 125for more information on patterns. 126.It Cm AllowStreamLocalForwarding 127Specifies whether StreamLocal (Unix-domain socket) forwarding is permitted. 128The available options are 129.Cm yes 130(the default) 131or 132.Cm all 133to allow StreamLocal forwarding, 134.Cm no 135to prevent all StreamLocal forwarding, 136.Cm local 137to allow local (from the perspective of 138.Xr ssh 1 ) 139forwarding only or 140.Cm remote 141to allow remote forwarding only. 142Note that disabling StreamLocal forwarding does not improve security unless 143users are also denied shell access, as they can always install their 144own forwarders. 145.It Cm AllowTcpForwarding 146Specifies whether TCP forwarding is permitted. 147The available options are 148.Cm yes 149(the default) 150or 151.Cm all 152to allow TCP forwarding, 153.Cm no 154to prevent all TCP forwarding, 155.Cm local 156to allow local (from the perspective of 157.Xr ssh 1 ) 158forwarding only or 159.Cm remote 160to allow remote forwarding only. 161Note that disabling TCP forwarding does not improve security unless 162users are also denied shell access, as they can always install their 163own forwarders. 164.It Cm AllowUsers 165This keyword can be followed by a list of user name patterns, separated 166by spaces. 167If specified, login is allowed only for user names that 168match one of the patterns. 169Only user names are valid; a numerical user ID is not recognized. 170By default, login is allowed for all users. 171If the pattern takes the form USER@HOST then USER and HOST 172are separately checked, restricting logins to particular 173users from particular hosts. 174HOST criteria may additionally contain addresses to match in CIDR 175address/masklen format. 176The allow/deny directives are processed in the following order: 177.Cm DenyUsers , 178.Cm AllowUsers , 179.Cm DenyGroups , 180and finally 181.Cm AllowGroups . 182.Pp 183See PATTERNS in 184.Xr ssh_config 5 185for more information on patterns. 186.It Cm AuthenticationMethods 187Specifies the authentication methods that must be successfully completed 188for a user to be granted access. 189This option must be followed by one or more comma-separated lists of 190authentication method names, or by the single string 191.Cm any 192to indicate the default behaviour of accepting any single authentication 193method. 194If the default is overridden, then successful authentication requires 195completion of every method in at least one of these lists. 196.Pp 197For example, 198.Qq publickey,password publickey,keyboard-interactive 199would require the user to complete public key authentication, followed by 200either password or keyboard interactive authentication. 201Only methods that are next in one or more lists are offered at each stage, 202so for this example it would not be possible to attempt password or 203keyboard-interactive authentication before public key. 204.Pp 205For keyboard interactive authentication it is also possible to 206restrict authentication to a specific device by appending a 207colon followed by the device identifier 208.Cm bsdauth , 209.Cm pam , 210or 211.Cm skey , 212depending on the server configuration. 213For example, 214.Qq keyboard-interactive:bsdauth 215would restrict keyboard interactive authentication to the 216.Cm bsdauth 217device. 218.Pp 219If the publickey method is listed more than once, 220.Xr sshd 8 221verifies that keys that have been used successfully are not reused for 222subsequent authentications. 223For example, 224.Qq publickey,publickey 225requires successful authentication using two different public keys. 226.Pp 227Note that each authentication method listed should also be explicitly enabled 228in the configuration. 229.It Cm AuthorizedKeysCommand 230Specifies a program to be used to look up the user's public keys. 231The program must be owned by root, not writable by group or others and 232specified by an absolute path. 233Arguments to 234.Cm AuthorizedKeysCommand 235accept the tokens described in the 236.Sx TOKENS 237section. 238If no arguments are specified then the username of the target user is used. 239.Pp 240The program should produce on standard output zero or 241more lines of authorized_keys output (see 242.Sx AUTHORIZED_KEYS 243in 244.Xr sshd 8 ) . 245If a key supplied by 246.Cm AuthorizedKeysCommand 247does not successfully authenticate 248and authorize the user then public key authentication continues using the usual 249.Cm AuthorizedKeysFile 250files. 251By default, no 252.Cm AuthorizedKeysCommand 253is run. 254.It Cm AuthorizedKeysCommandUser 255Specifies the user under whose account the 256.Cm AuthorizedKeysCommand 257is run. 258It is recommended to use a dedicated user that has no other role on the host 259than running authorized keys commands. 260If 261.Cm AuthorizedKeysCommand 262is specified but 263.Cm AuthorizedKeysCommandUser 264is not, then 265.Xr sshd 8 266will refuse to start. 267.It Cm AuthorizedKeysFile 268Specifies the file that contains the public keys used for user authentication. 269The format is described in the 270.Sx AUTHORIZED_KEYS FILE FORMAT 271section of 272.Xr sshd 8 . 273Arguments to 274.Cm AuthorizedKeysFile 275accept the tokens described in the 276.Sx TOKENS 277section. 278After expansion, 279.Cm AuthorizedKeysFile 280is taken to be an absolute path or one relative to the user's home 281directory. 282Multiple files may be listed, separated by whitespace. 283Alternately this option may be set to 284.Cm none 285to skip checking for user keys in files. 286The default is 287.Qq .ssh/authorized_keys .ssh/authorized_keys2 . 288.It Cm AuthorizedPrincipalsCommand 289Specifies a program to be used to generate the list of allowed 290certificate principals as per 291.Cm AuthorizedPrincipalsFile . 292The program must be owned by root, not writable by group or others and 293specified by an absolute path. 294Arguments to 295.Cm AuthorizedPrincipalsCommand 296accept the tokens described in the 297.Sx TOKENS 298section. 299If no arguments are specified then the username of the target user is used. 300.Pp 301The program should produce on standard output zero or 302more lines of 303.Cm AuthorizedPrincipalsFile 304output. 305If either 306.Cm AuthorizedPrincipalsCommand 307or 308.Cm AuthorizedPrincipalsFile 309is specified, then certificates offered by the client for authentication 310must contain a principal that is listed. 311By default, no 312.Cm AuthorizedPrincipalsCommand 313is run. 314.It Cm AuthorizedPrincipalsCommandUser 315Specifies the user under whose account the 316.Cm AuthorizedPrincipalsCommand 317is run. 318It is recommended to use a dedicated user that has no other role on the host 319than running authorized principals commands. 320If 321.Cm AuthorizedPrincipalsCommand 322is specified but 323.Cm AuthorizedPrincipalsCommandUser 324is not, then 325.Xr sshd 8 326will refuse to start. 327.It Cm AuthorizedPrincipalsFile 328Specifies a file that lists principal names that are accepted for 329certificate authentication. 330When using certificates signed by a key listed in 331.Cm TrustedUserCAKeys , 332this file lists names, one of which must appear in the certificate for it 333to be accepted for authentication. 334Names are listed one per line preceded by key options (as described in 335.Sx AUTHORIZED_KEYS FILE FORMAT 336in 337.Xr sshd 8 ) . 338Empty lines and comments starting with 339.Ql # 340are ignored. 341.Pp 342Arguments to 343.Cm AuthorizedPrincipalsFile 344accept the tokens described in the 345.Sx TOKENS 346section. 347After expansion, 348.Cm AuthorizedPrincipalsFile 349is taken to be an absolute path or one relative to the user's home directory. 350The default is 351.Cm none , 352i.e. not to use a principals file \(en in this case, the username 353of the user must appear in a certificate's principals list for it to be 354accepted. 355.Pp 356Note that 357.Cm AuthorizedPrincipalsFile 358is only used when authentication proceeds using a CA listed in 359.Cm TrustedUserCAKeys 360and is not consulted for certification authorities trusted via 361.Pa ~/.ssh/authorized_keys , 362though the 363.Cm principals= 364key option offers a similar facility (see 365.Xr sshd 8 366for details). 367.It Cm Banner 368The contents of the specified file are sent to the remote user before 369authentication is allowed. 370If the argument is 371.Cm none 372then no banner is displayed. 373By default, no banner is displayed. 374.It Cm ChallengeResponseAuthentication 375Specifies whether challenge-response authentication is allowed (e.g. via 376PAM or through authentication styles supported in 377.Xr login.conf 5 ) 378The default is 379.Cm yes . 380.It Cm ChrootDirectory 381Specifies the pathname of a directory to 382.Xr chroot 2 383to after authentication. 384At session startup 385.Xr sshd 8 386checks that all components of the pathname are root-owned directories 387which are not writable by any other user or group. 388After the chroot, 389.Xr sshd 8 390changes the working directory to the user's home directory. 391Arguments to 392.Cm ChrootDirectory 393accept the tokens described in the 394.Sx TOKENS 395section. 396.Pp 397The 398.Cm ChrootDirectory 399must contain the necessary files and directories to support the 400user's session. 401For an interactive session this requires at least a shell, typically 402.Xr sh 1 , 403and basic 404.Pa /dev 405nodes such as 406.Xr null 4 , 407.Xr zero 4 , 408.Xr stdin 4 , 409.Xr stdout 4 , 410.Xr stderr 4 , 411and 412.Xr tty 4 413devices. 414For file transfer sessions using SFTP 415no additional configuration of the environment is necessary if the in-process 416sftp-server is used, 417though sessions which use logging may require 418.Pa /dev/log 419inside the chroot directory on some operating systems (see 420.Xr sftp-server 8 421for details). 422.Pp 423For safety, it is very important that the directory hierarchy be 424prevented from modification by other processes on the system (especially 425those outside the jail). 426Misconfiguration can lead to unsafe environments which 427.Xr sshd 8 428cannot detect. 429.Pp 430The default is 431.Cm none , 432indicating not to 433.Xr chroot 2 . 434.It Cm Ciphers 435Specifies the ciphers allowed. 436Multiple ciphers must be comma-separated. 437If the specified value begins with a 438.Sq + 439character, then the specified ciphers will be appended to the default set 440instead of replacing them. 441If the specified value begins with a 442.Sq - 443character, then the specified ciphers (including wildcards) will be removed 444from the default set instead of replacing them. 445.Pp 446The supported ciphers are: 447.Pp 448.Bl -item -compact -offset indent 449.It 4503des-cbc 451.It 452aes128-cbc 453.It 454aes192-cbc 455.It 456aes256-cbc 457.It 458aes128-ctr 459.It 460aes192-ctr 461.It 462aes256-ctr 463.It 464aes128-gcm@openssh.com 465.It 466aes256-gcm@openssh.com 467.It 468arcfour 469.It 470arcfour128 471.It 472arcfour256 473.It 474blowfish-cbc 475.It 476cast128-cbc 477.It 478chacha20-poly1305@openssh.com 479.El 480.Pp 481The default is: 482.Bd -literal -offset indent 483chacha20-poly1305@openssh.com, 484aes128-ctr,aes192-ctr,aes256-ctr, 485aes128-gcm@openssh.com,aes256-gcm@openssh.com, 486aes128-cbc,aes192-cbc,aes256-cbc 487.Ed 488.Pp 489The list of available ciphers may also be obtained using 490.Qq ssh -Q cipher . 491.It Cm ClientAliveCountMax 492Sets the number of client alive messages which may be sent without 493.Xr sshd 8 494receiving any messages back from the client. 495If this threshold is reached while client alive messages are being sent, 496sshd will disconnect the client, terminating the session. 497It is important to note that the use of client alive messages is very 498different from 499.Cm TCPKeepAlive . 500The client alive messages are sent through the encrypted channel 501and therefore will not be spoofable. 502The TCP keepalive option enabled by 503.Cm TCPKeepAlive 504is spoofable. 505The client alive mechanism is valuable when the client or 506server depend on knowing when a connection has become inactive. 507.Pp 508The default value is 3. 509If 510.Cm ClientAliveInterval 511is set to 15, and 512.Cm ClientAliveCountMax 513is left at the default, unresponsive SSH clients 514will be disconnected after approximately 45 seconds. 515.It Cm ClientAliveInterval 516Sets a timeout interval in seconds after which if no data has been received 517from the client, 518.Xr sshd 8 519will send a message through the encrypted 520channel to request a response from the client. 521The default 522is 0, indicating that these messages will not be sent to the client. 523.It Cm Compression 524Specifies whether compression is enabled after 525the user has authenticated successfully. 526The argument must be 527.Cm yes , 528.Cm delayed 529(a legacy synonym for 530.Cm yes ) 531or 532.Cm no . 533The default is 534.Cm yes . 535.It Cm DenyGroups 536This keyword can be followed by a list of group name patterns, separated 537by spaces. 538Login is disallowed for users whose primary group or supplementary 539group list matches one of the patterns. 540Only group names are valid; a numerical group ID is not recognized. 541By default, login is allowed for all groups. 542The allow/deny directives are processed in the following order: 543.Cm DenyUsers , 544.Cm AllowUsers , 545.Cm DenyGroups , 546and finally 547.Cm AllowGroups . 548.Pp 549See PATTERNS in 550.Xr ssh_config 5 551for more information on patterns. 552.It Cm DenyUsers 553This keyword can be followed by a list of user name patterns, separated 554by spaces. 555Login is disallowed for user names that match one of the patterns. 556Only user names are valid; a numerical user ID is not recognized. 557By default, login is allowed for all users. 558If the pattern takes the form USER@HOST then USER and HOST 559are separately checked, restricting logins to particular 560users from particular hosts. 561HOST criteria may additionally contain addresses to match in CIDR 562address/masklen format. 563The allow/deny directives are processed in the following order: 564.Cm DenyUsers , 565.Cm AllowUsers , 566.Cm DenyGroups , 567and finally 568.Cm AllowGroups . 569.Pp 570See PATTERNS in 571.Xr ssh_config 5 572for more information on patterns. 573.It Cm DisableForwarding 574Disables all forwarding features, including X11, 575.Xr ssh-agent 1 , 576TCP and StreamLocal. 577This option overrides all other forwarding-related options and may 578simplify restricted configurations. 579.It Cm FingerprintHash 580Specifies the hash algorithm used when logging key fingerprints. 581Valid options are: 582.Cm md5 583and 584.Cm sha256 . 585The default is 586.Cm sha256 . 587.It Cm ForceCommand 588Forces the execution of the command specified by 589.Cm ForceCommand , 590ignoring any command supplied by the client and 591.Pa ~/.ssh/rc 592if present. 593The command is invoked by using the user's login shell with the -c option. 594This applies to shell, command, or subsystem execution. 595It is most useful inside a 596.Cm Match 597block. 598The command originally supplied by the client is available in the 599.Ev SSH_ORIGINAL_COMMAND 600environment variable. 601Specifying a command of 602.Cm internal-sftp 603will force the use of an in-process SFTP server that requires no support 604files when used with 605.Cm ChrootDirectory . 606The default is 607.Cm none . 608.It Cm GatewayPorts 609Specifies whether remote hosts are allowed to connect to ports 610forwarded for the client. 611By default, 612.Xr sshd 8 613binds remote port forwardings to the loopback address. 614This prevents other remote hosts from connecting to forwarded ports. 615.Cm GatewayPorts 616can be used to specify that sshd 617should allow remote port forwardings to bind to non-loopback addresses, thus 618allowing other hosts to connect. 619The argument may be 620.Cm no 621to force remote port forwardings to be available to the local host only, 622.Cm yes 623to force remote port forwardings to bind to the wildcard address, or 624.Cm clientspecified 625to allow the client to select the address to which the forwarding is bound. 626The default is 627.Cm no . 628.It Cm GSSAPIAuthentication 629Specifies whether user authentication based on GSSAPI is allowed. 630The default is 631.Cm no . 632.It Cm GSSAPICleanupCredentials 633Specifies whether to automatically destroy the user's credentials cache 634on logout. 635The default is 636.Cm yes . 637.It Cm GSSAPIStrictAcceptorCheck 638Determines whether to be strict about the identity of the GSSAPI acceptor 639a client authenticates against. 640If set to 641.Cm yes 642then the client must authenticate against the host 643service on the current hostname. 644If set to 645.Cm no 646then the client may authenticate against any service key stored in the 647machine's default store. 648This facility is provided to assist with operation on multi homed machines. 649The default is 650.Cm yes . 651.It Cm HostbasedAcceptedKeyTypes 652Specifies the key types that will be accepted for hostbased authentication 653as a comma-separated pattern list. 654Alternately if the specified value begins with a 655.Sq + 656character, then the specified key types will be appended to the default set 657instead of replacing them. 658If the specified value begins with a 659.Sq - 660character, then the specified key types (including wildcards) will be removed 661from the default set instead of replacing them. 662The default for this option is: 663.Bd -literal -offset 3n 664ecdsa-sha2-nistp256-cert-v01@openssh.com, 665ecdsa-sha2-nistp384-cert-v01@openssh.com, 666ecdsa-sha2-nistp521-cert-v01@openssh.com, 667ssh-ed25519-cert-v01@openssh.com, 668ssh-rsa-cert-v01@openssh.com, 669ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521, 670ssh-ed25519,ssh-rsa 671.Ed 672.Pp 673The list of available key types may also be obtained using 674.Qq ssh -Q key . 675.It Cm HostbasedAuthentication 676Specifies whether rhosts or /etc/hosts.equiv authentication together 677with successful public key client host authentication is allowed 678(host-based authentication). 679The default is 680.Cm no . 681.It Cm HostbasedUsesNameFromPacketOnly 682Specifies whether or not the server will attempt to perform a reverse 683name lookup when matching the name in the 684.Pa ~/.shosts , 685.Pa ~/.rhosts , 686and 687.Pa /etc/hosts.equiv 688files during 689.Cm HostbasedAuthentication . 690A setting of 691.Cm yes 692means that 693.Xr sshd 8 694uses the name supplied by the client rather than 695attempting to resolve the name from the TCP connection itself. 696The default is 697.Cm no . 698.It Cm HostCertificate 699Specifies a file containing a public host certificate. 700The certificate's public key must match a private host key already specified 701by 702.Cm HostKey . 703The default behaviour of 704.Xr sshd 8 705is not to load any certificates. 706.It Cm HostKey 707Specifies a file containing a private host key 708used by SSH. 709The defaults are 710.Pa /etc/ssh/ssh_host_dsa_key , 711.Pa /etc/ssh/ssh_host_ecdsa_key , 712.Pa /etc/ssh/ssh_host_ed25519_key 713and 714.Pa /etc/ssh/ssh_host_rsa_key . 715.Pp 716Note that 717.Xr sshd 8 718will refuse to use a file if it is group/world-accessible 719and that the 720.Cm HostKeyAlgorithms 721option restricts which of the keys are actually used by 722.Xr sshd 8 . 723.Pp 724It is possible to have multiple host key files. 725It is also possible to specify public host key files instead. 726In this case operations on the private key will be delegated 727to an 728.Xr ssh-agent 1 . 729.It Cm HostKeyAgent 730Identifies the UNIX-domain socket used to communicate 731with an agent that has access to the private host keys. 732If the string 733.Qq SSH_AUTH_SOCK 734is specified, the location of the socket will be read from the 735.Ev SSH_AUTH_SOCK 736environment variable. 737.It Cm HostKeyAlgorithms 738Specifies the host key algorithms 739that the server offers. 740The default for this option is: 741.Bd -literal -offset 3n 742ecdsa-sha2-nistp256-cert-v01@openssh.com, 743ecdsa-sha2-nistp384-cert-v01@openssh.com, 744ecdsa-sha2-nistp521-cert-v01@openssh.com, 745ssh-ed25519-cert-v01@openssh.com, 746ssh-rsa-cert-v01@openssh.com, 747ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521, 748ssh-ed25519,ssh-rsa 749.Ed 750.Pp 751The list of available key types may also be obtained using 752.Qq ssh -Q key . 753.It Cm IgnoreRhosts 754Specifies that 755.Pa .rhosts 756and 757.Pa .shosts 758files will not be used in 759.Cm HostbasedAuthentication . 760.Pp 761.Pa /etc/hosts.equiv 762and 763.Pa /etc/ssh/shosts.equiv 764are still used. 765The default is 766.Cm yes . 767.It Cm IgnoreUserKnownHosts 768Specifies whether 769.Xr sshd 8 770should ignore the user's 771.Pa ~/.ssh/known_hosts 772during 773.Cm HostbasedAuthentication . 774The default is 775.Cm no . 776.It Cm IPQoS 777Specifies the IPv4 type-of-service or DSCP class for the connection. 778Accepted values are 779.Cm af11 , 780.Cm af12 , 781.Cm af13 , 782.Cm af21 , 783.Cm af22 , 784.Cm af23 , 785.Cm af31 , 786.Cm af32 , 787.Cm af33 , 788.Cm af41 , 789.Cm af42 , 790.Cm af43 , 791.Cm cs0 , 792.Cm cs1 , 793.Cm cs2 , 794.Cm cs3 , 795.Cm cs4 , 796.Cm cs5 , 797.Cm cs6 , 798.Cm cs7 , 799.Cm ef , 800.Cm lowdelay , 801.Cm throughput , 802.Cm reliability , 803or a numeric value. 804This option may take one or two arguments, separated by whitespace. 805If one argument is specified, it is used as the packet class unconditionally. 806If two values are specified, the first is automatically selected for 807interactive sessions and the second for non-interactive sessions. 808The default is 809.Cm lowdelay 810for interactive sessions and 811.Cm throughput 812for non-interactive sessions. 813.It Cm KbdInteractiveAuthentication 814Specifies whether to allow keyboard-interactive authentication. 815The argument to this keyword must be 816.Cm yes 817or 818.Cm no . 819The default is to use whatever value 820.Cm ChallengeResponseAuthentication 821is set to 822(by default 823.Cm yes ) . 824.It Cm KerberosAuthentication 825Specifies whether the password provided by the user for 826.Cm PasswordAuthentication 827will be validated through the Kerberos KDC. 828To use this option, the server needs a 829Kerberos servtab which allows the verification of the KDC's identity. 830The default is 831.Cm no . 832.It Cm KerberosGetAFSToken 833If AFS is active and the user has a Kerberos 5 TGT, attempt to acquire 834an AFS token before accessing the user's home directory. 835The default is 836.Cm no . 837.It Cm KerberosOrLocalPasswd 838If password authentication through Kerberos fails then 839the password will be validated via any additional local mechanism 840such as 841.Pa /etc/passwd . 842The default is 843.Cm yes . 844.It Cm KerberosTicketCleanup 845Specifies whether to automatically destroy the user's ticket cache 846file on logout. 847The default is 848.Cm yes . 849.It Cm KexAlgorithms 850Specifies the available KEX (Key Exchange) algorithms. 851Multiple algorithms must be comma-separated. 852Alternately if the specified value begins with a 853.Sq + 854character, then the specified methods will be appended to the default set 855instead of replacing them. 856If the specified value begins with a 857.Sq - 858character, then the specified methods (including wildcards) will be removed 859from the default set instead of replacing them. 860The supported algorithms are: 861.Pp 862.Bl -item -compact -offset indent 863.It 864curve25519-sha256 865.It 866curve25519-sha256@libssh.org 867.It 868diffie-hellman-group1-sha1 869.It 870diffie-hellman-group14-sha1 871.It 872diffie-hellman-group-exchange-sha1 873.It 874diffie-hellman-group-exchange-sha256 875.It 876ecdh-sha2-nistp256 877.It 878ecdh-sha2-nistp384 879.It 880ecdh-sha2-nistp521 881.El 882.Pp 883The default is: 884.Bd -literal -offset indent 885curve25519-sha256,curve25519-sha256@libssh.org, 886ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521, 887diffie-hellman-group-exchange-sha256, 888diffie-hellman-group14-sha1 889.Ed 890.Pp 891The list of available key exchange algorithms may also be obtained using 892.Qq ssh -Q kex . 893.It Cm ListenAddress 894Specifies the local addresses 895.Xr sshd 8 896should listen on. 897The following forms may be used: 898.Pp 899.Bl -item -offset indent -compact 900.It 901.Cm ListenAddress 902.Sm off 903.Ar host | Ar IPv4_addr | Ar IPv6_addr 904.Sm on 905.It 906.Cm ListenAddress 907.Sm off 908.Ar host | Ar IPv4_addr : Ar port 909.Sm on 910.It 911.Cm ListenAddress 912.Sm off 913.Oo 914.Ar host | Ar IPv6_addr Oc : Ar port 915.Sm on 916.El 917.Pp 918If 919.Ar port 920is not specified, 921sshd will listen on the address and all 922.Cm Port 923options specified. 924The default is to listen on all local addresses. 925Multiple 926.Cm ListenAddress 927options are permitted. 928.It Cm LoginGraceTime 929The server disconnects after this time if the user has not 930successfully logged in. 931If the value is 0, there is no time limit. 932The default is 120 seconds. 933.It Cm LogLevel 934Gives the verbosity level that is used when logging messages from 935.Xr sshd 8 . 936The possible values are: 937QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3. 938The default is INFO. 939DEBUG and DEBUG1 are equivalent. 940DEBUG2 and DEBUG3 each specify higher levels of debugging output. 941Logging with a DEBUG level violates the privacy of users and is not recommended. 942.It Cm MACs 943Specifies the available MAC (message authentication code) algorithms. 944The MAC algorithm is used for data integrity protection. 945Multiple algorithms must be comma-separated. 946If the specified value begins with a 947.Sq + 948character, then the specified algorithms will be appended to the default set 949instead of replacing them. 950If the specified value begins with a 951.Sq - 952character, then the specified algorithms (including wildcards) will be removed 953from the default set instead of replacing them. 954.Pp 955The algorithms that contain 956.Qq -etm 957calculate the MAC after encryption (encrypt-then-mac). 958These are considered safer and their use recommended. 959The supported MACs are: 960.Pp 961.Bl -item -compact -offset indent 962.It 963hmac-md5 964.It 965hmac-md5-96 966.It 967hmac-ripemd160 968.It 969hmac-sha1 970.It 971hmac-sha1-96 972.It 973hmac-sha2-256 974.It 975hmac-sha2-512 976.It 977umac-64@openssh.com 978.It 979umac-128@openssh.com 980.It 981hmac-md5-etm@openssh.com 982.It 983hmac-md5-96-etm@openssh.com 984.It 985hmac-ripemd160-etm@openssh.com 986.It 987hmac-sha1-etm@openssh.com 988.It 989hmac-sha1-96-etm@openssh.com 990.It 991hmac-sha2-256-etm@openssh.com 992.It 993hmac-sha2-512-etm@openssh.com 994.It 995umac-64-etm@openssh.com 996.It 997umac-128-etm@openssh.com 998.El 999.Pp 1000The default is: 1001.Bd -literal -offset indent 1002umac-64-etm@openssh.com,umac-128-etm@openssh.com, 1003hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com, 1004hmac-sha1-etm@openssh.com, 1005umac-64@openssh.com,umac-128@openssh.com, 1006hmac-sha2-256,hmac-sha2-512,hmac-sha1 1007.Ed 1008.Pp 1009The list of available MAC algorithms may also be obtained using 1010.Qq ssh -Q mac . 1011.It Cm Match 1012Introduces a conditional block. 1013If all of the criteria on the 1014.Cm Match 1015line are satisfied, the keywords on the following lines override those 1016set in the global section of the config file, until either another 1017.Cm Match 1018line or the end of the file. 1019If a keyword appears in multiple 1020.Cm Match 1021blocks that are satisfied, only the first instance of the keyword is 1022applied. 1023.Pp 1024The arguments to 1025.Cm Match 1026are one or more criteria-pattern pairs or the single token 1027.Cm All 1028which matches all criteria. 1029The available criteria are 1030.Cm User , 1031.Cm Group , 1032.Cm Host , 1033.Cm LocalAddress , 1034.Cm LocalPort , 1035and 1036.Cm Address . 1037The match patterns may consist of single entries or comma-separated 1038lists and may use the wildcard and negation operators described in the 1039.Sx PATTERNS 1040section of 1041.Xr ssh_config 5 . 1042.Pp 1043The patterns in an 1044.Cm Address 1045criteria may additionally contain addresses to match in CIDR 1046address/masklen format, 1047such as 192.0.2.0/24 or 2001:db8::/32. 1048Note that the mask length provided must be consistent with the address - 1049it is an error to specify a mask length that is too long for the address 1050or one with bits set in this host portion of the address. 1051For example, 192.0.2.0/33 and 192.0.2.0/8, respectively. 1052.Pp 1053Only a subset of keywords may be used on the lines following a 1054.Cm Match 1055keyword. 1056Available keywords are 1057.Cm AcceptEnv , 1058.Cm AllowAgentForwarding , 1059.Cm AllowGroups , 1060.Cm AllowStreamLocalForwarding , 1061.Cm AllowTcpForwarding , 1062.Cm AllowUsers , 1063.Cm AuthenticationMethods , 1064.Cm AuthorizedKeysCommand , 1065.Cm AuthorizedKeysCommandUser , 1066.Cm AuthorizedKeysFile , 1067.Cm AuthorizedPrincipalsCommand , 1068.Cm AuthorizedPrincipalsCommandUser , 1069.Cm AuthorizedPrincipalsFile , 1070.Cm Banner , 1071.Cm ChrootDirectory , 1072.Cm ClientAliveCountMax , 1073.Cm ClientAliveInterval , 1074.Cm DenyGroups , 1075.Cm DenyUsers , 1076.Cm ForceCommand , 1077.Cm GatewayPorts , 1078.Cm GSSAPIAuthentication , 1079.Cm HostbasedAcceptedKeyTypes , 1080.Cm HostbasedAuthentication , 1081.Cm HostbasedUsesNameFromPacketOnly , 1082.Cm IPQoS , 1083.Cm KbdInteractiveAuthentication , 1084.Cm KerberosAuthentication , 1085.Cm MaxAuthTries , 1086.Cm MaxSessions , 1087.Cm PasswordAuthentication , 1088.Cm PermitEmptyPasswords , 1089.Cm PermitOpen , 1090.Cm PermitRootLogin , 1091.Cm PermitTTY , 1092.Cm PermitTunnel , 1093.Cm PermitUserRC , 1094.Cm PubkeyAcceptedKeyTypes , 1095.Cm PubkeyAuthentication , 1096.Cm RekeyLimit , 1097.Cm RevokedKeys , 1098.Cm StreamLocalBindMask , 1099.Cm StreamLocalBindUnlink , 1100.Cm TrustedUserCAKeys , 1101.Cm X11DisplayOffset , 1102.Cm X11Forwarding 1103and 1104.Cm X11UseLocalHost . 1105.It Cm MaxAuthTries 1106Specifies the maximum number of authentication attempts permitted per 1107connection. 1108Once the number of failures reaches half this value, 1109additional failures are logged. 1110The default is 6. 1111.It Cm MaxSessions 1112Specifies the maximum number of open shell, login or subsystem (e.g. sftp) 1113sessions permitted per network connection. 1114Multiple sessions may be established by clients that support connection 1115multiplexing. 1116Setting 1117.Cm MaxSessions 1118to 1 will effectively disable session multiplexing, whereas setting it to 0 1119will prevent all shell, login and subsystem sessions while still permitting 1120forwarding. 1121The default is 10. 1122.It Cm MaxStartups 1123Specifies the maximum number of concurrent unauthenticated connections to the 1124SSH daemon. 1125Additional connections will be dropped until authentication succeeds or the 1126.Cm LoginGraceTime 1127expires for a connection. 1128The default is 10:30:100. 1129.Pp 1130Alternatively, random early drop can be enabled by specifying 1131the three colon separated values 1132start:rate:full (e.g. "10:30:60"). 1133.Xr sshd 8 1134will refuse connection attempts with a probability of rate/100 (30%) 1135if there are currently start (10) unauthenticated connections. 1136The probability increases linearly and all connection attempts 1137are refused if the number of unauthenticated connections reaches full (60). 1138.It Cm PasswordAuthentication 1139Specifies whether password authentication is allowed. 1140See also 1141.Cm UsePAM . 1142The default is 1143.Cm no . 1144.It Cm PermitEmptyPasswords 1145When password authentication is allowed, it specifies whether the 1146server allows login to accounts with empty password strings. 1147The default is 1148.Cm no . 1149.It Cm PermitOpen 1150Specifies the destinations to which TCP port forwarding is permitted. 1151The forwarding specification must be one of the following forms: 1152.Pp 1153.Bl -item -offset indent -compact 1154.It 1155.Cm PermitOpen 1156.Sm off 1157.Ar host : port 1158.Sm on 1159.It 1160.Cm PermitOpen 1161.Sm off 1162.Ar IPv4_addr : port 1163.Sm on 1164.It 1165.Cm PermitOpen 1166.Sm off 1167.Ar \&[ IPv6_addr \&] : port 1168.Sm on 1169.El 1170.Pp 1171Multiple forwards may be specified by separating them with whitespace. 1172An argument of 1173.Cm any 1174can be used to remove all restrictions and permit any forwarding requests. 1175An argument of 1176.Cm none 1177can be used to prohibit all forwarding requests. 1178The wildcard 1179.Sq * 1180can be used for host or port to allow all hosts or ports, respectively. 1181By default all port forwarding requests are permitted. 1182.It Cm PermitRootLogin 1183Specifies whether root can log in using 1184.Xr ssh 1 . 1185The argument must be 1186.Cm yes , 1187.Cm prohibit-password , 1188.Cm without-password , 1189.Cm forced-commands-only , 1190or 1191.Cm no . 1192The default is 1193.Cm no . 1194Note that if 1195.Cm ChallengeResponseAuthentication 1196and 1197.Cm UsePAM 1198are both 1199.Cm yes , 1200this setting may be overridden by the PAM policy. 1201.Pp 1202If this option is set to 1203.Cm prohibit-password 1204or 1205.Cm without-password , 1206password and keyboard-interactive authentication are disabled for root. 1207.Pp 1208If this option is set to 1209.Cm forced-commands-only , 1210root login with public key authentication will be allowed, 1211but only if the 1212.Ar command 1213option has been specified 1214(which may be useful for taking remote backups even if root login is 1215normally not allowed). 1216All other authentication methods are disabled for root. 1217.Pp 1218If this option is set to 1219.Cm no , 1220root is not allowed to log in. 1221.It Cm PermitTTY 1222Specifies whether 1223.Xr pty 4 1224allocation is permitted. 1225The default is 1226.Cm yes . 1227.It Cm PermitTunnel 1228Specifies whether 1229.Xr tun 4 1230device forwarding is allowed. 1231The argument must be 1232.Cm yes , 1233.Cm point-to-point 1234(layer 3), 1235.Cm ethernet 1236(layer 2), or 1237.Cm no . 1238Specifying 1239.Cm yes 1240permits both 1241.Cm point-to-point 1242and 1243.Cm ethernet . 1244The default is 1245.Cm no . 1246.Pp 1247Independent of this setting, the permissions of the selected 1248.Xr tun 4 1249device must allow access to the user. 1250.It Cm PermitUserEnvironment 1251Specifies whether 1252.Pa ~/.ssh/environment 1253and 1254.Cm environment= 1255options in 1256.Pa ~/.ssh/authorized_keys 1257are processed by 1258.Xr sshd 8 . 1259The default is 1260.Cm no . 1261Enabling environment processing may enable users to bypass access 1262restrictions in some configurations using mechanisms such as 1263.Ev LD_PRELOAD . 1264.It Cm PermitUserRC 1265Specifies whether any 1266.Pa ~/.ssh/rc 1267file is executed. 1268The default is 1269.Cm yes . 1270.It Cm PidFile 1271Specifies the file that contains the process ID of the 1272SSH daemon, or 1273.Cm none 1274to not write one. 1275The default is 1276.Pa /var/run/sshd.pid . 1277.It Cm Port 1278Specifies the port number that 1279.Xr sshd 8 1280listens on. 1281The default is 22. 1282Multiple options of this type are permitted. 1283See also 1284.Cm ListenAddress . 1285.It Cm PrintLastLog 1286Specifies whether 1287.Xr sshd 8 1288should print the date and time of the last user login when a user logs 1289in interactively. 1290The default is 1291.Cm yes . 1292.It Cm PrintMotd 1293Specifies whether 1294.Xr sshd 8 1295should print 1296.Pa /etc/motd 1297when a user logs in interactively. 1298(On some systems it is also printed by the shell, 1299.Pa /etc/profile , 1300or equivalent.) 1301The default is 1302.Cm yes . 1303.It Cm PubkeyAcceptedKeyTypes 1304Specifies the key types that will be accepted for public key authentication 1305as a comma-separated pattern list. 1306Alternately if the specified value begins with a 1307.Sq + 1308character, then the specified key types will be appended to the default set 1309instead of replacing them. 1310If the specified value begins with a 1311.Sq - 1312character, then the specified key types (including wildcards) will be removed 1313from the default set instead of replacing them. 1314The default for this option is: 1315.Bd -literal -offset 3n 1316ecdsa-sha2-nistp256-cert-v01@openssh.com, 1317ecdsa-sha2-nistp384-cert-v01@openssh.com, 1318ecdsa-sha2-nistp521-cert-v01@openssh.com, 1319ssh-ed25519-cert-v01@openssh.com, 1320ssh-rsa-cert-v01@openssh.com, 1321ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521, 1322ssh-ed25519,ssh-rsa 1323.Ed 1324.Pp 1325The list of available key types may also be obtained using 1326.Qq ssh -Q key . 1327.It Cm PubkeyAuthentication 1328Specifies whether public key authentication is allowed. 1329The default is 1330.Cm yes . 1331.It Cm RekeyLimit 1332Specifies the maximum amount of data that may be transmitted before the 1333session key is renegotiated, optionally followed a maximum amount of 1334time that may pass before the session key is renegotiated. 1335The first argument is specified in bytes and may have a suffix of 1336.Sq K , 1337.Sq M , 1338or 1339.Sq G 1340to indicate Kilobytes, Megabytes, or Gigabytes, respectively. 1341The default is between 1342.Sq 1G 1343and 1344.Sq 4G , 1345depending on the cipher. 1346The optional second value is specified in seconds and may use any of the 1347units documented in the 1348.Sx TIME FORMATS 1349section. 1350The default value for 1351.Cm RekeyLimit 1352is 1353.Cm default none , 1354which means that rekeying is performed after the cipher's default amount 1355of data has been sent or received and no time based rekeying is done. 1356.It Cm RevokedKeys 1357Specifies revoked public keys file, or 1358.Cm none 1359to not use one. 1360Keys listed in this file will be refused for public key authentication. 1361Note that if this file is not readable, then public key authentication will 1362be refused for all users. 1363Keys may be specified as a text file, listing one public key per line, or as 1364an OpenSSH Key Revocation List (KRL) as generated by 1365.Xr ssh-keygen 1 . 1366For more information on KRLs, see the KEY REVOCATION LISTS section in 1367.Xr ssh-keygen 1 . 1368.It Cm StreamLocalBindMask 1369Sets the octal file creation mode mask 1370.Pq umask 1371used when creating a Unix-domain socket file for local or remote 1372port forwarding. 1373This option is only used for port forwarding to a Unix-domain socket file. 1374.Pp 1375The default value is 0177, which creates a Unix-domain socket file that is 1376readable and writable only by the owner. 1377Note that not all operating systems honor the file mode on Unix-domain 1378socket files. 1379.It Cm StreamLocalBindUnlink 1380Specifies whether to remove an existing Unix-domain socket file for local 1381or remote port forwarding before creating a new one. 1382If the socket file already exists and 1383.Cm StreamLocalBindUnlink 1384is not enabled, 1385.Nm sshd 1386will be unable to forward the port to the Unix-domain socket file. 1387This option is only used for port forwarding to a Unix-domain socket file. 1388.Pp 1389The argument must be 1390.Cm yes 1391or 1392.Cm no . 1393The default is 1394.Cm no . 1395.It Cm StrictModes 1396Specifies whether 1397.Xr sshd 8 1398should check file modes and ownership of the 1399user's files and home directory before accepting login. 1400This is normally desirable because novices sometimes accidentally leave their 1401directory or files world-writable. 1402The default is 1403.Cm yes . 1404Note that this does not apply to 1405.Cm ChrootDirectory , 1406whose permissions and ownership are checked unconditionally. 1407.It Cm Subsystem 1408Configures an external subsystem (e.g. file transfer daemon). 1409Arguments should be a subsystem name and a command (with optional arguments) 1410to execute upon subsystem request. 1411.Pp 1412The command 1413.Cm sftp-server 1414implements the SFTP file transfer subsystem. 1415.Pp 1416Alternately the name 1417.Cm internal-sftp 1418implements an in-process SFTP server. 1419This may simplify configurations using 1420.Cm ChrootDirectory 1421to force a different filesystem root on clients. 1422.Pp 1423By default no subsystems are defined. 1424.It Cm SyslogFacility 1425Gives the facility code that is used when logging messages from 1426.Xr sshd 8 . 1427The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2, 1428LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7. 1429The default is AUTH. 1430.It Cm TCPKeepAlive 1431Specifies whether the system should send TCP keepalive messages to the 1432other side. 1433If they are sent, death of the connection or crash of one 1434of the machines will be properly noticed. 1435However, this means that 1436connections will die if the route is down temporarily, and some people 1437find it annoying. 1438On the other hand, if TCP keepalives are not sent, 1439sessions may hang indefinitely on the server, leaving 1440.Qq ghost 1441users and consuming server resources. 1442.Pp 1443The default is 1444.Cm yes 1445(to send TCP keepalive messages), and the server will notice 1446if the network goes down or the client host crashes. 1447This avoids infinitely hanging sessions. 1448.Pp 1449To disable TCP keepalive messages, the value should be set to 1450.Cm no . 1451.It Cm TrustedUserCAKeys 1452Specifies a file containing public keys of certificate authorities that are 1453trusted to sign user certificates for authentication, or 1454.Cm none 1455to not use one. 1456Keys are listed one per line; empty lines and comments starting with 1457.Ql # 1458are allowed. 1459If a certificate is presented for authentication and has its signing CA key 1460listed in this file, then it may be used for authentication for any user 1461listed in the certificate's principals list. 1462Note that certificates that lack a list of principals will not be permitted 1463for authentication using 1464.Cm TrustedUserCAKeys . 1465For more details on certificates, see the CERTIFICATES section in 1466.Xr ssh-keygen 1 . 1467.It Cm UseBlacklist 1468Specifies whether 1469.Xr sshd 8 1470attempts to send authentication success and failure messages 1471to the 1472.Xr blacklistd 8 1473daemon. 1474The default is 1475.Cm no . 1476.It Cm UseDNS 1477Specifies whether 1478.Xr sshd 8 1479should look up the remote host name, and to check that 1480the resolved host name for the remote IP address maps back to the 1481very same IP address. 1482.Pp 1483If this option is set to 1484.Cm no , 1485then only addresses and not host names may be used in 1486.Pa ~/.ssh/authorized_keys 1487.Cm from 1488and 1489.Nm 1490.Cm Match 1491.Cm Host 1492directives. 1493The default is 1494.Dq yes . 1495.It Cm UsePAM 1496Enables the Pluggable Authentication Module interface. 1497If set to 1498.Cm yes 1499this will enable PAM authentication using 1500.Cm ChallengeResponseAuthentication 1501and 1502.Cm PasswordAuthentication 1503in addition to PAM account and session module processing for all 1504authentication types. 1505.Pp 1506Because PAM challenge-response authentication usually serves an equivalent 1507role to password authentication, you should disable either 1508.Cm PasswordAuthentication 1509or 1510.Cm ChallengeResponseAuthentication. 1511.Pp 1512If 1513.Cm UsePAM 1514is enabled, you will not be able to run 1515.Xr sshd 8 1516as a non-root user. 1517The default is 1518.Cm yes . 1519.It Cm VersionAddendum 1520Optionally specifies additional text to append to the SSH protocol banner 1521sent by the server upon connection. 1522The default is 1523.Qq FreeBSD-20170804 . 1524The value 1525.Cm none 1526may be used to disable this. 1527.It Cm X11DisplayOffset 1528Specifies the first display number available for 1529.Xr sshd 8 Ns 's 1530X11 forwarding. 1531This prevents sshd from interfering with real X11 servers. 1532The default is 10. 1533.It Cm X11Forwarding 1534Specifies whether X11 forwarding is permitted. 1535The argument must be 1536.Cm yes 1537or 1538.Cm no . 1539The default is 1540.Cm yes . 1541.Pp 1542When X11 forwarding is enabled, there may be additional exposure to 1543the server and to client displays if the 1544.Xr sshd 8 1545proxy display is configured to listen on the wildcard address (see 1546.Cm X11UseLocalhost ) , 1547though this is not the default. 1548Additionally, the authentication spoofing and authentication data 1549verification and substitution occur on the client side. 1550The security risk of using X11 forwarding is that the client's X11 1551display server may be exposed to attack when the SSH client requests 1552forwarding (see the warnings for 1553.Cm ForwardX11 1554in 1555.Xr ssh_config 5 ) . 1556A system administrator may have a stance in which they want to 1557protect clients that may expose themselves to attack by unwittingly 1558requesting X11 forwarding, which can warrant a 1559.Cm no 1560setting. 1561.Pp 1562Note that disabling X11 forwarding does not prevent users from 1563forwarding X11 traffic, as users can always install their own forwarders. 1564.It Cm X11UseLocalhost 1565Specifies whether 1566.Xr sshd 8 1567should bind the X11 forwarding server to the loopback address or to 1568the wildcard address. 1569By default, 1570sshd binds the forwarding server to the loopback address and sets the 1571hostname part of the 1572.Ev DISPLAY 1573environment variable to 1574.Cm localhost . 1575This prevents remote hosts from connecting to the proxy display. 1576However, some older X11 clients may not function with this 1577configuration. 1578.Cm X11UseLocalhost 1579may be set to 1580.Cm no 1581to specify that the forwarding server should be bound to the wildcard 1582address. 1583The argument must be 1584.Cm yes 1585or 1586.Cm no . 1587The default is 1588.Cm yes . 1589.It Cm XAuthLocation 1590Specifies the full pathname of the 1591.Xr xauth 1 1592program, or 1593.Cm none 1594to not use one. 1595The default is 1596.Pa /usr/local/bin/xauth . 1597.El 1598.Sh TIME FORMATS 1599.Xr sshd 8 1600command-line arguments and configuration file options that specify time 1601may be expressed using a sequence of the form: 1602.Sm off 1603.Ar time Op Ar qualifier , 1604.Sm on 1605where 1606.Ar time 1607is a positive integer value and 1608.Ar qualifier 1609is one of the following: 1610.Pp 1611.Bl -tag -width Ds -compact -offset indent 1612.It Aq Cm none 1613seconds 1614.It Cm s | Cm S 1615seconds 1616.It Cm m | Cm M 1617minutes 1618.It Cm h | Cm H 1619hours 1620.It Cm d | Cm D 1621days 1622.It Cm w | Cm W 1623weeks 1624.El 1625.Pp 1626Each member of the sequence is added together to calculate 1627the total time value. 1628.Pp 1629Time format examples: 1630.Pp 1631.Bl -tag -width Ds -compact -offset indent 1632.It 600 1633600 seconds (10 minutes) 1634.It 10m 163510 minutes 1636.It 1h30m 16371 hour 30 minutes (90 minutes) 1638.El 1639.Sh TOKENS 1640Arguments to some keywords can make use of tokens, 1641which are expanded at runtime: 1642.Pp 1643.Bl -tag -width XXXX -offset indent -compact 1644.It %% 1645A literal 1646.Sq % . 1647.It %F 1648The fingerprint of the CA key. 1649.It %f 1650The fingerprint of the key or certificate. 1651.It %h 1652The home directory of the user. 1653.It %i 1654The key ID in the certificate. 1655.It %K 1656The base64-encoded CA key. 1657.It %k 1658The base64-encoded key or certificate for authentication. 1659.It %s 1660The serial number of the certificate. 1661.It \&%T 1662The type of the CA key. 1663.It %t 1664The key or certificate type. 1665.It %u 1666The username. 1667.El 1668.Pp 1669.Cm AuthorizedKeysCommand 1670accepts the tokens %%, %f, %h, %k, %t, and %u. 1671.Pp 1672.Cm AuthorizedKeysFile 1673accepts the tokens %%, %h, and %u. 1674.Pp 1675.Cm AuthorizedPrincipalsCommand 1676accepts the tokens %%, %F, %f, %h, %i, %K, %k, %s, %T, %t, and %u. 1677.Pp 1678.Cm AuthorizedPrincipalsFile 1679accepts the tokens %%, %h, and %u. 1680.Pp 1681.Cm ChrootDirectory 1682accepts the tokens %%, %h, and %u. 1683.Sh FILES 1684.Bl -tag -width Ds 1685.It Pa /etc/ssh/sshd_config 1686Contains configuration data for 1687.Xr sshd 8 . 1688This file should be writable by root only, but it is recommended 1689(though not necessary) that it be world-readable. 1690.El 1691.Sh SEE ALSO 1692.Xr sftp-server 8 , 1693.Xr sshd 8 1694.Sh AUTHORS 1695.An -nosplit 1696OpenSSH is a derivative of the original and free 1697ssh 1.2.12 release by 1698.An Tatu Ylonen . 1699.An Aaron Campbell , Bob Beck , Markus Friedl , Niels Provos , 1700.An Theo de Raadt 1701and 1702.An Dug Song 1703removed many bugs, re-added newer features and 1704created OpenSSH. 1705.An Markus Friedl 1706contributed the support for SSH protocol versions 1.5 and 2.0. 1707.An Niels Provos 1708and 1709.An Markus Friedl 1710contributed support for privilege separation. 1711