1.\" $NetBSD: sshd_config.5,v 1.46 2024/09/24 21:32:19 christos Exp $ 2.\" 3.\" Author: Tatu Ylonen <ylo@cs.hut.fi> 4.\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 5.\" All rights reserved 6.\" 7.\" As far as I am concerned, the code I have written for this software 8.\" can be used freely for any purpose. Any derived versions of this 9.\" software must be clearly marked as such, and if the derived work is 10.\" incompatible with the protocol description in the RFC file, it must be 11.\" called by a name other than "ssh" or "Secure Shell". 12.\" 13.\" Copyright (c) 1999,2000 Markus Friedl. All rights reserved. 14.\" Copyright (c) 1999 Aaron Campbell. All rights reserved. 15.\" Copyright (c) 1999 Theo de Raadt. All rights reserved. 16.\" 17.\" Redistribution and use in source and binary forms, with or without 18.\" modification, are permitted provided that the following conditions 19.\" are met: 20.\" 1. Redistributions of source code must retain the above copyright 21.\" notice, this list of conditions and the following disclaimer. 22.\" 2. Redistributions in binary form must reproduce the above copyright 23.\" notice, this list of conditions and the following disclaimer in the 24.\" documentation and/or other materials provided with the distribution. 25.\" 26.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 27.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 28.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 29.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 30.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 31.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 32.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 33.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 34.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 35.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 36.\" 37.\" $OpenBSD: sshd_config.5,v 1.374 2024/09/15 08:27:38 jmc Exp $ 38.Dd September 15 2024 39.Dt SSHD_CONFIG 5 40.Os 41.Sh NAME 42.Nm sshd_config 43.Nd OpenSSH 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. 52Unless noted otherwise, for 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 70and 71.Cm SetEnv 72in 73.Xr ssh_config 5 74for how to configure the client. 75The 76.Ev TERM 77environment variable is always accepted whenever the client 78requests a pseudo-terminal as it is required by the protocol. 79Variables are specified by name, which may contain the wildcard characters 80.Ql * 81and 82.Ql \&? . 83Multiple environment variables may be separated by whitespace or spread 84across multiple 85.Cm AcceptEnv 86directives. 87Be warned that some environment variables could be used to bypass restricted 88user environments. 89For this reason, care should be taken in the use of this directive. 90The default is not to accept any environment variables. 91.It Cm AddressFamily 92Specifies which address family should be used by 93.Xr sshd 8 . 94Valid arguments are 95.Cm any 96(the default), 97.Cm inet 98(use IPv4 only), or 99.Cm inet6 100(use IPv6 only). 101.It Cm AllowAgentForwarding 102Specifies whether 103.Xr ssh-agent 1 104forwarding is permitted. 105The default is 106.Cm yes . 107Note that disabling agent forwarding does not improve security 108unless users are also denied shell access, as they can always install 109their own forwarders. 110.It Cm AllowGroups 111This keyword can be followed by a list of group name patterns, separated 112by spaces. 113If specified, login is allowed only for users whose primary 114group or supplementary group list matches one of the patterns. 115Only group names are valid; a numerical group ID is not recognized. 116By default, login is allowed for all groups. 117The allow/deny groups directives are processed in the following order: 118.Cm DenyGroups , 119.Cm AllowGroups . 120.Pp 121See PATTERNS in 122.Xr ssh_config 5 123for more information on patterns. 124This keyword may appear multiple times in 125.Nm 126with each instance appending to the list. 127.It Cm AllowStreamLocalForwarding 128Specifies whether StreamLocal (Unix-domain socket) forwarding is permitted. 129The available options are 130.Cm yes 131(the default) 132or 133.Cm all 134to allow StreamLocal forwarding, 135.Cm no 136to prevent all StreamLocal forwarding, 137.Cm local 138to allow local (from the perspective of 139.Xr ssh 1 ) 140forwarding only or 141.Cm remote 142to allow remote forwarding only. 143Note that disabling StreamLocal forwarding does not improve security unless 144users are also denied shell access, as they can always install their 145own forwarders. 146.It Cm AllowTcpForwarding 147Specifies whether TCP forwarding is permitted. 148The available options are 149.Cm yes 150(the default) 151or 152.Cm all 153to allow TCP forwarding, 154.Cm no 155to prevent all TCP forwarding, 156.Cm local 157to allow local (from the perspective of 158.Xr ssh 1 ) 159forwarding only or 160.Cm remote 161to allow remote forwarding only. 162Note that disabling TCP forwarding does not improve security unless 163users are also denied shell access, as they can always install their 164own forwarders. 165.It Cm AllowUsers 166This keyword can be followed by a list of user name patterns, separated 167by spaces. 168If specified, login is allowed only for user names that 169match one of the patterns. 170Only user names are valid; a numerical user ID is not recognized. 171By default, login is allowed for all users. 172If the pattern takes the form USER@HOST then USER and HOST 173are separately checked, restricting logins to particular 174users from particular hosts. 175HOST criteria may additionally contain addresses to match in CIDR 176address/masklen format. 177The allow/deny users directives are processed in the following order: 178.Cm DenyUsers , 179.Cm AllowUsers . 180.Pp 181See PATTERNS in 182.Xr ssh_config 5 183for more information on patterns. 184This keyword may appear multiple times in 185.Nm 186with each instance appending to the list. 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 lists of comma-separated 191authentication method names, or by the single string 192.Cm any 193to indicate the default behaviour of accepting any single authentication 194method. 195If the default is overridden, then successful authentication requires 196completion of every method in at least one of these lists. 197.Pp 198For example, 199.Qq publickey,password publickey,keyboard-interactive 200would require the user to complete public key authentication, followed by 201either password or keyboard interactive authentication. 202Only methods that are next in one or more lists are offered at each stage, 203so for this example it would not be possible to attempt password or 204keyboard-interactive authentication before public key. 205.Pp 206For keyboard interactive authentication it is also possible to 207restrict authentication to a specific device by appending a 208colon followed by the device identifier 209.Cm bsdauth , 210.Cm pam , 211or 212.Cm skey , 213depending on the server configuration. 214For example, 215.Qq keyboard-interactive:bsdauth 216would restrict keyboard interactive authentication to the 217.Cm bsdauth 218device. 219.Pp 220If the publickey method is listed more than once, 221.Xr sshd 8 222verifies that keys that have been used successfully are not reused for 223subsequent authentications. 224For example, 225.Qq publickey,publickey 226requires successful authentication using two different public keys. 227.Pp 228Note that each authentication method listed should also be explicitly enabled 229in the configuration. 230.Pp 231The available authentication methods are: 232.Qq gssapi-with-mic , 233.Qq hostbased , 234.Qq keyboard-interactive , 235.Qq none 236(used for access to password-less accounts when 237.Cm PermitEmptyPasswords 238is enabled), 239.Qq password 240and 241.Qq publickey . 242.It Cm AuthorizedKeysCommand 243Specifies a program to be used to look up the user's public keys. 244The program must be owned by root, not writable by group or others and 245specified by an absolute path. 246Arguments to 247.Cm AuthorizedKeysCommand 248accept the tokens described in the 249.Sx TOKENS 250section. 251If no arguments are specified then the username of the target user is used. 252.Pp 253The program should produce on standard output zero or 254more lines of authorized_keys output (see 255.Sx AUTHORIZED_KEYS 256in 257.Xr sshd 8 ) . 258.Cm AuthorizedKeysCommand 259is tried after the usual 260.Cm AuthorizedKeysFile 261files and will not be executed if a matching key is found there. 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 AUTHORIZED_KEYS FILE FORMAT section of 281.Xr sshd 8 . 282Arguments to 283.Cm AuthorizedKeysFile 284accept the tokens described in the 285.Sx TOKENS 286section. 287After expansion, 288.Cm AuthorizedKeysFile 289is taken to be an absolute path or one relative to the user's home 290directory. 291Multiple files may be listed, separated by whitespace. 292Alternately this option may be set to 293.Cm none 294to skip checking for user keys in files. 295The default is 296.Qq .ssh/authorized_keys .ssh/authorized_keys2 . 297.It Cm AuthorizedPrincipalsCommand 298Specifies a program to be used to generate the list of allowed 299certificate principals as per 300.Cm AuthorizedPrincipalsFile . 301The program must be owned by root, not writable by group or others and 302specified by an absolute path. 303Arguments to 304.Cm AuthorizedPrincipalsCommand 305accept the tokens described in the 306.Sx TOKENS 307section. 308If no arguments are specified then the username of the target user is used. 309.Pp 310The program should produce on standard output zero or 311more lines of 312.Cm AuthorizedPrincipalsFile 313output. 314If either 315.Cm AuthorizedPrincipalsCommand 316or 317.Cm AuthorizedPrincipalsFile 318is specified, then certificates offered by the client for authentication 319must contain a principal that is listed. 320By default, no 321.Cm AuthorizedPrincipalsCommand 322is run. 323.It Cm AuthorizedPrincipalsCommandUser 324Specifies the user under whose account the 325.Cm AuthorizedPrincipalsCommand 326is run. 327It is recommended to use a dedicated user that has no other role on the host 328than running authorized principals commands. 329If 330.Cm AuthorizedPrincipalsCommand 331is specified but 332.Cm AuthorizedPrincipalsCommandUser 333is not, then 334.Xr sshd 8 335will refuse to start. 336.It Cm AuthorizedPrincipalsFile 337Specifies a file that lists principal names that are accepted for 338certificate authentication. 339When using certificates signed by a key listed in 340.Cm TrustedUserCAKeys , 341this file lists names, one of which must appear in the certificate for it 342to be accepted for authentication. 343Names are listed one per line preceded by key options (as described in 344.Sx AUTHORIZED_KEYS FILE FORMAT 345in 346.Xr sshd 8 ) . 347Empty lines and comments starting with 348.Ql # 349are ignored. 350.Pp 351Arguments to 352.Cm AuthorizedPrincipalsFile 353accept the tokens described in the 354.Sx TOKENS 355section. 356After expansion, 357.Cm AuthorizedPrincipalsFile 358is taken to be an absolute path or one relative to the user's home directory. 359The default is 360.Cm none , 361i.e. not to use a principals file \(en in this case, the username 362of the user must appear in a certificate's principals list for it to be 363accepted. 364.Pp 365Note that 366.Cm AuthorizedPrincipalsFile 367is only used when authentication proceeds using a CA listed in 368.Cm TrustedUserCAKeys 369and is not consulted for certification authorities trusted via 370.Pa ~/.ssh/authorized_keys , 371though the 372.Cm principals= 373key option offers a similar facility (see 374.Xr sshd 8 375for details). 376.It Cm Banner 377The contents of the specified file are sent to the remote user before 378authentication is allowed. 379If the argument is 380.Cm none 381then no banner is displayed. 382By default, no banner is displayed. 383.It Cm CASignatureAlgorithms 384Specifies which algorithms are allowed for signing of certificates 385by certificate authorities (CAs). 386The default is: 387.Bd -literal -offset indent 388ssh-ed25519,ecdsa-sha2-nistp256, 389ecdsa-sha2-nistp384,ecdsa-sha2-nistp521, 390sk-ssh-ed25519@openssh.com, 391sk-ecdsa-sha2-nistp256@openssh.com, 392rsa-sha2-512,rsa-sha2-256 393.Ed 394.Pp 395If the specified list begins with a 396.Sq + 397character, then the specified algorithms will be appended to the default set 398instead of replacing them. 399If the specified list begins with a 400.Sq - 401character, then the specified algorithms (including wildcards) will be removed 402from the default set instead of replacing them. 403.Pp 404Certificates signed using other algorithms will not be accepted for 405public key or host-based authentication. 406.It Cm ChannelTimeout 407Specifies whether and how quickly 408.Xr sshd 8 409should close inactive channels. 410Timeouts are specified as one or more 411.Dq type=interval 412pairs separated by whitespace, where the 413.Dq type 414must be the special keyword 415.Dq global 416or a channel type name from the list below, optionally containing 417wildcard characters. 418.Pp 419The timeout value 420.Dq interval 421is specified in seconds or may use any of the units documented in the 422.Sx TIME FORMATS 423section. 424For example, 425.Dq session=5m 426would cause interactive sessions to terminate after five minutes of 427inactivity. 428Specifying a zero value disables the inactivity timeout. 429.Pp 430The special timeout 431.Dq global 432applies to all active channels, taken together. 433Traffic on any active channel will reset the timeout, but when the timeout 434expires then all open channels will be closed. 435Note that this global timeout is not matched by wildcards and must be 436specified explicitly. 437.Pp 438The available channel type names include: 439.Bl -tag -width Ds 440.It Cm agent-connection 441Open connections to 442.Xr ssh-agent 1 . 443.It Cm direct-tcpip , Cm direct-streamlocal@openssh.com 444Open TCP or Unix socket (respectively) connections that have 445been established from a 446.Xr ssh 1 447local forwarding, i.e.\& 448.Cm LocalForward 449or 450.Cm DynamicForward . 451.It Cm forwarded-tcpip , Cm forwarded-streamlocal@openssh.com 452Open TCP or Unix socket (respectively) connections that have been 453established to a 454.Xr sshd 8 455listening on behalf of a 456.Xr ssh 1 457remote forwarding, i.e.\& 458.Cm RemoteForward . 459.It Cm session 460The interactive main session, including shell session, command execution, 461.Xr scp 1 , 462.Xr sftp 1 , 463etc. 464.It Cm tun-connection 465Open 466.Cm TunnelForward 467connections. 468.It Cm x11-connection 469Open X11 forwarding sessions. 470.El 471.Pp 472Note that in all the above cases, terminating an inactive session does not 473guarantee to remove all resources associated with the session, e.g. shell 474processes or X11 clients relating to the session may continue to execute. 475.Pp 476Moreover, terminating an inactive channel or session does not necessarily 477close the SSH connection, nor does it prevent a client from 478requesting another channel of the same type. 479In particular, expiring an inactive forwarding session does not prevent 480another identical forwarding from being subsequently created. 481.Pp 482The default is not to expire channels of any type for inactivity. 483.It Cm ChrootDirectory 484Specifies the pathname of a directory to 485.Xr chroot 2 486to after authentication. 487At session startup 488.Xr sshd 8 489checks that all components of the pathname are root-owned directories 490which are not writable by group or others. 491After the chroot, 492.Xr sshd 8 493changes the working directory to the user's home directory. 494Arguments to 495.Cm ChrootDirectory 496accept the tokens described in the 497.Sx TOKENS 498section. 499.Pp 500The 501.Cm ChrootDirectory 502must contain the necessary files and directories to support the 503user's session. 504For an interactive session this requires at least a shell, typically 505.Xr sh 1 , 506and basic 507.Pa /dev 508nodes such as 509.Xr null 4 , 510.Xr zero 4 , 511.Xr stdin 4 , 512.Xr stdout 4 , 513.Xr stderr 4 , 514and 515.Xr tty 4 516devices. 517For file transfer sessions using SFTP 518no additional configuration of the environment is necessary if the in-process 519sftp-server is used, 520though sessions which use logging may require 521.Pa /dev/log 522inside the chroot directory on some operating systems (see 523.Xr sftp-server 8 524for details). 525.Pp 526For safety, it is very important that the directory hierarchy be 527prevented from modification by other processes on the system (especially 528those outside the jail). 529Misconfiguration can lead to unsafe environments which 530.Xr sshd 8 531cannot detect. 532.Pp 533The default is 534.Cm none , 535indicating not to 536.Xr chroot 2 . 537.It Cm Ciphers 538Specifies the ciphers allowed. 539Multiple ciphers must be comma-separated. 540If the specified list begins with a 541.Sq + 542character, then the specified ciphers will be appended to the default set 543instead of replacing them. 544If the specified list begins with a 545.Sq - 546character, then the specified ciphers (including wildcards) will be removed 547from the default set instead of replacing them. 548If the specified list begins with a 549.Sq ^ 550character, then the specified ciphers will be placed at the head of the 551default set. 552.Pp 553The supported ciphers are: 554.Pp 555.Bl -item -compact -offset indent 556.It 5573des-cbc 558.It 559aes128-cbc 560.It 561aes192-cbc 562.It 563aes256-cbc 564.It 565aes128-ctr 566.It 567aes192-ctr 568.It 569aes256-ctr 570.It 571aes128-gcm@openssh.com 572.It 573aes256-gcm@openssh.com 574.It 575chacha20-poly1305@openssh.com 576.El 577.Pp 578The default is: 579.Bd -literal -offset indent 580chacha20-poly1305@openssh.com, 581aes128-ctr,aes192-ctr,aes256-ctr, 582aes128-gcm@openssh.com,aes256-gcm@openssh.com 583.Ed 584.Pp 585The list of available ciphers may also be obtained using 586.Qq ssh -Q cipher . 587.It Cm ClientAliveCountMax 588Sets the number of client alive messages which may be sent without 589.Xr sshd 8 590receiving any messages back from the client. 591If this threshold is reached while client alive messages are being sent, 592sshd will disconnect the client, terminating the session. 593It is important to note that the use of client alive messages is very 594different from 595.Cm TCPKeepAlive . 596The client alive messages are sent through the encrypted channel 597and therefore will not be spoofable. 598The TCP keepalive option enabled by 599.Cm TCPKeepAlive 600is spoofable. 601The client alive mechanism is valuable when the client or 602server depend on knowing when a connection has become unresponsive. 603.Pp 604The default value is 3. 605If 606.Cm ClientAliveInterval 607is set to 15, and 608.Cm ClientAliveCountMax 609is left at the default, unresponsive SSH clients 610will be disconnected after approximately 45 seconds. 611Setting a zero 612.Cm ClientAliveCountMax 613disables connection termination. 614.It Cm ClientAliveInterval 615Sets a timeout interval in seconds after which if no data has been received 616from the client, 617.Xr sshd 8 618will send a message through the encrypted 619channel to request a response from the client. 620The default 621is 0, indicating that these messages will not be sent to the client. 622.It Cm Compression 623Specifies whether compression is enabled after 624the user has authenticated successfully. 625The argument must be 626.Cm yes , 627.Cm delayed 628(a legacy synonym for 629.Cm yes ) 630or 631.Cm no . 632The default is 633.Cm yes . 634.It Cm DenyGroups 635This keyword can be followed by a list of group name patterns, separated 636by spaces. 637Login is disallowed for users whose primary group or supplementary 638group list matches one of the patterns. 639Only group names are valid; a numerical group ID is not recognized. 640By default, login is allowed for all groups. 641The allow/deny groups directives are processed in the following order: 642.Cm DenyGroups , 643.Cm AllowGroups . 644.Pp 645See PATTERNS in 646.Xr ssh_config 5 647for more information on patterns. 648This keyword may appear multiple times in 649.Nm 650with each instance appending to the list. 651.It Cm DenyUsers 652This keyword can be followed by a list of user name patterns, separated 653by spaces. 654Login is disallowed for user names that match one of the patterns. 655Only user names are valid; a numerical user ID is not recognized. 656By default, login is allowed for all users. 657If the pattern takes the form USER@HOST then USER and HOST 658are separately checked, restricting logins to particular 659users from particular hosts. 660HOST criteria may additionally contain addresses to match in CIDR 661address/masklen format. 662The allow/deny users directives are processed in the following order: 663.Cm DenyUsers , 664.Cm AllowUsers . 665.Pp 666See PATTERNS in 667.Xr ssh_config 5 668for more information on patterns. 669This keyword may appear multiple times in 670.Nm 671with each instance appending to the list. 672.It Cm DisableForwarding 673Disables all forwarding features, including X11, 674.Xr ssh-agent 1 , 675TCP and StreamLocal. 676This option overrides all other forwarding-related options and may 677simplify restricted configurations. 678.It Cm ExposeAuthInfo 679Writes a temporary file containing a list of authentication methods and 680public credentials (e.g. keys) used to authenticate the user. 681The location of the file is exposed to the user session through the 682.Ev SSH_USER_AUTH 683environment variable. 684The default is 685.Cm no . 686.It Cm FingerprintHash 687Specifies the hash algorithm used when logging key fingerprints. 688Valid options are: 689.Cm md5 690and 691.Cm sha256 . 692The default is 693.Cm sha256 . 694.It Cm ForceCommand 695Forces the execution of the command specified by 696.Cm ForceCommand , 697ignoring any command supplied by the client and 698.Pa ~/.ssh/rc 699if present. 700The command is invoked by using the user's login shell with the -c option. 701This applies to shell, command, or subsystem execution. 702It is most useful inside a 703.Cm Match 704block. 705The command originally supplied by the client is available in the 706.Ev SSH_ORIGINAL_COMMAND 707environment variable. 708Specifying a command of 709.Cm internal-sftp 710will force the use of an in-process SFTP server that requires no support 711files when used with 712.Cm ChrootDirectory . 713The default is 714.Cm none . 715.It Cm GatewayPorts 716Specifies whether remote hosts are allowed to connect to ports 717forwarded for the client. 718By default, 719.Xr sshd 8 720binds remote port forwardings to the loopback address. 721This prevents other remote hosts from connecting to forwarded ports. 722.Cm GatewayPorts 723can be used to specify that sshd 724should allow remote port forwardings to bind to non-loopback addresses, thus 725allowing other hosts to connect. 726The argument may be 727.Cm no 728to force remote port forwardings to be available to the local host only, 729.Cm yes 730to force remote port forwardings to bind to the wildcard address, or 731.Cm clientspecified 732to allow the client to select the address to which the forwarding is bound. 733The default is 734.Cm no . 735.It Cm GSSAPIAuthentication 736Specifies whether user authentication based on GSSAPI is allowed. 737The default is 738.Cm no . 739.It Cm GSSAPICleanupCredentials 740Specifies whether to automatically destroy the user's credentials cache 741on logout. 742The default is 743.Cm yes . 744.It Cm GSSAPIStrictAcceptorCheck 745Determines whether to be strict about the identity of the GSSAPI acceptor 746a client authenticates against. 747If set to 748.Cm yes 749then the client must authenticate against the host 750service on the current hostname. 751If set to 752.Cm no 753then the client may authenticate against any service key stored in the 754machine's default store. 755This facility is provided to assist with operation on multi homed machines. 756The default is 757.Cm yes . 758.It Cm HostbasedAcceptedAlgorithms 759Specifies the signature algorithms that will be accepted for hostbased 760authentication as a list of comma-separated patterns. 761Alternately if the specified list begins with a 762.Sq + 763character, then the specified signature algorithms will be appended to 764the default set instead of replacing them. 765If the specified list begins with a 766.Sq - 767character, then the specified signature algorithms (including wildcards) 768will be removed from the default set instead of replacing them. 769If the specified list begins with a 770.Sq ^ 771character, then the specified signature algorithms will be placed at 772the head of the default set. 773The default for this option is: 774.Bd -literal -offset 3n 775ssh-ed25519-cert-v01@openssh.com, 776ecdsa-sha2-nistp256-cert-v01@openssh.com, 777ecdsa-sha2-nistp384-cert-v01@openssh.com, 778ecdsa-sha2-nistp521-cert-v01@openssh.com, 779sk-ssh-ed25519-cert-v01@openssh.com, 780sk-ecdsa-sha2-nistp256-cert-v01@openssh.com, 781rsa-sha2-512-cert-v01@openssh.com, 782rsa-sha2-256-cert-v01@openssh.com, 783ssh-ed25519, 784ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521, 785sk-ssh-ed25519@openssh.com, 786sk-ecdsa-sha2-nistp256@openssh.com, 787rsa-sha2-512,rsa-sha2-256 788.Ed 789.Pp 790The list of available signature algorithms may also be obtained using 791.Qq ssh -Q HostbasedAcceptedAlgorithms . 792This was formerly named HostbasedAcceptedKeyTypes. 793.It Cm HostbasedAuthentication 794Specifies whether rhosts or /etc/hosts.equiv authentication together 795with successful public key client host authentication is allowed 796(host-based authentication). 797The default is 798.Cm no . 799.It Cm HostbasedUsesNameFromPacketOnly 800Specifies whether or not the server will attempt to perform a reverse 801name lookup when matching the name in the 802.Pa ~/.shosts , 803.Pa ~/.rhosts , 804and 805.Pa /etc/hosts.equiv 806files during 807.Cm HostbasedAuthentication . 808A setting of 809.Cm yes 810means that 811.Xr sshd 8 812uses the name supplied by the client rather than 813attempting to resolve the name from the TCP connection itself. 814The default is 815.Cm no . 816.It Cm HostCertificate 817Specifies a file containing a public host certificate. 818The certificate's public key must match a private host key already specified 819by 820.Cm HostKey . 821The default behaviour of 822.Xr sshd 8 823is not to load any certificates. 824.It Cm HostKey 825Specifies a file containing a private host key 826used by SSH. 827The defaults are 828.Pa /etc/ssh/ssh_host_ecdsa_key , 829.Pa /etc/ssh/ssh_host_ed25519_key 830and 831.Pa /etc/ssh/ssh_host_rsa_key . 832.Pp 833Note that 834.Xr sshd 8 835will refuse to use a file if it is group/world-accessible 836and that the 837.Cm HostKeyAlgorithms 838option restricts which of the keys are actually used by 839.Xr sshd 8 . 840.Pp 841It is possible to have multiple host key files. 842It is also possible to specify public host key files instead. 843In this case operations on the private key will be delegated 844to an 845.Xr ssh-agent 1 . 846.It Cm HostKeyAgent 847Identifies the UNIX-domain socket used to communicate 848with an agent that has access to the private host keys. 849If the string 850.Qq SSH_AUTH_SOCK 851is specified, the location of the socket will be read from the 852.Ev SSH_AUTH_SOCK 853environment variable. 854.It Cm HostKeyAlgorithms 855Specifies the host key signature algorithms 856that the server offers. 857The default for this option is: 858.Bd -literal -offset 3n 859ssh-ed25519-cert-v01@openssh.com, 860ecdsa-sha2-nistp256-cert-v01@openssh.com, 861ecdsa-sha2-nistp384-cert-v01@openssh.com, 862ecdsa-sha2-nistp521-cert-v01@openssh.com, 863sk-ssh-ed25519-cert-v01@openssh.com, 864sk-ecdsa-sha2-nistp256-cert-v01@openssh.com, 865rsa-sha2-512-cert-v01@openssh.com, 866rsa-sha2-256-cert-v01@openssh.com, 867ssh-ed25519, 868ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521, 869sk-ssh-ed25519@openssh.com, 870sk-ecdsa-sha2-nistp256@openssh.com, 871rsa-sha2-512,rsa-sha2-256 872.Ed 873.Pp 874The list of available signature algorithms may also be obtained using 875.Qq ssh -Q HostKeyAlgorithms . 876.It Cm IgnoreRhosts 877Specifies whether to ignore per-user 878.Pa .rhosts 879and 880.Pa .shosts 881files during 882.Cm HostbasedAuthentication . 883The system-wide 884.Pa /etc/hosts.equiv 885and 886.Pa /etc/shosts.equiv 887are still used regardless of this setting. 888.Pp 889Accepted values are 890.Cm yes 891(the default) to ignore all per-user files, 892.Cm shosts-only 893to allow the use of 894.Pa .shosts 895but to ignore 896.Pa .rhosts 897or 898.Cm no 899to allow both 900.Pa .shosts 901and 902.Pa rhosts . 903.It Cm IgnoreUserKnownHosts 904Specifies whether 905.Xr sshd 8 906should ignore the user's 907.Pa ~/.ssh/known_hosts 908during 909.Cm HostbasedAuthentication 910and use only the system-wide known hosts file 911.Pa /etc/ssh/ssh_known_hosts . 912The default is 913.Dq no . 914.It Cm Include 915Include the specified configuration file(s). 916Multiple pathnames may be specified and each pathname may contain 917.Xr glob 7 918wildcards that will be expanded and processed in lexical order. 919Files without absolute paths are assumed to be in 920.Pa /etc/ssh . 921An 922.Cm Include 923directive may appear inside a 924.Cm Match 925block 926to perform conditional inclusion. 927.It Cm IPQoS 928Specifies the IPv4 type-of-service or DSCP class for the connection. 929Accepted values are 930.Cm af11 , 931.Cm af12 , 932.Cm af13 , 933.Cm af21 , 934.Cm af22 , 935.Cm af23 , 936.Cm af31 , 937.Cm af32 , 938.Cm af33 , 939.Cm af41 , 940.Cm af42 , 941.Cm af43 , 942.Cm cs0 , 943.Cm cs1 , 944.Cm cs2 , 945.Cm cs3 , 946.Cm cs4 , 947.Cm cs5 , 948.Cm cs6 , 949.Cm cs7 , 950.Cm ef , 951.Cm le , 952.Cm lowdelay , 953.Cm throughput , 954.Cm reliability , 955a numeric value, or 956.Cm none 957to use the operating system default. 958This option may take one or two arguments, separated by whitespace. 959If one argument is specified, it is used as the packet class unconditionally. 960If two values are specified, the first is automatically selected for 961interactive sessions and the second for non-interactive sessions. 962The default is 963.Cm af21 964(Low-Latency Data) 965for interactive sessions and 966.Cm cs1 967(Lower Effort) 968for non-interactive sessions. 969.It Cm KbdInteractiveAuthentication 970Specifies whether to allow keyboard-interactive authentication. 971All authentication styles from 972.Xr login.conf 5 973are supported. 974The default is 975.Cm yes . 976The argument to this keyword must be 977.Cm yes 978or 979.Cm no . 980.Cm ChallengeResponseAuthentication 981is a deprecated alias for this. 982.It Cm KerberosAuthentication 983Specifies whether the password provided by the user for 984.Cm PasswordAuthentication 985will be validated through the Kerberos KDC. 986To use this option, the server needs a 987Kerberos servtab which allows the verification of the KDC's identity. 988The default is 989.Cm no . 990.It Cm KerberosGetAFSToken 991If AFS is active and the user has a Kerberos 5 TGT, attempt to acquire 992an AFS token before accessing the user's home directory. 993The default is 994.Cm no . 995.It Cm KerberosOrLocalPasswd 996If password authentication through Kerberos fails then 997the password will be validated via any additional local mechanism 998such as 999.Pa /etc/passwd . 1000The default is 1001.Cm yes . 1002.It Cm KerberosTicketCleanup 1003Specifies whether to automatically destroy the user's ticket cache 1004file on logout. 1005The default is 1006.Cm yes . 1007.It Cm KexAlgorithms 1008Specifies the permitted KEX (Key Exchange) algorithms that the server will 1009offer to clients. 1010The ordering of this list is not important, as the client specifies the 1011preference order. 1012Multiple algorithms must be comma-separated. 1013.Pp 1014If the specified list begins with a 1015.Sq + 1016character, then the specified algorithms will be appended to the default set 1017instead of replacing them. 1018If the specified list begins with a 1019.Sq - 1020character, then the specified algorithms (including wildcards) will be removed 1021from the default set instead of replacing them. 1022If the specified list begins with a 1023.Sq ^ 1024character, then the specified algorithms will be placed at the head of the 1025default set. 1026.Pp 1027The supported algorithms are: 1028.Pp 1029.Bl -item -compact -offset indent 1030.It 1031curve25519-sha256 1032.It 1033curve25519-sha256@libssh.org 1034.It 1035diffie-hellman-group1-sha1 1036.It 1037diffie-hellman-group14-sha1 1038.It 1039diffie-hellman-group14-sha256 1040.It 1041diffie-hellman-group16-sha512 1042.It 1043diffie-hellman-group18-sha512 1044.It 1045diffie-hellman-group-exchange-sha1 1046.It 1047diffie-hellman-group-exchange-sha256 1048.It 1049ecdh-sha2-nistp256 1050.It 1051ecdh-sha2-nistp384 1052.It 1053ecdh-sha2-nistp521 1054.It 1055mlkem768x25519-sha256 1056.It 1057sntrup761x25519-sha512 1058.It 1059sntrup761x25519-sha512@openssh.com 1060.El 1061.Pp 1062The default is: 1063.Bd -literal -offset indent 1064sntrup761x25519-sha512,sntrup761x25519-sha512@openssh.com, 1065mlkem768x25519-sha256, 1066curve25519-sha256,curve25519-sha256@libssh.org, 1067ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521, 1068diffie-hellman-group-exchange-sha256, 1069diffie-hellman-group16-sha512,diffie-hellman-group18-sha512, 1070diffie-hellman-group14-sha256 1071.Ed 1072.Pp 1073The list of supported key exchange algorithms may also be obtained using 1074.Qq ssh -Q KexAlgorithms . 1075.It Cm ListenAddress 1076Specifies the local addresses 1077.Xr sshd 8 1078should listen on. 1079The following forms may be used: 1080.Pp 1081.Bl -item -offset indent -compact 1082.It 1083.Cm ListenAddress 1084.Sm off 1085.Ar hostname | address 1086.Sm on 1087.Op Cm rdomain Ar domain 1088.It 1089.Cm ListenAddress 1090.Sm off 1091.Ar hostname : port 1092.Sm on 1093.Op Cm rdomain Ar domain 1094.It 1095.Cm ListenAddress 1096.Sm off 1097.Ar IPv4_address : port 1098.Sm on 1099.Op Cm rdomain Ar domain 1100.It 1101.Cm ListenAddress 1102.Sm off 1103.Oo Ar hostname | address Oc : Ar port 1104.Sm on 1105.Op Cm rdomain Ar domain 1106.El 1107.Pp 1108The optional 1109.Cm rdomain 1110qualifier requests 1111.Xr sshd 8 1112listen in an explicit routing domain. 1113If 1114.Ar port 1115is not specified, 1116sshd will listen on the address and all 1117.Cm Port 1118options specified. 1119The default is to listen on all local addresses on the current default 1120routing domain. 1121Multiple 1122.Cm ListenAddress 1123options are permitted. 1124For more information on routing domains, see 1125.Xr rdomain 4 . 1126.It Cm LoginGraceTime 1127The server disconnects after this time if the user has not 1128successfully logged in. 1129If the value is 0, there is no time limit. 1130The default is 120 seconds but the default 1131.Pa /etc/ssh/sshd_config 1132overwrites it to 600 seconds. 1133.It Cm LogLevel 1134Gives the verbosity level that is used when logging messages from 1135.Xr sshd 8 . 1136The possible values are: 1137QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3. 1138The default is INFO. 1139DEBUG and DEBUG1 are equivalent. 1140DEBUG2 and DEBUG3 each specify higher levels of debugging output. 1141Logging with a DEBUG level violates the privacy of users and is not recommended. 1142.It Cm LogVerbose 1143Specify one or more overrides to 1144.Cm LogLevel . 1145An override consists of one or more pattern lists that matches the 1146source file, function and line number to force detailed logging for. 1147For example, an override pattern of: 1148.Bd -literal -offset indent 1149kex.c:*:1000,*:kex_exchange_identification():*,packet.c:* 1150.Ed 1151.Pp 1152would enable detailed logging for line 1000 of 1153.Pa kex.c , 1154everything in the 1155.Fn kex_exchange_identification 1156function, and all code in the 1157.Pa packet.c 1158file. 1159This option is intended for debugging and no overrides are enabled by default. 1160.It Cm MACs 1161Specifies the available MAC (message authentication code) algorithms. 1162The MAC algorithm is used for data integrity protection. 1163Multiple algorithms must be comma-separated. 1164If the specified list begins with a 1165.Sq + 1166character, then the specified algorithms will be appended to the default set 1167instead of replacing them. 1168If the specified list begins with a 1169.Sq - 1170character, then the specified algorithms (including wildcards) will be removed 1171from the default set instead of replacing them. 1172If the specified list begins with a 1173.Sq ^ 1174character, then the specified algorithms will be placed at the head of the 1175default set. 1176.Pp 1177The algorithms that contain 1178.Qq -etm 1179calculate the MAC after encryption (encrypt-then-mac). 1180These are considered safer and their use recommended. 1181The supported MACs are: 1182.Pp 1183.Bl -item -compact -offset indent 1184.It 1185hmac-md5 1186.It 1187hmac-md5-96 1188.It 1189hmac-sha1 1190.It 1191hmac-sha1-96 1192.It 1193hmac-sha2-256 1194.It 1195hmac-sha2-512 1196.It 1197umac-64@openssh.com 1198.It 1199umac-128@openssh.com 1200.It 1201hmac-md5-etm@openssh.com 1202.It 1203hmac-md5-96-etm@openssh.com 1204.It 1205hmac-sha1-etm@openssh.com 1206.It 1207hmac-sha1-96-etm@openssh.com 1208.It 1209hmac-sha2-256-etm@openssh.com 1210.It 1211hmac-sha2-512-etm@openssh.com 1212.It 1213umac-64-etm@openssh.com 1214.It 1215umac-128-etm@openssh.com 1216.El 1217.Pp 1218The default is: 1219.Bd -literal -offset indent 1220umac-64-etm@openssh.com,umac-128-etm@openssh.com, 1221hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com, 1222hmac-sha1-etm@openssh.com, 1223umac-64@openssh.com,umac-128@openssh.com, 1224hmac-sha2-256,hmac-sha2-512,hmac-sha1 1225.Ed 1226.Pp 1227The list of available MAC algorithms may also be obtained using 1228.Qq ssh -Q mac . 1229.It Cm Match 1230Introduces a conditional block. 1231If all of the criteria on the 1232.Cm Match 1233line are satisfied, the keywords on the following lines override those 1234set in the global section of the config file, until either another 1235.Cm Match 1236line or the end of the file. 1237If a keyword appears in multiple 1238.Cm Match 1239blocks that are satisfied, only the first instance of the keyword is 1240applied. 1241.Pp 1242The arguments to 1243.Cm Match 1244are one or more criteria-pattern pairs or one of the single token criteria: 1245.Cm All , 1246which matches all criteria, or 1247.Cm Invalid-User , 1248which matches when the requested user-name does not match any known account. 1249The available criteria are 1250.Cm User , 1251.Cm Group , 1252.Cm Host , 1253.Cm LocalAddress , 1254.Cm LocalPort , 1255.Cm RDomain , 1256and 1257.Cm Address 1258(with 1259.Cm RDomain 1260representing the 1261.Xr rdomain 4 1262on which the connection was received). 1263.Pp 1264The match patterns may consist of single entries or comma-separated 1265lists and may use the wildcard and negation operators described in the 1266.Sx PATTERNS 1267section of 1268.Xr ssh_config 5 . 1269.Pp 1270The patterns in an 1271.Cm Address 1272criteria may additionally contain addresses to match in CIDR 1273address/masklen format, 1274such as 192.0.2.0/24 or 2001:db8::/32. 1275Note that the mask length provided must be consistent with the address - 1276it is an error to specify a mask length that is too long for the address 1277or one with bits set in this host portion of the address. 1278For example, 192.0.2.0/33 and 192.0.2.0/8, respectively. 1279.Pp 1280Only a subset of keywords may be used on the lines following a 1281.Cm Match 1282keyword. 1283Available keywords are 1284.Cm AcceptEnv , 1285.Cm AllowAgentForwarding , 1286.Cm AllowGroups , 1287.Cm AllowStreamLocalForwarding , 1288.Cm AllowTcpForwarding , 1289.Cm AllowUsers , 1290.Cm AuthenticationMethods , 1291.Cm AuthorizedKeysCommand , 1292.Cm AuthorizedKeysCommandUser , 1293.Cm AuthorizedKeysFile , 1294.Cm AuthorizedPrincipalsCommand , 1295.Cm AuthorizedPrincipalsCommandUser , 1296.Cm AuthorizedPrincipalsFile , 1297.Cm Banner , 1298.Cm CASignatureAlgorithms , 1299.Cm ChannelTimeout , 1300.Cm ChrootDirectory , 1301.Cm ClientAliveCountMax , 1302.Cm ClientAliveInterval , 1303.Cm DenyGroups , 1304.Cm DenyUsers , 1305.Cm DisableForwarding , 1306.Cm ExposeAuthInfo , 1307.Cm ForceCommand , 1308.Cm GatewayPorts , 1309.Cm GSSAPIAuthentication , 1310.Cm HostbasedAcceptedAlgorithms , 1311.Cm HostbasedAuthentication , 1312.Cm HostbasedUsesNameFromPacketOnly , 1313.Cm IgnoreRhosts , 1314.Cm Include , 1315.Cm IPQoS , 1316.Cm KbdInteractiveAuthentication , 1317.Cm KerberosAuthentication , 1318.Cm LogLevel , 1319.Cm MaxAuthTries , 1320.Cm MaxSessions , 1321.Cm PAMServiceName , 1322.Cm PasswordAuthentication , 1323.Cm PermitEmptyPasswords , 1324.Cm PermitListen , 1325.Cm PermitOpen , 1326.Cm PermitRootLogin , 1327.Cm PermitTTY , 1328.Cm PermitTunnel , 1329.Cm PermitUserRC , 1330.Cm PubkeyAcceptedAlgorithms , 1331.Cm PubkeyAuthentication , 1332.Cm PubkeyAuthOptions , 1333.Cm RefuseConnection , 1334.Cm RekeyLimit , 1335.Cm RevokedKeys , 1336.Cm RDomain , 1337.Cm SetEnv , 1338.Cm StreamLocalBindMask , 1339.Cm StreamLocalBindUnlink , 1340.Cm TrustedUserCAKeys , 1341.Cm UnusedConnectionTimeout , 1342.Cm X11DisplayOffset , 1343.Cm X11Forwarding 1344and 1345.Cm X11UseLocalhost . 1346.It Cm MaxAuthTries 1347Specifies the maximum number of authentication attempts permitted per 1348connection. 1349Once the number of failures reaches half this value, 1350additional failures are logged. 1351The default is 6. 1352.It Cm MaxSessions 1353Specifies the maximum number of open shell, login or subsystem (e.g. sftp) 1354sessions permitted per network connection. 1355Multiple sessions may be established by clients that support connection 1356multiplexing. 1357Setting 1358.Cm MaxSessions 1359to 1 will effectively disable session multiplexing, whereas setting it to 0 1360will prevent all shell, login and subsystem sessions while still permitting 1361forwarding. 1362The default is 10. 1363.It Cm MaxStartups 1364Specifies the maximum number of concurrent unauthenticated connections to the 1365SSH daemon. 1366Additional connections will be dropped until authentication succeeds or the 1367.Cm LoginGraceTime 1368expires for a connection. 1369The default is 10:30:100. 1370.Pp 1371Alternatively, random early drop can be enabled by specifying 1372the three colon separated values 1373start:rate:full (e.g. "10:30:60"). 1374.Xr sshd 8 1375will refuse connection attempts with a probability of rate/100 (30%) 1376if there are currently start (10) unauthenticated connections. 1377The probability increases linearly and all connection attempts 1378are refused if the number of unauthenticated connections reaches full (60). 1379.It Cm ModuliFile 1380Specifies the 1381.Xr moduli 5 1382file that contains the Diffie-Hellman groups used for the 1383.Dq diffie-hellman-group-exchange-sha1 1384and 1385.Dq diffie-hellman-group-exchange-sha256 1386key exchange methods. 1387The default is 1388.Pa /etc/moduli . 1389.It Cm PAMServiceName 1390Specifies the service name used for Pluggable Authentication Modules (PAM) 1391authentication, authorisation and session controls when 1392.Cm UsePAM 1393is enabled. 1394The default is 1395.Cm sshd . 1396.It Cm PasswordAuthentication 1397Specifies whether password authentication is allowed. 1398The default is 1399.Cm yes . 1400.It Cm PermitEmptyPasswords 1401When password authentication is allowed, it specifies whether the 1402server allows login to accounts with empty password strings. 1403The default is 1404.Cm no . 1405.It Cm PermitListen 1406Specifies the addresses/ports on which a remote TCP port forwarding may listen. 1407The listen specification must be one of the following forms: 1408.Pp 1409.Bl -item -offset indent -compact 1410.It 1411.Cm PermitListen 1412.Sm off 1413.Ar port 1414.Sm on 1415.It 1416.Cm PermitListen 1417.Sm off 1418.Ar host : port 1419.Sm on 1420.El 1421.Pp 1422Multiple permissions may be specified by separating them with whitespace. 1423An argument of 1424.Cm any 1425can be used to remove all restrictions and permit any listen requests. 1426An argument of 1427.Cm none 1428can be used to prohibit all listen requests. 1429The host name may contain wildcards as described in the PATTERNS section in 1430.Xr ssh_config 5 . 1431The wildcard 1432.Sq * 1433can also be used in place of a port number to allow all ports. 1434By default all port forwarding listen requests are permitted. 1435Note that the 1436.Cm GatewayPorts 1437option may further restrict which addresses may be listened on. 1438Note also that 1439.Xr ssh 1 1440will request a listen host of 1441.Dq localhost 1442if no listen host was specifically requested, and this name is 1443treated differently to explicit localhost addresses of 1444.Dq 127.0.0.1 1445and 1446.Dq ::1 . 1447.It Cm PermitOpen 1448Specifies the destinations to which TCP port forwarding is permitted. 1449The forwarding specification must be one of the following forms: 1450.Pp 1451.Bl -item -offset indent -compact 1452.It 1453.Cm PermitOpen 1454.Sm off 1455.Ar host : port 1456.Sm on 1457.It 1458.Cm PermitOpen 1459.Sm off 1460.Ar IPv4_addr : port 1461.Sm on 1462.It 1463.Cm PermitOpen 1464.Sm off 1465.Ar \&[ IPv6_addr \&] : port 1466.Sm on 1467.El 1468.Pp 1469Multiple forwards may be specified by separating them with whitespace. 1470An argument of 1471.Cm any 1472can be used to remove all restrictions and permit any forwarding requests. 1473An argument of 1474.Cm none 1475can be used to prohibit all forwarding requests. 1476The wildcard 1477.Sq * 1478can be used for host or port to allow all hosts or ports respectively. 1479Otherwise, no pattern matching or address lookups are performed on supplied 1480names. 1481By default all port forwarding requests are permitted. 1482.It Cm PermitRootLogin 1483Specifies whether root can log in using 1484.Xr ssh 1 . 1485The argument must be 1486.Cm yes , 1487.Cm prohibit-password , 1488.Cm forced-commands-only , 1489or 1490.Cm no . 1491The default is 1492.Cm prohibit-password . 1493.Pp 1494If this option is set to 1495.Cm prohibit-password 1496(or its deprecated alias, 1497.Cm without-password ) , 1498password and keyboard-interactive authentication are disabled for root. 1499.Pp 1500If this option is set to 1501.Cm forced-commands-only , 1502root login with public key authentication will be allowed, 1503but only if the 1504.Ar command 1505option has been specified 1506(which may be useful for taking remote backups even if root login is 1507normally not allowed). 1508All other authentication methods are disabled for root. 1509.Pp 1510If this option is set to 1511.Cm no , 1512root is not allowed to log in. 1513.It Cm PermitTTY 1514Specifies whether 1515.Xr pty 4 1516allocation is permitted. 1517The default is 1518.Cm yes . 1519.It Cm PermitTunnel 1520Specifies whether 1521.Xr tun 4 1522device forwarding is allowed. 1523The argument must be 1524.Cm yes , 1525.Cm point-to-point 1526(layer 3), 1527.Cm ethernet 1528(layer 2), or 1529.Cm no . 1530Specifying 1531.Cm yes 1532permits both 1533.Cm point-to-point 1534and 1535.Cm ethernet . 1536The default is 1537.Cm no . 1538.Pp 1539Independent of this setting, the permissions of the selected 1540.Xr tun 4 1541device must allow access to the user. 1542.It Cm PermitUserEnvironment 1543Specifies whether 1544.Pa ~/.ssh/environment 1545and 1546.Cm environment= 1547options in 1548.Pa ~/.ssh/authorized_keys 1549are processed by 1550.Xr sshd 8 . 1551Valid options are 1552.Cm yes , 1553.Cm no 1554or a pattern-list specifying which environment variable names to accept 1555(for example 1556.Qq LANG,LC_* ) . 1557The default is 1558.Cm no . 1559Enabling environment processing may enable users to bypass access 1560restrictions in some configurations using mechanisms such as 1561.Ev LD_PRELOAD . 1562.It Cm PermitUserRC 1563Specifies whether any 1564.Pa ~/.ssh/rc 1565file is executed. 1566The default is 1567.Cm yes . 1568.It Cm PerSourceMaxStartups 1569Specifies the number of unauthenticated connections allowed from a 1570given source address, or 1571.Dq none 1572if there is no limit. 1573This limit is applied in addition to 1574.Cm MaxStartups , 1575whichever is lower. 1576The default is 1577.Cm none . 1578.It Cm PerSourceNetBlockSize 1579Specifies the number of bits of source address that are grouped together 1580for the purposes of applying PerSourceMaxStartups limits. 1581Values for IPv4 and optionally IPv6 may be specified, separated by a colon. 1582The default is 1583.Cm 32:128 , 1584which means each address is considered individually. 1585.It Cm PerSourcePenalties 1586Controls penalties for various conditions that may represent attacks on 1587.Xr sshd 8 . 1588If a penalty is enforced against a client then its source address and any 1589others in the same network, as defined by 1590.Cm PerSourceNetBlockSize , 1591will be refused connection for a period. 1592.Pp 1593A penalty doesn't affect concurrent connections in progress, but multiple 1594penalties from the same source from concurrent connections will accumulate 1595up to a maximum. 1596Conversely, penalties are not applied until a minimum threshold time has been 1597accumulated. 1598.Pp 1599Penalties are enabled by default with the default settings listed below 1600but may disabled using the 1601.Cm no 1602keyword. 1603The defaults may be overridden by specifying one or more of the keywords below, 1604separated by whitespace. 1605All keywords accept arguments, e.g.\& 1606.Qq crash:2m . 1607.Bl -tag -width Ds 1608.It Cm crash:duration 1609Specifies how long to refuse clients that cause a crash of 1610.Xr sshd 8 (default: 90s). 1611.It Cm authfail:duration 1612Specifies how long to refuse clients that disconnect after making one or more 1613unsuccessful authentication attempts (default: 5s). 1614.It Cm refuseconnection:duration 1615Specifies how long to refuse clients that were administratively prohibited 1616connection via the 1617.Cm RefuseConnection 1618option (default: 10s). 1619.It Cm noauth:duration 1620Specifies how long to refuse clients that disconnect without attempting 1621authentication (default: 1s). 1622This timeout should be used cautiously otherwise it may penalise legitimate 1623scanning tools such as 1624.Xr ssh-keyscan 1 . 1625.It Cm grace-exceeded:duration 1626Specifies how long to refuse clients that fail to authenticate after 1627.Cm LoginGraceTime 1628(default: 10s). 1629.It Cm max:duration 1630Specifies the maximum time a particular source address range will be refused 1631access for (default: 10m). 1632Repeated penalties will accumulate up to this maximum. 1633.It Cm min:duration 1634Specifies the minimum penalty that must accrue before enforcement begins 1635(default: 15s). 1636.It Cm max-sources4:number , max-sources6:number 1637Specifies the maximum number of client IPv4 and IPv6 address ranges to 1638track for penalties (default: 65536 for both). 1639.It Cm overflow:mode 1640Controls how the server behaves when 1641.Cm max-sources4 1642or 1643.Cm max-sources6 1644is exceeded. 1645There are two operating modes: 1646.Cm deny-all , 1647which denies all incoming connections other than those exempted via 1648.Cm PerSourcePenaltyExemptList 1649until a penalty expires, and 1650.Cm permissive , 1651which allows new connections by removing existing penalties early 1652(default: permissive). 1653Note that client penalties below the 1654.Cm min 1655threshold count against the total number of tracked penalties. 1656IPv4 and IPv6 addresses are tracked separately, so an overflow in one will 1657not affect the other. 1658.It Cm overflow6:mode 1659Allows specifying a different overflow mode for IPv6 addresses. 1660The default it to use the same overflow mode as was specified for IPv4. 1661.El 1662.It Cm PerSourcePenaltyExemptList 1663Specifies a comma-separated list of addresses to exempt from penalties. 1664This list may contain wildcards and CIDR address/masklen ranges. 1665Note that the mask length provided must be consistent with the address - 1666it is an error to specify a mask length that is too long for the address 1667or one with bits set in this host portion of the address. 1668For example, 192.0.2.0/33 and 192.0.2.0/8, respectively. 1669The default is not to exempt any addresses. 1670.It Cm PidFile 1671Specifies the file that contains the process ID of the 1672SSH daemon, or 1673.Cm none 1674to not write one. 1675The default is 1676.Pa /var/run/sshd.pid . 1677.It Cm Port 1678Specifies the port number that 1679.Xr sshd 8 1680listens on. 1681The default is 22. 1682Multiple options of this type are permitted. 1683See also 1684.Cm ListenAddress . 1685.It Cm PrintLastLog 1686Specifies whether 1687.Xr sshd 8 1688should print the date and time of the last user login when a user logs 1689in interactively. 1690The default is 1691.Cm yes . 1692.It Cm PrintMotd 1693Specifies whether 1694.Xr sshd 8 1695should print 1696.Pa /etc/motd 1697when a user logs in interactively. 1698(On some systems it is also printed by the shell, 1699.Pa /etc/profile , 1700or equivalent.) 1701The default is 1702.Cm yes . 1703.It Cm PubkeyAcceptedAlgorithms 1704Specifies the signature algorithms that will be accepted for public key 1705authentication as a list of comma-separated patterns. 1706Alternately if the specified list begins with a 1707.Sq + 1708character, then the specified algorithms will be appended to the default set 1709instead of replacing them. 1710If the specified list begins with a 1711.Sq - 1712character, then the specified algorithms (including wildcards) will be removed 1713from the default set instead of replacing them. 1714If the specified list begins with a 1715.Sq ^ 1716character, then the specified algorithms will be placed at the head of the 1717default set. 1718The default for this option is: 1719.Bd -literal -offset 3n 1720ssh-ed25519-cert-v01@openssh.com, 1721ecdsa-sha2-nistp256-cert-v01@openssh.com, 1722ecdsa-sha2-nistp384-cert-v01@openssh.com, 1723ecdsa-sha2-nistp521-cert-v01@openssh.com, 1724sk-ssh-ed25519-cert-v01@openssh.com, 1725sk-ecdsa-sha2-nistp256-cert-v01@openssh.com, 1726rsa-sha2-512-cert-v01@openssh.com, 1727rsa-sha2-256-cert-v01@openssh.com, 1728ssh-ed25519, 1729ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521, 1730sk-ssh-ed25519@openssh.com, 1731sk-ecdsa-sha2-nistp256@openssh.com, 1732rsa-sha2-512,rsa-sha2-256 1733.Ed 1734.Pp 1735The list of available signature algorithms may also be obtained using 1736.Qq ssh -Q PubkeyAcceptedAlgorithms . 1737.It Cm PubkeyAuthOptions 1738Sets one or more public key authentication options. 1739The supported keywords are: 1740.Cm none 1741(the default; indicating no additional options are enabled), 1742.Cm touch-required 1743and 1744.Cm verify-required . 1745.Pp 1746The 1747.Cm touch-required 1748option causes public key authentication using a FIDO authenticator algorithm 1749(i.e.\& 1750.Cm ecdsa-sk 1751or 1752.Cm ed25519-sk ) 1753to always require the signature to attest that a physically present user 1754explicitly confirmed the authentication (usually by touching the authenticator). 1755By default, 1756.Xr sshd 8 1757requires user presence unless overridden with an authorized_keys option. 1758The 1759.Cm touch-required 1760flag disables this override. 1761.Pp 1762The 1763.Cm verify-required 1764option requires a FIDO key signature attest that the user was verified, 1765e.g. via a PIN. 1766.Pp 1767Neither the 1768.Cm touch-required 1769or 1770.Cm verify-required 1771options have any effect for other, non-FIDO, public key types. 1772.It Cm PubkeyAuthentication 1773Specifies whether public key authentication is allowed. 1774The default is 1775.Cm yes . 1776.It Cm RefuseConnection 1777Indicates that 1778.Xr sshd 8 1779should unconditionally terminate the connection. 1780Additionally, a 1781.Cm refuseconnection 1782penalty may be recorded against the source of the connection if 1783.Cm PerSourcePenalties 1784are enabled. 1785This option is only really useful in a 1786.Cm Match 1787block. 1788.It Cm RekeyLimit 1789Specifies the maximum amount of data that may be transmitted or received 1790before the session key is renegotiated, optionally followed by a maximum 1791amount of time that may pass before the session key is renegotiated. 1792The first argument is specified in bytes and may have a suffix of 1793.Sq K , 1794.Sq M , 1795or 1796.Sq G 1797to indicate Kilobytes, Megabytes, or Gigabytes, respectively. 1798The default is between 1799.Sq 1G 1800and 1801.Sq 4G , 1802depending on the cipher. 1803The optional second value is specified in seconds and may use any of the 1804units documented in the 1805.Sx TIME FORMATS 1806section. 1807The default value for 1808.Cm RekeyLimit 1809is 1810.Cm default none , 1811which means that rekeying is performed after the cipher's default amount 1812of data has been sent or received and no time based rekeying is done. 1813.It Cm RequiredRSASize 1814Specifies the minimum RSA key size (in bits) that 1815.Xr sshd 8 1816will accept. 1817User and host-based authentication keys smaller than this limit will be 1818refused. 1819The default is 1820.Cm 1024 1821bits. 1822Note that this limit may only be raised from the default. 1823.It Cm RevokedKeys 1824Specifies revoked public keys file, or 1825.Cm none 1826to not use one. 1827Keys listed in this file will be refused for public key authentication. 1828Note that if this file is not readable, then public key authentication will 1829be refused for all users. 1830Keys may be specified as a text file, listing one public key per line, or as 1831an OpenSSH Key Revocation List (KRL) as generated by 1832.Xr ssh-keygen 1 . 1833For more information on KRLs, see the KEY REVOCATION LISTS section in 1834.Xr ssh-keygen 1 . 1835.It Cm RDomain 1836Specifies an explicit routing domain that is applied after authentication 1837has completed. 1838The user session, as well as any forwarded or listening IP sockets, 1839will be bound to this 1840.Xr rdomain 4 . 1841If the routing domain is set to 1842.Cm \&%D , 1843then the domain in which the incoming connection was received will be applied. 1844.It Cm SecurityKeyProvider 1845Specifies a path to a library that will be used when loading 1846FIDO authenticator-hosted keys, overriding the default of using 1847the built-in USB HID support. 1848.It Cm SetEnv 1849Specifies one or more environment variables to set in child sessions started 1850by 1851.Xr sshd 8 1852as 1853.Dq NAME=VALUE . 1854The environment value may be quoted (e.g. if it contains whitespace 1855characters). 1856Environment variables set by 1857.Cm SetEnv 1858override the default environment and any variables specified by the user 1859via 1860.Cm AcceptEnv 1861or 1862.Cm PermitUserEnvironment . 1863.It Cm SshdSessionPath 1864Overrides the default path to the 1865.Cm sshd-session 1866binary that is invoked to handle each connection. 1867The default is 1868.Pa /usr/libexec/sshd-session . 1869This option is intended for use by tests. 1870.It Cm StreamLocalBindMask 1871Sets the octal file creation mode mask 1872.Pq umask 1873used when creating a Unix-domain socket file for local or remote 1874port forwarding. 1875This option is only used for port forwarding to a Unix-domain socket file. 1876.Pp 1877The default value is 0177, which creates a Unix-domain socket file that is 1878readable and writable only by the owner. 1879Note that not all operating systems honor the file mode on Unix-domain 1880socket files. 1881.It Cm StreamLocalBindUnlink 1882Specifies whether to remove an existing Unix-domain socket file for local 1883or remote port forwarding before creating a new one. 1884If the socket file already exists and 1885.Cm StreamLocalBindUnlink 1886is not enabled, 1887.Nm sshd 1888will be unable to forward the port to the Unix-domain socket file. 1889This option is only used for port forwarding to a Unix-domain socket file. 1890.Pp 1891The argument must be 1892.Cm yes 1893or 1894.Cm no . 1895The default is 1896.Cm no . 1897.It Cm StrictModes 1898Specifies whether 1899.Xr sshd 8 1900should check file modes and ownership of the 1901user's files and home directory before accepting login. 1902This is normally desirable because novices sometimes accidentally leave their 1903directory or files world-writable. 1904The default is 1905.Cm yes . 1906Note that this does not apply to 1907.Cm ChrootDirectory , 1908whose permissions and ownership are checked unconditionally. 1909.It Cm Subsystem 1910Configures an external subsystem (e.g. file transfer daemon). 1911Arguments should be a subsystem name and a command (with optional arguments) 1912to execute upon subsystem request. 1913.Pp 1914The command 1915.Cm sftp-server 1916implements the SFTP file transfer subsystem. 1917.Pp 1918Alternately the name 1919.Cm internal-sftp 1920implements an in-process SFTP server. 1921This may simplify configurations using 1922.Cm ChrootDirectory 1923to force a different filesystem root on clients. 1924It accepts the same command line arguments as 1925.Cm sftp-server 1926and even though it is in-process, settings such as 1927.Cm LogLevel 1928or 1929.Cm SyslogFacility 1930do not apply to it and must be set explicitly via 1931command line arguments. 1932.Pp 1933By default no subsystems are defined. 1934.It Cm SyslogFacility 1935Gives the facility code that is used when logging messages from 1936.Xr sshd 8 . 1937The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2, 1938LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7. 1939The default is AUTH. 1940.It Cm TCPKeepAlive 1941Specifies whether the system should send TCP keepalive messages to the 1942other side. 1943If they are sent, death of the connection or crash of one 1944of the machines will be properly noticed. 1945However, this means that 1946connections will die if the route is down temporarily, and some people 1947find it annoying. 1948On the other hand, if TCP keepalives are not sent, 1949sessions may hang indefinitely on the server, leaving 1950.Qq ghost 1951users and consuming server resources. 1952.Pp 1953The default is 1954.Cm yes 1955(to send TCP keepalive messages), and the server will notice 1956if the network goes down or the client host crashes. 1957This avoids infinitely hanging sessions. 1958.Pp 1959To disable TCP keepalive messages, the value should be set to 1960.Cm no . 1961.It Cm TrustedUserCAKeys 1962Specifies a file containing public keys of certificate authorities that are 1963trusted to sign user certificates for authentication, or 1964.Cm none 1965to not use one. 1966Keys are listed one per line; empty lines and comments starting with 1967.Ql # 1968are allowed. 1969If a certificate is presented for authentication and has its signing CA key 1970listed in this file, then it may be used for authentication for any user 1971listed in the certificate's principals list. 1972Note that certificates that lack a list of principals will not be permitted 1973for authentication using 1974.Cm TrustedUserCAKeys . 1975For more details on certificates, see the CERTIFICATES section in 1976.Xr ssh-keygen 1 . 1977.It Cm UnusedConnectionTimeout 1978Specifies whether and how quickly 1979.Xr sshd 8 1980should close client connections with no open channels. 1981Open channels include active shell, command execution or subsystem 1982sessions, connected network, socket, agent or X11 forwardings. 1983Forwarding listeners, such as those from the 1984.Xr ssh 1 1985.Fl R 1986flag, are not considered as open channels and do not prevent the timeout. 1987The timeout value 1988is specified in seconds or may use any of the units documented in the 1989.Sx TIME FORMATS 1990section. 1991.Pp 1992Note that this timeout starts when the client connection completes 1993user authentication but before the client has an opportunity to open any 1994channels. 1995Caution should be used when using short timeout values, as they may not 1996provide sufficient time for the client to request and open its channels 1997before terminating the connection. 1998.Pp 1999The default 2000.Cm none 2001is to never expire connections for having no open channels. 2002This option may be useful in conjunction with 2003.Cm ChannelTimeout . 2004.It Cm UseDNS 2005Specifies whether 2006.Xr sshd 8 2007should look up the remote host name, and to check that 2008the resolved host name for the remote IP address maps back to the 2009very same IP address. 2010.Pp 2011If this option is set to 2012.Cm no 2013(the default) then only addresses and not host names may be used in 2014.Pa ~/.ssh/authorized_keys 2015.Cm from 2016and 2017.Nm 2018.Cm Match 2019.Cm Host 2020directives. 2021.It Cm UsePAM 2022Enables the Pluggable Authentication Module interface. 2023If set to 2024.Cm yes 2025this will enable PAM authentication using 2026.Cm KbdInteractiveAuthentication 2027and 2028.Cm PasswordAuthentication 2029in addition to PAM account and session module processing for all 2030authentication types. 2031.Pp 2032Because PAM keyboard-interactive authentication usually serves an equivalent 2033role to password authentication, you should disable either 2034.Cm PasswordAuthentication 2035or 2036.Cm KbdInteractiveAuthentication . 2037.Pp 2038If 2039.Cm UsePAM 2040is enabled, you will not be able to run 2041.Xr sshd 8 2042as a non-root user. 2043The default is 2044.Cm no . 2045.It Cm VersionAddendum 2046Optionally specifies additional text to append to the SSH protocol banner 2047sent by the server upon connection. 2048The default is 2049.Cm none . 2050.It Cm X11DisplayOffset 2051Specifies the first display number available for 2052.Xr sshd 8 Ns 's 2053X11 forwarding. 2054This prevents sshd from interfering with real X11 servers. 2055The default is 10. 2056.It Cm X11Forwarding 2057Specifies whether X11 forwarding is permitted. 2058The argument must be 2059.Cm yes 2060or 2061.Cm no . 2062The default is 2063.Cm no . 2064.Pp 2065When X11 forwarding is enabled, there may be additional exposure to 2066the server and to client displays if the 2067.Xr sshd 8 2068proxy display is configured to listen on the wildcard address (see 2069.Cm X11UseLocalhost ) , 2070though this is not the default. 2071Additionally, the authentication spoofing and authentication data 2072verification and substitution occur on the client side. 2073The security risk of using X11 forwarding is that the client's X11 2074display server may be exposed to attack when the SSH client requests 2075forwarding (see the warnings for 2076.Cm ForwardX11 2077in 2078.Xr ssh_config 5 ) . 2079A system administrator may have a stance in which they want to 2080protect clients that may expose themselves to attack by unwittingly 2081requesting X11 forwarding, which can warrant a 2082.Cm no 2083setting. 2084.Pp 2085Note that disabling X11 forwarding does not prevent users from 2086forwarding X11 traffic, as users can always install their own forwarders. 2087.It Cm X11UseLocalhost 2088Specifies whether 2089.Xr sshd 8 2090should bind the X11 forwarding server to the loopback address or to 2091the wildcard address. 2092By default, 2093sshd binds the forwarding server to the loopback address and sets the 2094hostname part of the 2095.Ev DISPLAY 2096environment variable to 2097.Cm localhost . 2098This prevents remote hosts from connecting to the proxy display. 2099However, some older X11 clients may not function with this 2100configuration. 2101.Cm X11UseLocalhost 2102may be set to 2103.Cm no 2104to specify that the forwarding server should be bound to the wildcard 2105address. 2106The argument must be 2107.Cm yes 2108or 2109.Cm no . 2110The default is 2111.Cm yes . 2112.It Cm XAuthLocation 2113Specifies the full pathname of the 2114.Xr xauth 1 2115program, or 2116.Cm none 2117to not use one. 2118The default is 2119.Pa /usr/X11R6/bin/xauth . 2120.It Cm UseLPK 2121Specifies whether LDAP public key retrieval must be used or not. It allow 2122an easy centralisation of public keys within an LDAP directory. The argument must be 2123.Dq yes 2124or 2125.Dq no . 2126.It Cm LpkLdapConf 2127Specifies whether LDAP Public keys should parse the specified ldap.conf file 2128instead of sshd_config Tokens. The argument must be a valid path to an ldap.conf 2129file like 2130.Pa /etc/ldap.conf 2131.It Cm LpkServers 2132Specifies LDAP one or more [:space:] separated server's url the following form may be used: 2133.Pp 2134LpkServers ldaps://127.0.0.1 ldap://127.0.0.2 ldap://127.0.0.3 2135.It Cm LpkUserDN 2136Specifies the LDAP user DN. 2137.Pp 2138LpkUserDN ou=users,dc=phear,dc=org 2139.It Cm LpkGroupDN 2140Specifies the LDAP groups DN. 2141.Pp 2142LpkGroupDN ou=groups,dc=phear,dc=org 2143.It Cm LpkBindDN 2144Specifies the LDAP bind DN to use if necessary. 2145.Pp 2146LpkBindDN cn=Manager,dc=phear,dc=org 2147.It Cm LpkBindPw 2148Specifies the LDAP bind credential. 2149.Pp 2150LpkBindPw secret 2151.It Cm LpkServerGroup 2152Specifies one or more [:space:] separated group the server is part of. 2153.Pp 2154LpkServerGroup unix mail prod 2155.It Cm LpkFilter 2156Specifies an additional LDAP filter to use for finding SSH keys 2157.Pp 2158LpkFilter (hostAccess=master.phear.org) 2159.It Cm LpkForceTLS 2160Specifies if the LDAP server connection must be tried, forced or not used. The argument must be 2161.Dq yes 2162or 2163.Dq no 2164or 2165.Dq try . 2166.It Cm LpkSearchTimelimit 2167Specifies the search time limit before the search is considered over. value is 2168in seconds. 2169.Pp 2170LpkSearchTimelimit 3 2171.It Cm LpkBindTimelimit 2172Specifies the bind time limit before the connection is considered dead. value is 2173in seconds. 2174.Pp 2175LpkBindTimelimit 3 2176.El 2177.Sh TIME FORMATS 2178.Xr sshd 8 2179command-line arguments and configuration file options that specify time 2180may be expressed using a sequence of the form: 2181.Sm off 2182.Ar time Op Ar qualifier , 2183.Sm on 2184where 2185.Ar time 2186is a positive integer value and 2187.Ar qualifier 2188is one of the following: 2189.Pp 2190.Bl -tag -width Ds -compact -offset indent 2191.It Aq Cm none 2192seconds 2193.It Cm s | Cm S 2194seconds 2195.It Cm m | Cm M 2196minutes 2197.It Cm h | Cm H 2198hours 2199.It Cm d | Cm D 2200days 2201.It Cm w | Cm W 2202weeks 2203.El 2204.Pp 2205Each member of the sequence is added together to calculate 2206the total time value. 2207.Pp 2208Time format examples: 2209.Pp 2210.Bl -tag -width Ds -compact -offset indent 2211.It 600 2212600 seconds (10 minutes) 2213.It 10m 221410 minutes 2215.It 1h30m 22161 hour 30 minutes (90 minutes) 2217.El 2218.Sh TOKENS 2219Arguments to some keywords can make use of tokens, 2220which are expanded at runtime: 2221.Pp 2222.Bl -tag -width XXXX -offset indent -compact 2223.It %% 2224A literal 2225.Sq % . 2226.It \&%C 2227Identifies the connection endpoints, containing 2228four space-separated values: client address, client port number, 2229server address, and server port number. 2230.It \&%D 2231The routing domain in which the incoming connection was received. 2232.It %F 2233The fingerprint of the CA key. 2234.It %f 2235The fingerprint of the key or certificate. 2236.It %h 2237The home directory of the user. 2238.It %i 2239The key ID in the certificate. 2240.It %K 2241The base64-encoded CA key. 2242.It %k 2243The base64-encoded key or certificate for authentication. 2244.It %s 2245The serial number of the certificate. 2246.It \&%T 2247The type of the CA key. 2248.It %t 2249The key or certificate type. 2250.It \&%U 2251The numeric user ID of the target user. 2252.It %u 2253The username. 2254.El 2255.Pp 2256.Cm AuthorizedKeysCommand 2257accepts the tokens %%, %C, %D, %f, %h, %k, %t, %U, and %u. 2258.Pp 2259.Cm AuthorizedKeysFile 2260accepts the tokens %%, %h, %U, and %u. 2261.Pp 2262.Cm AuthorizedPrincipalsCommand 2263accepts the tokens %%, %C, %D, %F, %f, %h, %i, %K, %k, %s, %T, %t, %U, and %u. 2264.Pp 2265.Cm AuthorizedPrincipalsFile 2266accepts the tokens %%, %h, %U, and %u. 2267.Pp 2268.Cm ChrootDirectory 2269accepts the tokens %%, %h, %U, and %u. 2270.Pp 2271.Cm RoutingDomain 2272accepts the token %D. 2273.Sh FILES 2274.Bl -tag -width Ds 2275.It Pa /etc/ssh/sshd_config 2276Contains configuration data for 2277.Xr sshd 8 . 2278This file should be writable by root only, but it is recommended 2279(though not necessary) that it be world-readable. 2280.El 2281.Sh SEE ALSO 2282.Xr sftp-server 8 , 2283.Xr sshd 8 2284.Sh AUTHORS 2285.An -nosplit 2286OpenSSH is a derivative of the original and free 2287ssh 1.2.12 release by 2288.An Tatu Ylonen . 2289.An Aaron Campbell , Bob Beck , Markus Friedl , Niels Provos , 2290.An Theo de Raadt 2291and 2292.An Dug Song 2293removed many bugs, re-added newer features and 2294created OpenSSH. 2295.An Markus Friedl 2296contributed the support for SSH protocol versions 1.5 and 2.0. 2297.An Niels Provos 2298and 2299.An Markus Friedl 2300contributed support for privilege separation. 2301