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