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