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.239 2016/11/30 03:00:05 djm Exp $ 37.\" $FreeBSD$ 38.Dd $Mdocdate: November 30 2016 $ 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. 441.Pp 442The supported ciphers are: 443.Pp 444.Bl -item -compact -offset indent 445.It 4463des-cbc 447.It 448aes128-cbc 449.It 450aes192-cbc 451.It 452aes256-cbc 453.It 454aes128-ctr 455.It 456aes192-ctr 457.It 458aes256-ctr 459.It 460aes128-gcm@openssh.com 461.It 462aes256-gcm@openssh.com 463.It 464arcfour 465.It 466arcfour128 467.It 468arcfour256 469.It 470blowfish-cbc 471.It 472cast128-cbc 473.It 474chacha20-poly1305@openssh.com 475.El 476.Pp 477The default is: 478.Bd -literal -offset indent 479chacha20-poly1305@openssh.com, 480aes128-ctr,aes192-ctr,aes256-ctr, 481aes128-gcm@openssh.com,aes256-gcm@openssh.com, 482aes128-cbc,aes192-cbc,aes256-cbc 483.Ed 484.Pp 485The list of available ciphers may also be obtained using 486.Qq ssh -Q cipher . 487.It Cm ClientAliveCountMax 488Sets the number of client alive messages which may be sent without 489.Xr sshd 8 490receiving any messages back from the client. 491If this threshold is reached while client alive messages are being sent, 492sshd will disconnect the client, terminating the session. 493It is important to note that the use of client alive messages is very 494different from 495.Cm TCPKeepAlive . 496The client alive messages are sent through the encrypted channel 497and therefore will not be spoofable. 498The TCP keepalive option enabled by 499.Cm TCPKeepAlive 500is spoofable. 501The client alive mechanism is valuable when the client or 502server depend on knowing when a connection has become inactive. 503.Pp 504The default value is 3. 505If 506.Cm ClientAliveInterval 507is set to 15, and 508.Cm ClientAliveCountMax 509is left at the default, unresponsive SSH clients 510will be disconnected after approximately 45 seconds. 511.It Cm ClientAliveInterval 512Sets a timeout interval in seconds after which if no data has been received 513from the client, 514.Xr sshd 8 515will send a message through the encrypted 516channel to request a response from the client. 517The default 518is 0, indicating that these messages will not be sent to the client. 519.It Cm Compression 520Specifies whether compression is enabled after 521the user has authenticated successfully. 522The argument must be 523.Cm yes , 524.Cm delayed 525(a legacy synonym for 526.Cm yes ) 527or 528.Cm no . 529The default is 530.Cm yes . 531.It Cm DenyGroups 532This keyword can be followed by a list of group name patterns, separated 533by spaces. 534Login is disallowed for users whose primary group or supplementary 535group list matches one of the patterns. 536Only group names are valid; a numerical group ID is not recognized. 537By default, login is allowed for all groups. 538The allow/deny directives are processed in the following order: 539.Cm DenyUsers , 540.Cm AllowUsers , 541.Cm DenyGroups , 542and finally 543.Cm AllowGroups . 544.Pp 545See PATTERNS in 546.Xr ssh_config 5 547for more information on patterns. 548.It Cm DenyUsers 549This keyword can be followed by a list of user name patterns, separated 550by spaces. 551Login is disallowed for user names that match one of the patterns. 552Only user names are valid; a numerical user ID is not recognized. 553By default, login is allowed for all users. 554If the pattern takes the form USER@HOST then USER and HOST 555are separately checked, restricting logins to particular 556users from particular hosts. 557HOST criteria may additionally contain addresses to match in CIDR 558address/masklen format. 559The allow/deny directives are processed in the following order: 560.Cm DenyUsers , 561.Cm AllowUsers , 562.Cm DenyGroups , 563and finally 564.Cm AllowGroups . 565.Pp 566See PATTERNS in 567.Xr ssh_config 5 568for more information on patterns. 569.It Cm DisableForwarding 570Disables all forwarding features, including X11, 571.Xr ssh-agent 1 , 572TCP and StreamLocal. 573This option overrides all other forwarding-related options and may 574simplify restricted configurations. 575.It Cm FingerprintHash 576Specifies the hash algorithm used when logging key fingerprints. 577Valid options are: 578.Cm md5 579and 580.Cm sha256 . 581The default is 582.Cm sha256 . 583.It Cm ForceCommand 584Forces the execution of the command specified by 585.Cm ForceCommand , 586ignoring any command supplied by the client and 587.Pa ~/.ssh/rc 588if present. 589The command is invoked by using the user's login shell with the -c option. 590This applies to shell, command, or subsystem execution. 591It is most useful inside a 592.Cm Match 593block. 594The command originally supplied by the client is available in the 595.Ev SSH_ORIGINAL_COMMAND 596environment variable. 597Specifying a command of 598.Cm internal-sftp 599will force the use of an in-process SFTP server that requires no support 600files when used with 601.Cm ChrootDirectory . 602The default is 603.Cm none . 604.It Cm GatewayPorts 605Specifies whether remote hosts are allowed to connect to ports 606forwarded for the client. 607By default, 608.Xr sshd 8 609binds remote port forwardings to the loopback address. 610This prevents other remote hosts from connecting to forwarded ports. 611.Cm GatewayPorts 612can be used to specify that sshd 613should allow remote port forwardings to bind to non-loopback addresses, thus 614allowing other hosts to connect. 615The argument may be 616.Cm no 617to force remote port forwardings to be available to the local host only, 618.Cm yes 619to force remote port forwardings to bind to the wildcard address, or 620.Cm clientspecified 621to allow the client to select the address to which the forwarding is bound. 622The default is 623.Cm no . 624.It Cm GSSAPIAuthentication 625Specifies whether user authentication based on GSSAPI is allowed. 626The default is 627.Cm no . 628.It Cm GSSAPICleanupCredentials 629Specifies whether to automatically destroy the user's credentials cache 630on logout. 631The default is 632.Cm yes . 633.It Cm GSSAPIStrictAcceptorCheck 634Determines whether to be strict about the identity of the GSSAPI acceptor 635a client authenticates against. 636If set to 637.Cm yes 638then the client must authenticate against the host 639service on the current hostname. 640If set to 641.Cm no 642then the client may authenticate against any service key stored in the 643machine's default store. 644This facility is provided to assist with operation on multi homed machines. 645The default is 646.Cm yes . 647.It Cm HostbasedAcceptedKeyTypes 648Specifies the key types that will be accepted for hostbased authentication 649as a comma-separated pattern list. 650Alternately if the specified value begins with a 651.Sq + 652character, then the specified key types will be appended to the default set 653instead of replacing them. 654The default for this option is: 655.Bd -literal -offset 3n 656ecdsa-sha2-nistp256-cert-v01@openssh.com, 657ecdsa-sha2-nistp384-cert-v01@openssh.com, 658ecdsa-sha2-nistp521-cert-v01@openssh.com, 659ssh-ed25519-cert-v01@openssh.com, 660ssh-rsa-cert-v01@openssh.com, 661ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521, 662ssh-ed25519,ssh-rsa 663.Ed 664.Pp 665The list of available key types may also be obtained using 666.Qq ssh -Q key . 667.It Cm HostbasedAuthentication 668Specifies whether rhosts or /etc/hosts.equiv authentication together 669with successful public key client host authentication is allowed 670(host-based authentication). 671The default is 672.Cm no . 673.It Cm HostbasedUsesNameFromPacketOnly 674Specifies whether or not the server will attempt to perform a reverse 675name lookup when matching the name in the 676.Pa ~/.shosts , 677.Pa ~/.rhosts , 678and 679.Pa /etc/hosts.equiv 680files during 681.Cm HostbasedAuthentication . 682A setting of 683.Cm yes 684means that 685.Xr sshd 8 686uses the name supplied by the client rather than 687attempting to resolve the name from the TCP connection itself. 688The default is 689.Cm no . 690.It Cm HostCertificate 691Specifies a file containing a public host certificate. 692The certificate's public key must match a private host key already specified 693by 694.Cm HostKey . 695The default behaviour of 696.Xr sshd 8 697is not to load any certificates. 698.It Cm HostKey 699Specifies a file containing a private host key 700used by SSH. 701The defaults are 702.Pa /etc/ssh/ssh_host_dsa_key , 703.Pa /etc/ssh/ssh_host_ecdsa_key , 704.Pa /etc/ssh/ssh_host_ed25519_key 705and 706.Pa /etc/ssh/ssh_host_rsa_key . 707.Pp 708Note that 709.Xr sshd 8 710will refuse to use a file if it is group/world-accessible 711and that the 712.Cm HostKeyAlgorithms 713option restricts which of the keys are actually used by 714.Xr sshd 8 . 715.Pp 716It is possible to have multiple host key files. 717It is also possible to specify public host key files instead. 718In this case operations on the private key will be delegated 719to an 720.Xr ssh-agent 1 . 721.It Cm HostKeyAgent 722Identifies the UNIX-domain socket used to communicate 723with an agent that has access to the private host keys. 724If the string 725.Qq SSH_AUTH_SOCK 726is specified, the location of the socket will be read from the 727.Ev SSH_AUTH_SOCK 728environment variable. 729.It Cm HostKeyAlgorithms 730Specifies the host key algorithms 731that the server offers. 732The default for this option is: 733.Bd -literal -offset 3n 734ecdsa-sha2-nistp256-cert-v01@openssh.com, 735ecdsa-sha2-nistp384-cert-v01@openssh.com, 736ecdsa-sha2-nistp521-cert-v01@openssh.com, 737ssh-ed25519-cert-v01@openssh.com, 738ssh-rsa-cert-v01@openssh.com, 739ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521, 740ssh-ed25519,ssh-rsa 741.Ed 742.Pp 743The list of available key types may also be obtained using 744.Qq ssh -Q key . 745.It Cm IgnoreRhosts 746Specifies that 747.Pa .rhosts 748and 749.Pa .shosts 750files will not be used in 751.Cm HostbasedAuthentication . 752.Pp 753.Pa /etc/hosts.equiv 754and 755.Pa /etc/ssh/shosts.equiv 756are still used. 757The default is 758.Cm yes . 759.It Cm IgnoreUserKnownHosts 760Specifies whether 761.Xr sshd 8 762should ignore the user's 763.Pa ~/.ssh/known_hosts 764during 765.Cm HostbasedAuthentication . 766The default is 767.Cm no . 768.It Cm IPQoS 769Specifies the IPv4 type-of-service or DSCP class for the connection. 770Accepted values are 771.Cm af11 , 772.Cm af12 , 773.Cm af13 , 774.Cm af21 , 775.Cm af22 , 776.Cm af23 , 777.Cm af31 , 778.Cm af32 , 779.Cm af33 , 780.Cm af41 , 781.Cm af42 , 782.Cm af43 , 783.Cm cs0 , 784.Cm cs1 , 785.Cm cs2 , 786.Cm cs3 , 787.Cm cs4 , 788.Cm cs5 , 789.Cm cs6 , 790.Cm cs7 , 791.Cm ef , 792.Cm lowdelay , 793.Cm throughput , 794.Cm reliability , 795or a numeric value. 796This option may take one or two arguments, separated by whitespace. 797If one argument is specified, it is used as the packet class unconditionally. 798If two values are specified, the first is automatically selected for 799interactive sessions and the second for non-interactive sessions. 800The default is 801.Cm lowdelay 802for interactive sessions and 803.Cm throughput 804for non-interactive sessions. 805.It Cm KbdInteractiveAuthentication 806Specifies whether to allow keyboard-interactive authentication. 807The argument to this keyword must be 808.Cm yes 809or 810.Cm no . 811The default is to use whatever value 812.Cm ChallengeResponseAuthentication 813is set to 814(by default 815.Cm yes ) . 816.It Cm KerberosAuthentication 817Specifies whether the password provided by the user for 818.Cm PasswordAuthentication 819will be validated through the Kerberos KDC. 820To use this option, the server needs a 821Kerberos servtab which allows the verification of the KDC's identity. 822The default is 823.Cm no . 824.It Cm KerberosGetAFSToken 825If AFS is active and the user has a Kerberos 5 TGT, attempt to acquire 826an AFS token before accessing the user's home directory. 827The default is 828.Cm no . 829.It Cm KerberosOrLocalPasswd 830If password authentication through Kerberos fails then 831the password will be validated via any additional local mechanism 832such as 833.Pa /etc/passwd . 834The default is 835.Cm yes . 836.It Cm KerberosTicketCleanup 837Specifies whether to automatically destroy the user's ticket cache 838file on logout. 839The default is 840.Cm yes . 841.It Cm KexAlgorithms 842Specifies the available KEX (Key Exchange) algorithms. 843Multiple algorithms must be comma-separated. 844Alternately if the specified value begins with a 845.Sq + 846character, then the specified methods will be appended to the default set 847instead of replacing them. 848The supported algorithms are: 849.Pp 850.Bl -item -compact -offset indent 851.It 852curve25519-sha256 853.It 854curve25519-sha256@libssh.org 855.It 856diffie-hellman-group1-sha1 857.It 858diffie-hellman-group14-sha1 859.It 860diffie-hellman-group-exchange-sha1 861.It 862diffie-hellman-group-exchange-sha256 863.It 864ecdh-sha2-nistp256 865.It 866ecdh-sha2-nistp384 867.It 868ecdh-sha2-nistp521 869.El 870.Pp 871The default is: 872.Bd -literal -offset indent 873curve25519-sha256,curve25519-sha256@libssh.org, 874ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521, 875diffie-hellman-group-exchange-sha256, 876diffie-hellman-group14-sha1 877.Ed 878.Pp 879The list of available key exchange algorithms may also be obtained using 880.Qq ssh -Q kex . 881.It Cm ListenAddress 882Specifies the local addresses 883.Xr sshd 8 884should listen on. 885The following forms may be used: 886.Pp 887.Bl -item -offset indent -compact 888.It 889.Cm ListenAddress 890.Sm off 891.Ar host | Ar IPv4_addr | Ar IPv6_addr 892.Sm on 893.It 894.Cm ListenAddress 895.Sm off 896.Ar host | Ar IPv4_addr : Ar port 897.Sm on 898.It 899.Cm ListenAddress 900.Sm off 901.Oo 902.Ar host | Ar IPv6_addr Oc : Ar port 903.Sm on 904.El 905.Pp 906If 907.Ar port 908is not specified, 909sshd will listen on the address and all 910.Cm Port 911options specified. 912The default is to listen on all local addresses. 913Multiple 914.Cm ListenAddress 915options are permitted. 916.It Cm LoginGraceTime 917The server disconnects after this time if the user has not 918successfully logged in. 919If the value is 0, there is no time limit. 920The default is 120 seconds. 921.It Cm LogLevel 922Gives the verbosity level that is used when logging messages from 923.Xr sshd 8 . 924The possible values are: 925QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3. 926The default is INFO. 927DEBUG and DEBUG1 are equivalent. 928DEBUG2 and DEBUG3 each specify higher levels of debugging output. 929Logging with a DEBUG level violates the privacy of users and is not recommended. 930.It Cm MACs 931Specifies the available MAC (message authentication code) algorithms. 932The MAC algorithm is used for data integrity protection. 933Multiple algorithms must be comma-separated. 934If the specified value begins with a 935.Sq + 936character, then the specified algorithms will be appended to the default set 937instead of replacing them. 938.Pp 939The algorithms that contain 940.Qq -etm 941calculate the MAC after encryption (encrypt-then-mac). 942These are considered safer and their use recommended. 943The supported MACs are: 944.Pp 945.Bl -item -compact -offset indent 946.It 947hmac-md5 948.It 949hmac-md5-96 950.It 951hmac-ripemd160 952.It 953hmac-sha1 954.It 955hmac-sha1-96 956.It 957hmac-sha2-256 958.It 959hmac-sha2-512 960.It 961umac-64@openssh.com 962.It 963umac-128@openssh.com 964.It 965hmac-md5-etm@openssh.com 966.It 967hmac-md5-96-etm@openssh.com 968.It 969hmac-ripemd160-etm@openssh.com 970.It 971hmac-sha1-etm@openssh.com 972.It 973hmac-sha1-96-etm@openssh.com 974.It 975hmac-sha2-256-etm@openssh.com 976.It 977hmac-sha2-512-etm@openssh.com 978.It 979umac-64-etm@openssh.com 980.It 981umac-128-etm@openssh.com 982.El 983.Pp 984The default is: 985.Bd -literal -offset indent 986umac-64-etm@openssh.com,umac-128-etm@openssh.com, 987hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com, 988hmac-sha1-etm@openssh.com, 989umac-64@openssh.com,umac-128@openssh.com, 990hmac-sha2-256,hmac-sha2-512,hmac-sha1 991.Ed 992.Pp 993The list of available MAC algorithms may also be obtained using 994.Qq ssh -Q mac . 995.It Cm Match 996Introduces a conditional block. 997If all of the criteria on the 998.Cm Match 999line are satisfied, the keywords on the following lines override those 1000set in the global section of the config file, until either another 1001.Cm Match 1002line or the end of the file. 1003If a keyword appears in multiple 1004.Cm Match 1005blocks that are satisfied, only the first instance of the keyword is 1006applied. 1007.Pp 1008The arguments to 1009.Cm Match 1010are one or more criteria-pattern pairs or the single token 1011.Cm All 1012which matches all criteria. 1013The available criteria are 1014.Cm User , 1015.Cm Group , 1016.Cm Host , 1017.Cm LocalAddress , 1018.Cm LocalPort , 1019and 1020.Cm Address . 1021The match patterns may consist of single entries or comma-separated 1022lists and may use the wildcard and negation operators described in the 1023.Sx PATTERNS 1024section of 1025.Xr ssh_config 5 . 1026.Pp 1027The patterns in an 1028.Cm Address 1029criteria may additionally contain addresses to match in CIDR 1030address/masklen format, 1031such as 192.0.2.0/24 or 2001:db8::/32. 1032Note that the mask length provided must be consistent with the address - 1033it is an error to specify a mask length that is too long for the address 1034or one with bits set in this host portion of the address. 1035For example, 192.0.2.0/33 and 192.0.2.0/8, respectively. 1036.Pp 1037Only a subset of keywords may be used on the lines following a 1038.Cm Match 1039keyword. 1040Available keywords are 1041.Cm AcceptEnv , 1042.Cm AllowAgentForwarding , 1043.Cm AllowGroups , 1044.Cm AllowStreamLocalForwarding , 1045.Cm AllowTcpForwarding , 1046.Cm AllowUsers , 1047.Cm AuthenticationMethods , 1048.Cm AuthorizedKeysCommand , 1049.Cm AuthorizedKeysCommandUser , 1050.Cm AuthorizedKeysFile , 1051.Cm AuthorizedPrincipalsCommand , 1052.Cm AuthorizedPrincipalsCommandUser , 1053.Cm AuthorizedPrincipalsFile , 1054.Cm Banner , 1055.Cm ChrootDirectory , 1056.Cm ClientAliveCountMax , 1057.Cm ClientAliveInterval , 1058.Cm DenyGroups , 1059.Cm DenyUsers , 1060.Cm ForceCommand , 1061.Cm GatewayPorts , 1062.Cm GSSAPIAuthentication , 1063.Cm HostbasedAcceptedKeyTypes , 1064.Cm HostbasedAuthentication , 1065.Cm HostbasedUsesNameFromPacketOnly , 1066.Cm IPQoS , 1067.Cm KbdInteractiveAuthentication , 1068.Cm KerberosAuthentication , 1069.Cm MaxAuthTries , 1070.Cm MaxSessions , 1071.Cm PasswordAuthentication , 1072.Cm PermitEmptyPasswords , 1073.Cm PermitOpen , 1074.Cm PermitRootLogin , 1075.Cm PermitTTY , 1076.Cm PermitTunnel , 1077.Cm PermitUserRC , 1078.Cm PubkeyAcceptedKeyTypes , 1079.Cm PubkeyAuthentication , 1080.Cm RekeyLimit , 1081.Cm RevokedKeys , 1082.Cm StreamLocalBindMask , 1083.Cm StreamLocalBindUnlink , 1084.Cm TrustedUserCAKeys , 1085.Cm X11DisplayOffset , 1086.Cm X11Forwarding 1087and 1088.Cm X11UseLocalHost . 1089.It Cm MaxAuthTries 1090Specifies the maximum number of authentication attempts permitted per 1091connection. 1092Once the number of failures reaches half this value, 1093additional failures are logged. 1094The default is 6. 1095.It Cm MaxSessions 1096Specifies the maximum number of open shell, login or subsystem (e.g. sftp) 1097sessions permitted per network connection. 1098Multiple sessions may be established by clients that support connection 1099multiplexing. 1100Setting 1101.Cm MaxSessions 1102to 1 will effectively disable session multiplexing, whereas setting it to 0 1103will prevent all shell, login and subsystem sessions while still permitting 1104forwarding. 1105The default is 10. 1106.It Cm MaxStartups 1107Specifies the maximum number of concurrent unauthenticated connections to the 1108SSH daemon. 1109Additional connections will be dropped until authentication succeeds or the 1110.Cm LoginGraceTime 1111expires for a connection. 1112The default is 10:30:100. 1113.Pp 1114Alternatively, random early drop can be enabled by specifying 1115the three colon separated values 1116start:rate:full (e.g. "10:30:60"). 1117.Xr sshd 8 1118will refuse connection attempts with a probability of rate/100 (30%) 1119if there are currently start (10) unauthenticated connections. 1120The probability increases linearly and all connection attempts 1121are refused if the number of unauthenticated connections reaches full (60). 1122.It Cm PasswordAuthentication 1123Specifies whether password authentication is allowed. 1124See also 1125.Cm UsePAM . 1126The default is 1127.Cm no . 1128.It Cm PermitEmptyPasswords 1129When password authentication is allowed, it specifies whether the 1130server allows login to accounts with empty password strings. 1131The default is 1132.Cm no . 1133.It Cm PermitOpen 1134Specifies the destinations to which TCP port forwarding is permitted. 1135The forwarding specification must be one of the following forms: 1136.Pp 1137.Bl -item -offset indent -compact 1138.It 1139.Cm PermitOpen 1140.Sm off 1141.Ar host : port 1142.Sm on 1143.It 1144.Cm PermitOpen 1145.Sm off 1146.Ar IPv4_addr : port 1147.Sm on 1148.It 1149.Cm PermitOpen 1150.Sm off 1151.Ar \&[ IPv6_addr \&] : port 1152.Sm on 1153.El 1154.Pp 1155Multiple forwards may be specified by separating them with whitespace. 1156An argument of 1157.Cm any 1158can be used to remove all restrictions and permit any forwarding requests. 1159An argument of 1160.Cm none 1161can be used to prohibit all forwarding requests. 1162The wildcard 1163.Sq * 1164can be used for host or port to allow all hosts or ports, respectively. 1165By default all port forwarding requests are permitted. 1166.It Cm PermitRootLogin 1167Specifies whether root can log in using 1168.Xr ssh 1 . 1169The argument must be 1170.Cm yes , 1171.Cm prohibit-password , 1172.Cm without-password , 1173.Cm forced-commands-only , 1174or 1175.Cm no . 1176The default is 1177.Cm no . 1178Note that if 1179.Cm ChallengeResponseAuthentication 1180and 1181.Cm UsePAM 1182are both 1183.Cm yes , 1184this setting may be overridden by the PAM policy. 1185.Pp 1186If this option is set to 1187.Cm prohibit-password 1188or 1189.Cm without-password , 1190password and keyboard-interactive authentication are disabled for root. 1191.Pp 1192If this option is set to 1193.Cm forced-commands-only , 1194root login with public key authentication will be allowed, 1195but only if the 1196.Ar command 1197option has been specified 1198(which may be useful for taking remote backups even if root login is 1199normally not allowed). 1200All other authentication methods are disabled for root. 1201.Pp 1202If this option is set to 1203.Cm no , 1204root is not allowed to log in. 1205.It Cm PermitTTY 1206Specifies whether 1207.Xr pty 4 1208allocation is permitted. 1209The default is 1210.Cm yes . 1211.It Cm PermitTunnel 1212Specifies whether 1213.Xr tun 4 1214device forwarding is allowed. 1215The argument must be 1216.Cm yes , 1217.Cm point-to-point 1218(layer 3), 1219.Cm ethernet 1220(layer 2), or 1221.Cm no . 1222Specifying 1223.Cm yes 1224permits both 1225.Cm point-to-point 1226and 1227.Cm ethernet . 1228The default is 1229.Cm no . 1230.Pp 1231Independent of this setting, the permissions of the selected 1232.Xr tun 4 1233device must allow access to the user. 1234.It Cm PermitUserEnvironment 1235Specifies whether 1236.Pa ~/.ssh/environment 1237and 1238.Cm environment= 1239options in 1240.Pa ~/.ssh/authorized_keys 1241are processed by 1242.Xr sshd 8 . 1243The default is 1244.Cm no . 1245Enabling environment processing may enable users to bypass access 1246restrictions in some configurations using mechanisms such as 1247.Ev LD_PRELOAD . 1248.It Cm PermitUserRC 1249Specifies whether any 1250.Pa ~/.ssh/rc 1251file is executed. 1252The default is 1253.Cm yes . 1254.It Cm PidFile 1255Specifies the file that contains the process ID of the 1256SSH daemon, or 1257.Cm none 1258to not write one. 1259The default is 1260.Pa /var/run/sshd.pid . 1261.It Cm Port 1262Specifies the port number that 1263.Xr sshd 8 1264listens on. 1265The default is 22. 1266Multiple options of this type are permitted. 1267See also 1268.Cm ListenAddress . 1269.It Cm PrintLastLog 1270Specifies whether 1271.Xr sshd 8 1272should print the date and time of the last user login when a user logs 1273in interactively. 1274The default is 1275.Cm yes . 1276.It Cm PrintMotd 1277Specifies whether 1278.Xr sshd 8 1279should print 1280.Pa /etc/motd 1281when a user logs in interactively. 1282(On some systems it is also printed by the shell, 1283.Pa /etc/profile , 1284or equivalent.) 1285The default is 1286.Cm yes . 1287.It Cm PubkeyAcceptedKeyTypes 1288Specifies the key types that will be accepted for public key authentication 1289as a comma-separated pattern list. 1290Alternately if the specified value begins with a 1291.Sq + 1292character, then the specified key types will be appended to the default set 1293instead of replacing them. 1294The default for this option is: 1295.Bd -literal -offset 3n 1296ecdsa-sha2-nistp256-cert-v01@openssh.com, 1297ecdsa-sha2-nistp384-cert-v01@openssh.com, 1298ecdsa-sha2-nistp521-cert-v01@openssh.com, 1299ssh-ed25519-cert-v01@openssh.com, 1300ssh-rsa-cert-v01@openssh.com, 1301ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521, 1302ssh-ed25519,ssh-rsa 1303.Ed 1304.Pp 1305The list of available key types may also be obtained using 1306.Qq ssh -Q key . 1307.It Cm PubkeyAuthentication 1308Specifies whether public key authentication is allowed. 1309The default is 1310.Cm yes . 1311.It Cm RekeyLimit 1312Specifies the maximum amount of data that may be transmitted before the 1313session key is renegotiated, optionally followed a maximum amount of 1314time that may pass before the session key is renegotiated. 1315The first argument is specified in bytes and may have a suffix of 1316.Sq K , 1317.Sq M , 1318or 1319.Sq G 1320to indicate Kilobytes, Megabytes, or Gigabytes, respectively. 1321The default is between 1322.Sq 1G 1323and 1324.Sq 4G , 1325depending on the cipher. 1326The optional second value is specified in seconds and may use any of the 1327units documented in the 1328.Sx TIME FORMATS 1329section. 1330The default value for 1331.Cm RekeyLimit 1332is 1333.Cm default none , 1334which means that rekeying is performed after the cipher's default amount 1335of data has been sent or received and no time based rekeying is done. 1336.It Cm RevokedKeys 1337Specifies revoked public keys file, or 1338.Cm none 1339to not use one. 1340Keys listed in this file will be refused for public key authentication. 1341Note that if this file is not readable, then public key authentication will 1342be refused for all users. 1343Keys may be specified as a text file, listing one public key per line, or as 1344an OpenSSH Key Revocation List (KRL) as generated by 1345.Xr ssh-keygen 1 . 1346For more information on KRLs, see the KEY REVOCATION LISTS section in 1347.Xr ssh-keygen 1 . 1348.It Cm StreamLocalBindMask 1349Sets the octal file creation mode mask 1350.Pq umask 1351used when creating a Unix-domain socket file for local or remote 1352port forwarding. 1353This option is only used for port forwarding to a Unix-domain socket file. 1354.Pp 1355The default value is 0177, which creates a Unix-domain socket file that is 1356readable and writable only by the owner. 1357Note that not all operating systems honor the file mode on Unix-domain 1358socket files. 1359.It Cm StreamLocalBindUnlink 1360Specifies whether to remove an existing Unix-domain socket file for local 1361or remote port forwarding before creating a new one. 1362If the socket file already exists and 1363.Cm StreamLocalBindUnlink 1364is not enabled, 1365.Nm sshd 1366will be unable to forward the port to the Unix-domain socket file. 1367This option is only used for port forwarding to a Unix-domain socket file. 1368.Pp 1369The argument must be 1370.Cm yes 1371or 1372.Cm no . 1373The default is 1374.Cm no . 1375.It Cm StrictModes 1376Specifies whether 1377.Xr sshd 8 1378should check file modes and ownership of the 1379user's files and home directory before accepting login. 1380This is normally desirable because novices sometimes accidentally leave their 1381directory or files world-writable. 1382The default is 1383.Cm yes . 1384Note that this does not apply to 1385.Cm ChrootDirectory , 1386whose permissions and ownership are checked unconditionally. 1387.It Cm Subsystem 1388Configures an external subsystem (e.g. file transfer daemon). 1389Arguments should be a subsystem name and a command (with optional arguments) 1390to execute upon subsystem request. 1391.Pp 1392The command 1393.Cm sftp-server 1394implements the SFTP file transfer subsystem. 1395.Pp 1396Alternately the name 1397.Cm internal-sftp 1398implements an in-process SFTP server. 1399This may simplify configurations using 1400.Cm ChrootDirectory 1401to force a different filesystem root on clients. 1402.Pp 1403By default no subsystems are defined. 1404.It Cm SyslogFacility 1405Gives the facility code that is used when logging messages from 1406.Xr sshd 8 . 1407The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2, 1408LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7. 1409The default is AUTH. 1410.It Cm TCPKeepAlive 1411Specifies whether the system should send TCP keepalive messages to the 1412other side. 1413If they are sent, death of the connection or crash of one 1414of the machines will be properly noticed. 1415However, this means that 1416connections will die if the route is down temporarily, and some people 1417find it annoying. 1418On the other hand, if TCP keepalives are not sent, 1419sessions may hang indefinitely on the server, leaving 1420.Qq ghost 1421users and consuming server resources. 1422.Pp 1423The default is 1424.Cm yes 1425(to send TCP keepalive messages), and the server will notice 1426if the network goes down or the client host crashes. 1427This avoids infinitely hanging sessions. 1428.Pp 1429To disable TCP keepalive messages, the value should be set to 1430.Cm no . 1431.It Cm TrustedUserCAKeys 1432Specifies a file containing public keys of certificate authorities that are 1433trusted to sign user certificates for authentication, or 1434.Cm none 1435to not use one. 1436Keys are listed one per line; empty lines and comments starting with 1437.Ql # 1438are allowed. 1439If a certificate is presented for authentication and has its signing CA key 1440listed in this file, then it may be used for authentication for any user 1441listed in the certificate's principals list. 1442Note that certificates that lack a list of principals will not be permitted 1443for authentication using 1444.Cm TrustedUserCAKeys . 1445For more details on certificates, see the CERTIFICATES section in 1446.Xr ssh-keygen 1 . 1447.It Cm UseBlacklist 1448Specifies whether 1449.Xr sshd 8 1450attempts to send authentication success and failure messages 1451to the 1452.Xr blacklistd 8 1453daemon. 1454The default is 1455.Cm no . 1456.It Cm UseDNS 1457Specifies whether 1458.Xr sshd 8 1459should look up the remote host name, and to check that 1460the resolved host name for the remote IP address maps back to the 1461very same IP address. 1462.Pp 1463If this option is set to 1464.Cm no , 1465then only addresses and not host names may be used in 1466.Pa ~/.ssh/authorized_keys 1467.Cm from 1468and 1469.Nm 1470.Cm Match 1471.Cm Host 1472directives. 1473The default is 1474.Dq yes . 1475.It Cm UsePAM 1476Enables the Pluggable Authentication Module interface. 1477If set to 1478.Cm yes 1479this will enable PAM authentication using 1480.Cm ChallengeResponseAuthentication 1481and 1482.Cm PasswordAuthentication 1483in addition to PAM account and session module processing for all 1484authentication types. 1485.Pp 1486Because PAM challenge-response authentication usually serves an equivalent 1487role to password authentication, you should disable either 1488.Cm PasswordAuthentication 1489or 1490.Cm ChallengeResponseAuthentication. 1491.Pp 1492If 1493.Cm UsePAM 1494is enabled, you will not be able to run 1495.Xr sshd 8 1496as a non-root user. 1497The default is 1498.Cm yes . 1499.It Cm UsePrivilegeSeparation 1500Specifies whether 1501.Xr sshd 8 1502separates privileges by creating an unprivileged child process 1503to deal with incoming network traffic. 1504After successful authentication, another process will be created that has 1505the privilege of the authenticated user. 1506The goal of privilege separation is to prevent privilege 1507escalation by containing any corruption within the unprivileged processes. 1508The argument must be 1509.Cm yes , 1510.Cm no , 1511or 1512.Cm sandbox . 1513If 1514.Cm UsePrivilegeSeparation 1515is set to 1516.Cm sandbox 1517then the pre-authentication unprivileged process is subject to additional 1518restrictions. 1519The default is 1520.Cm sandbox . 1521.It Cm VersionAddendum 1522Optionally specifies additional text to append to the SSH protocol banner 1523sent by the server upon connection. 1524The default is 1525.Qq FreeBSD-20170305 . 1526The value 1527.Cm none 1528may be used to disable this. 1529.It Cm X11DisplayOffset 1530Specifies the first display number available for 1531.Xr sshd 8 Ns 's 1532X11 forwarding. 1533This prevents sshd from interfering with real X11 servers. 1534The default is 10. 1535.It Cm X11Forwarding 1536Specifies whether X11 forwarding is permitted. 1537The argument must be 1538.Cm yes 1539or 1540.Cm no . 1541The default is 1542.Cm yes . 1543.Pp 1544When X11 forwarding is enabled, there may be additional exposure to 1545the server and to client displays if the 1546.Xr sshd 8 1547proxy display is configured to listen on the wildcard address (see 1548.Cm X11UseLocalhost ) , 1549though this is not the default. 1550Additionally, the authentication spoofing and authentication data 1551verification and substitution occur on the client side. 1552The security risk of using X11 forwarding is that the client's X11 1553display server may be exposed to attack when the SSH client requests 1554forwarding (see the warnings for 1555.Cm ForwardX11 1556in 1557.Xr ssh_config 5 ) . 1558A system administrator may have a stance in which they want to 1559protect clients that may expose themselves to attack by unwittingly 1560requesting X11 forwarding, which can warrant a 1561.Cm no 1562setting. 1563.Pp 1564Note that disabling X11 forwarding does not prevent users from 1565forwarding X11 traffic, as users can always install their own forwarders. 1566.It Cm X11UseLocalhost 1567Specifies whether 1568.Xr sshd 8 1569should bind the X11 forwarding server to the loopback address or to 1570the wildcard address. 1571By default, 1572sshd binds the forwarding server to the loopback address and sets the 1573hostname part of the 1574.Ev DISPLAY 1575environment variable to 1576.Cm localhost . 1577This prevents remote hosts from connecting to the proxy display. 1578However, some older X11 clients may not function with this 1579configuration. 1580.Cm X11UseLocalhost 1581may be set to 1582.Cm no 1583to specify that the forwarding server should be bound to the wildcard 1584address. 1585The argument must be 1586.Cm yes 1587or 1588.Cm no . 1589The default is 1590.Cm yes . 1591.It Cm XAuthLocation 1592Specifies the full pathname of the 1593.Xr xauth 1 1594program, or 1595.Cm none 1596to not use one. 1597The default is 1598.Pa /usr/local/bin/xauth . 1599.El 1600.Sh TIME FORMATS 1601.Xr sshd 8 1602command-line arguments and configuration file options that specify time 1603may be expressed using a sequence of the form: 1604.Sm off 1605.Ar time Op Ar qualifier , 1606.Sm on 1607where 1608.Ar time 1609is a positive integer value and 1610.Ar qualifier 1611is one of the following: 1612.Pp 1613.Bl -tag -width Ds -compact -offset indent 1614.It Aq Cm none 1615seconds 1616.It Cm s | Cm S 1617seconds 1618.It Cm m | Cm M 1619minutes 1620.It Cm h | Cm H 1621hours 1622.It Cm d | Cm D 1623days 1624.It Cm w | Cm W 1625weeks 1626.El 1627.Pp 1628Each member of the sequence is added together to calculate 1629the total time value. 1630.Pp 1631Time format examples: 1632.Pp 1633.Bl -tag -width Ds -compact -offset indent 1634.It 600 1635600 seconds (10 minutes) 1636.It 10m 163710 minutes 1638.It 1h30m 16391 hour 30 minutes (90 minutes) 1640.El 1641.Sh TOKENS 1642Arguments to some keywords can make use of tokens, 1643which are expanded at runtime: 1644.Pp 1645.Bl -tag -width XXXX -offset indent -compact 1646.It %% 1647A literal 1648.Sq % . 1649.It %F 1650The fingerprint of the CA key. 1651.It %f 1652The fingerprint of the key or certificate. 1653.It %h 1654The home directory of the user. 1655.It %i 1656The key ID in the certificate. 1657.It %K 1658The base64-encoded CA key. 1659.It %k 1660The base64-encoded key or certificate for authentication. 1661.It %s 1662The serial number of the certificate. 1663.It \&%T 1664The type of the CA key. 1665.It %t 1666The key or certificate type. 1667.It %u 1668The username. 1669.El 1670.Pp 1671.Cm AuthorizedKeysCommand 1672accepts the tokens %%, %f, %h, %t, and %u. 1673.Pp 1674.Cm AuthorizedKeysFile 1675accepts the tokens %%, %h, and %u. 1676.Pp 1677.Cm AuthorizedPrincipalsCommand 1678accepts the tokens %%, %F, %f, %K, %k, %h, %i, %s, %T, %t, and %u. 1679.Pp 1680.Cm AuthorizedPrincipalsFile 1681accepts the tokens %%, %h, and %u. 1682.Pp 1683.Cm ChrootDirectory 1684accepts the tokens %%, %h, and %u. 1685.Sh FILES 1686.Bl -tag -width Ds 1687.It Pa /etc/ssh/sshd_config 1688Contains configuration data for 1689.Xr sshd 8 . 1690This file should be writable by root only, but it is recommended 1691(though not necessary) that it be world-readable. 1692.El 1693.Sh SEE ALSO 1694.Xr sftp-server 8 , 1695.Xr sshd 8 1696.Sh AUTHORS 1697.An -nosplit 1698OpenSSH is a derivative of the original and free 1699ssh 1.2.12 release by 1700.An Tatu Ylonen . 1701.An Aaron Campbell , Bob Beck , Markus Friedl , Niels Provos , 1702.An Theo de Raadt 1703and 1704.An Dug Song 1705removed many bugs, re-added newer features and 1706created OpenSSH. 1707.An Markus Friedl 1708contributed the support for SSH protocol versions 1.5 and 2.0. 1709.An Niels Provos 1710and 1711.An Markus Friedl 1712contributed support for privilege separation. 1713