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