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: ssh_config.5,v 1.273 2018/04/10 00:10:49 djm Exp $ 37.Dd $Mdocdate: April 10 2018 $ 38.Dt SSH_CONFIG 5 39.Os 40.Sh NAME 41.Nm ssh_config 42.Nd OpenSSH SSH client configuration files 43.Sh DESCRIPTION 44.Xr ssh 1 45obtains configuration data from the following sources in 46the following order: 47.Pp 48.Bl -enum -offset indent -compact 49.It 50command-line options 51.It 52user's configuration file 53.Pq Pa ~/.ssh/config 54.It 55system-wide configuration file 56.Pq Pa /etc/ssh/ssh_config 57.El 58.Pp 59For each parameter, the first obtained value 60will be used. 61The configuration files contain sections separated by 62.Cm Host 63specifications, and that section is only applied for hosts that 64match one of the patterns given in the specification. 65The matched host name is usually the one given on the command line 66(see the 67.Cm CanonicalizeHostname 68option for exceptions). 69.Pp 70Since the first obtained value for each parameter is used, more 71host-specific declarations should be given near the beginning of the 72file, and general defaults at the end. 73.Pp 74The file contains keyword-argument pairs, one per line. 75Lines starting with 76.Ql # 77and empty lines are interpreted as comments. 78Arguments may optionally be enclosed in double quotes 79.Pq \&" 80in order to represent arguments containing spaces. 81Configuration options may be separated by whitespace or 82optional whitespace and exactly one 83.Ql = ; 84the latter format is useful to avoid the need to quote whitespace 85when specifying configuration options using the 86.Nm ssh , 87.Nm scp , 88and 89.Nm sftp 90.Fl o 91option. 92.Pp 93The possible 94keywords and their meanings are as follows (note that 95keywords are case-insensitive and arguments are case-sensitive): 96.Bl -tag -width Ds 97.It Cm Host 98Restricts the following declarations (up to the next 99.Cm Host 100or 101.Cm Match 102keyword) to be only for those hosts that match one of the patterns 103given after the keyword. 104If more than one pattern is provided, they should be separated by whitespace. 105A single 106.Ql * 107as a pattern can be used to provide global 108defaults for all hosts. 109The host is usually the 110.Ar hostname 111argument given on the command line 112(see the 113.Cm CanonicalizeHostname 114keyword for exceptions). 115.Pp 116A pattern entry may be negated by prefixing it with an exclamation mark 117.Pq Sq !\& . 118If a negated entry is matched, then the 119.Cm Host 120entry is ignored, regardless of whether any other patterns on the line 121match. 122Negated matches are therefore useful to provide exceptions for wildcard 123matches. 124.Pp 125See 126.Sx PATTERNS 127for more information on patterns. 128.It Cm Match 129Restricts the following declarations (up to the next 130.Cm Host 131or 132.Cm Match 133keyword) to be used only when the conditions following the 134.Cm Match 135keyword are satisfied. 136Match conditions are specified using one or more criteria 137or the single token 138.Cm all 139which always matches. 140The available criteria keywords are: 141.Cm canonical , 142.Cm exec , 143.Cm host , 144.Cm originalhost , 145.Cm user , 146and 147.Cm localuser . 148The 149.Cm all 150criteria must appear alone or immediately after 151.Cm canonical . 152Other criteria may be combined arbitrarily. 153All criteria but 154.Cm all 155and 156.Cm canonical 157require an argument. 158Criteria may be negated by prepending an exclamation mark 159.Pq Sq !\& . 160.Pp 161The 162.Cm canonical 163keyword matches only when the configuration file is being re-parsed 164after hostname canonicalization (see the 165.Cm CanonicalizeHostname 166option.) 167This may be useful to specify conditions that work with canonical host 168names only. 169The 170.Cm exec 171keyword executes the specified command under the user's shell. 172If the command returns a zero exit status then the condition is considered true. 173Commands containing whitespace characters must be quoted. 174Arguments to 175.Cm exec 176accept the tokens described in the 177.Sx TOKENS 178section. 179.Pp 180The other keywords' criteria must be single entries or comma-separated 181lists and may use the wildcard and negation operators described in the 182.Sx PATTERNS 183section. 184The criteria for the 185.Cm host 186keyword are matched against the target hostname, after any substitution 187by the 188.Cm Hostname 189or 190.Cm CanonicalizeHostname 191options. 192The 193.Cm originalhost 194keyword matches against the hostname as it was specified on the command-line. 195The 196.Cm user 197keyword matches against the target username on the remote host. 198The 199.Cm localuser 200keyword matches against the name of the local user running 201.Xr ssh 1 202(this keyword may be useful in system-wide 203.Nm 204files). 205.It Cm AddKeysToAgent 206Specifies whether keys should be automatically added to a running 207.Xr ssh-agent 1 . 208If this option is set to 209.Cm yes 210and a key is loaded from a file, the key and its passphrase are added to 211the agent with the default lifetime, as if by 212.Xr ssh-add 1 . 213If this option is set to 214.Cm ask , 215.Xr ssh 1 216will require confirmation using the 217.Ev SSH_ASKPASS 218program before adding a key (see 219.Xr ssh-add 1 220for details). 221If this option is set to 222.Cm confirm , 223each use of the key must be confirmed, as if the 224.Fl c 225option was specified to 226.Xr ssh-add 1 . 227If this option is set to 228.Cm no , 229no keys are added to the agent. 230The argument must be 231.Cm yes , 232.Cm confirm , 233.Cm ask , 234or 235.Cm no 236(the default). 237.It Cm AddressFamily 238Specifies which address family to use when connecting. 239Valid arguments are 240.Cm any 241(the default), 242.Cm inet 243(use IPv4 only), or 244.Cm inet6 245(use IPv6 only). 246.It Cm BatchMode 247If set to 248.Cm yes , 249passphrase/password querying will be disabled. 250This option is useful in scripts and other batch jobs where no user 251is present to supply the password. 252The argument must be 253.Cm yes 254or 255.Cm no 256(the default). 257.It Cm BindAddress 258Use the specified address on the local machine as the source address of 259the connection. 260Only useful on systems with more than one address. 261Note that this option does not work if 262.Cm UsePrivilegedPort 263is set to 264.Cm yes . 265.It Cm BindInterface 266Use the address of the specified interface on the local machine as the 267source address of the connection. 268Note that this option does not work if 269.Cm UsePrivilegedPort 270is set to 271.Cm yes . 272.It Cm CanonicalDomains 273When 274.Cm CanonicalizeHostname 275is enabled, this option specifies the list of domain suffixes in which to 276search for the specified destination host. 277.It Cm CanonicalizeFallbackLocal 278Specifies whether to fail with an error when hostname canonicalization fails. 279The default, 280.Cm yes , 281will attempt to look up the unqualified hostname using the system resolver's 282search rules. 283A value of 284.Cm no 285will cause 286.Xr ssh 1 287to fail instantly if 288.Cm CanonicalizeHostname 289is enabled and the target hostname cannot be found in any of the domains 290specified by 291.Cm CanonicalDomains . 292.It Cm CanonicalizeHostname 293Controls whether explicit hostname canonicalization is performed. 294The default, 295.Cm no , 296is not to perform any name rewriting and let the system resolver handle all 297hostname lookups. 298If set to 299.Cm yes 300then, for connections that do not use a 301.Cm ProxyCommand , 302.Xr ssh 1 303will attempt to canonicalize the hostname specified on the command line 304using the 305.Cm CanonicalDomains 306suffixes and 307.Cm CanonicalizePermittedCNAMEs 308rules. 309If 310.Cm CanonicalizeHostname 311is set to 312.Cm always , 313then canonicalization is applied to proxied connections too. 314.Pp 315If this option is enabled, then the configuration files are processed 316again using the new target name to pick up any new configuration in matching 317.Cm Host 318and 319.Cm Match 320stanzas. 321.It Cm CanonicalizeMaxDots 322Specifies the maximum number of dot characters in a hostname before 323canonicalization is disabled. 324The default, 1, 325allows a single dot (i.e. hostname.subdomain). 326.It Cm CanonicalizePermittedCNAMEs 327Specifies rules to determine whether CNAMEs should be followed when 328canonicalizing hostnames. 329The rules consist of one or more arguments of 330.Ar source_domain_list : Ns Ar target_domain_list , 331where 332.Ar source_domain_list 333is a pattern-list of domains that may follow CNAMEs in canonicalization, 334and 335.Ar target_domain_list 336is a pattern-list of domains that they may resolve to. 337.Pp 338For example, 339.Qq *.a.example.com:*.b.example.com,*.c.example.com 340will allow hostnames matching 341.Qq *.a.example.com 342to be canonicalized to names in the 343.Qq *.b.example.com 344or 345.Qq *.c.example.com 346domains. 347.It Cm CertificateFile 348Specifies a file from which the user's certificate is read. 349A corresponding private key must be provided separately in order 350to use this certificate either 351from an 352.Cm IdentityFile 353directive or 354.Fl i 355flag to 356.Xr ssh 1 , 357via 358.Xr ssh-agent 1 , 359or via a 360.Cm PKCS11Provider . 361.Pp 362Arguments to 363.Cm CertificateFile 364may use the tilde syntax to refer to a user's home directory 365or the tokens described in the 366.Sx TOKENS 367section. 368.Pp 369It is possible to have multiple certificate files specified in 370configuration files; these certificates will be tried in sequence. 371Multiple 372.Cm CertificateFile 373directives will add to the list of certificates used for 374authentication. 375.It Cm ChallengeResponseAuthentication 376Specifies whether to use challenge-response authentication. 377The argument to this keyword must be 378.Cm yes 379(the default) 380or 381.Cm no . 382.It Cm CheckHostIP 383If set to 384.Cm yes 385(the default), 386.Xr ssh 1 387will additionally check the host IP address in the 388.Pa known_hosts 389file. 390This allows it to detect if a host key changed due to DNS spoofing 391and will add addresses of destination hosts to 392.Pa ~/.ssh/known_hosts 393in the process, regardless of the setting of 394.Cm StrictHostKeyChecking . 395If the option is set to 396.Cm no , 397the check will not be executed. 398.It Cm Ciphers 399Specifies the ciphers allowed and their order of preference. 400Multiple ciphers must be comma-separated. 401If the specified value begins with a 402.Sq + 403character, then the specified ciphers will be appended to the default set 404instead of replacing them. 405If the specified value begins with a 406.Sq - 407character, then the specified ciphers (including wildcards) will be removed 408from the default set instead of replacing them. 409.Pp 410The supported ciphers are: 411.Bd -literal -offset indent 4123des-cbc 413aes128-cbc 414aes192-cbc 415aes256-cbc 416aes128-ctr 417aes192-ctr 418aes256-ctr 419aes128-gcm@openssh.com 420aes256-gcm@openssh.com 421chacha20-poly1305@openssh.com 422.Ed 423.Pp 424The default is: 425.Bd -literal -offset indent 426chacha20-poly1305@openssh.com, 427aes128-ctr,aes192-ctr,aes256-ctr, 428aes128-gcm@openssh.com,aes256-gcm@openssh.com 429.Ed 430.Pp 431The list of available ciphers may also be obtained using 432.Qq ssh -Q cipher . 433.It Cm ClearAllForwardings 434Specifies that all local, remote, and dynamic port forwardings 435specified in the configuration files or on the command line be 436cleared. 437This option is primarily useful when used from the 438.Xr ssh 1 439command line to clear port forwardings set in 440configuration files, and is automatically set by 441.Xr scp 1 442and 443.Xr sftp 1 . 444The argument must be 445.Cm yes 446or 447.Cm no 448(the default). 449.It Cm Compression 450Specifies whether to use compression. 451The argument must be 452.Cm yes 453or 454.Cm no 455(the default). 456.It Cm ConnectionAttempts 457Specifies the number of tries (one per second) to make before exiting. 458The argument must be an integer. 459This may be useful in scripts if the connection sometimes fails. 460The default is 1. 461.It Cm ConnectTimeout 462Specifies the timeout (in seconds) used when connecting to the 463SSH server, instead of using the default system TCP timeout. 464This value is used only when the target is down or really unreachable, 465not when it refuses the connection. 466.It Cm ControlMaster 467Enables the sharing of multiple sessions over a single network connection. 468When set to 469.Cm yes , 470.Xr ssh 1 471will listen for connections on a control socket specified using the 472.Cm ControlPath 473argument. 474Additional sessions can connect to this socket using the same 475.Cm ControlPath 476with 477.Cm ControlMaster 478set to 479.Cm no 480(the default). 481These sessions will try to reuse the master instance's network connection 482rather than initiating new ones, but will fall back to connecting normally 483if the control socket does not exist, or is not listening. 484.Pp 485Setting this to 486.Cm ask 487will cause 488.Xr ssh 1 489to listen for control connections, but require confirmation using 490.Xr ssh-askpass 1 . 491If the 492.Cm ControlPath 493cannot be opened, 494.Xr ssh 1 495will continue without connecting to a master instance. 496.Pp 497X11 and 498.Xr ssh-agent 1 499forwarding is supported over these multiplexed connections, however the 500display and agent forwarded will be the one belonging to the master 501connection i.e. it is not possible to forward multiple displays or agents. 502.Pp 503Two additional options allow for opportunistic multiplexing: try to use a 504master connection but fall back to creating a new one if one does not already 505exist. 506These options are: 507.Cm auto 508and 509.Cm autoask . 510The latter requires confirmation like the 511.Cm ask 512option. 513.It Cm ControlPath 514Specify the path to the control socket used for connection sharing as described 515in the 516.Cm ControlMaster 517section above or the string 518.Cm none 519to disable connection sharing. 520Arguments to 521.Cm ControlPath 522may use the tilde syntax to refer to a user's home directory 523or the tokens described in the 524.Sx TOKENS 525section. 526It is recommended that any 527.Cm ControlPath 528used for opportunistic connection sharing include 529at least %h, %p, and %r (or alternatively %C) and be placed in a directory 530that is not writable by other users. 531This ensures that shared connections are uniquely identified. 532.It Cm ControlPersist 533When used in conjunction with 534.Cm ControlMaster , 535specifies that the master connection should remain open 536in the background (waiting for future client connections) 537after the initial client connection has been closed. 538If set to 539.Cm no , 540then the master connection will not be placed into the background, 541and will close as soon as the initial client connection is closed. 542If set to 543.Cm yes 544or 0, 545then the master connection will remain in the background indefinitely 546(until killed or closed via a mechanism such as the 547.Qq ssh -O exit ) . 548If set to a time in seconds, or a time in any of the formats documented in 549.Xr sshd_config 5 , 550then the backgrounded master connection will automatically terminate 551after it has remained idle (with no client connections) for the 552specified time. 553.It Cm DynamicForward 554Specifies that a TCP port on the local machine be forwarded 555over the secure channel, and the application 556protocol is then used to determine where to connect to from the 557remote machine. 558.Pp 559The argument must be 560.Sm off 561.Oo Ar bind_address : Oc Ar port . 562.Sm on 563IPv6 addresses can be specified by enclosing addresses in square brackets. 564By default, the local port is bound in accordance with the 565.Cm GatewayPorts 566setting. 567However, an explicit 568.Ar bind_address 569may be used to bind the connection to a specific address. 570The 571.Ar bind_address 572of 573.Cm localhost 574indicates that the listening port be bound for local use only, while an 575empty address or 576.Sq * 577indicates that the port should be available from all interfaces. 578.Pp 579Currently the SOCKS4 and SOCKS5 protocols are supported, and 580.Xr ssh 1 581will act as a SOCKS server. 582Multiple forwardings may be specified, and 583additional forwardings can be given on the command line. 584Only the superuser can forward privileged ports. 585.It Cm EnableSSHKeysign 586Setting this option to 587.Cm yes 588in the global client configuration file 589.Pa /etc/ssh/ssh_config 590enables the use of the helper program 591.Xr ssh-keysign 8 592during 593.Cm HostbasedAuthentication . 594The argument must be 595.Cm yes 596or 597.Cm no 598(the default). 599This option should be placed in the non-hostspecific section. 600See 601.Xr ssh-keysign 8 602for more information. 603.It Cm EscapeChar 604Sets the escape character (default: 605.Ql ~ ) . 606The escape character can also 607be set on the command line. 608The argument should be a single character, 609.Ql ^ 610followed by a letter, or 611.Cm none 612to disable the escape 613character entirely (making the connection transparent for binary 614data). 615.It Cm ExitOnForwardFailure 616Specifies whether 617.Xr ssh 1 618should terminate the connection if it cannot set up all requested 619dynamic, tunnel, local, and remote port forwardings, (e.g.\& 620if either end is unable to bind and listen on a specified port). 621Note that 622.Cm ExitOnForwardFailure 623does not apply to connections made over port forwardings and will not, 624for example, cause 625.Xr ssh 1 626to exit if TCP connections to the ultimate forwarding destination fail. 627The argument must be 628.Cm yes 629or 630.Cm no 631(the default). 632.It Cm FingerprintHash 633Specifies the hash algorithm used when displaying key fingerprints. 634Valid options are: 635.Cm md5 636and 637.Cm sha256 638(the default). 639.It Cm ForwardAgent 640Specifies whether the connection to the authentication agent (if any) 641will be forwarded to the remote machine. 642The argument must be 643.Cm yes 644or 645.Cm no 646(the default). 647.Pp 648Agent forwarding should be enabled with caution. 649Users with the ability to bypass file permissions on the remote host 650(for the agent's Unix-domain socket) 651can access the local agent through the forwarded connection. 652An attacker cannot obtain key material from the agent, 653however they can perform operations on the keys that enable them to 654authenticate using the identities loaded into the agent. 655.It Cm ForwardX11 656Specifies whether X11 connections will be automatically redirected 657over the secure channel and 658.Ev DISPLAY 659set. 660The argument must be 661.Cm yes 662or 663.Cm no 664(the default). 665.Pp 666X11 forwarding should be enabled with caution. 667Users with the ability to bypass file permissions on the remote host 668(for the user's X11 authorization database) 669can access the local X11 display through the forwarded connection. 670An attacker may then be able to perform activities such as keystroke monitoring 671if the 672.Cm ForwardX11Trusted 673option is also enabled. 674.It Cm ForwardX11Timeout 675Specify a timeout for untrusted X11 forwarding 676using the format described in the 677.Sx TIME FORMATS 678section of 679.Xr sshd_config 5 . 680X11 connections received by 681.Xr ssh 1 682after this time will be refused. 683The default is to disable untrusted X11 forwarding after twenty minutes has 684elapsed. 685.It Cm ForwardX11Trusted 686If this option is set to 687.Cm yes , 688remote X11 clients will have full access to the original X11 display. 689.Pp 690If this option is set to 691.Cm no 692(the default), 693remote X11 clients will be considered untrusted and prevented 694from stealing or tampering with data belonging to trusted X11 695clients. 696Furthermore, the 697.Xr xauth 1 698token used for the session will be set to expire after 20 minutes. 699Remote clients will be refused access after this time. 700.Pp 701See the X11 SECURITY extension specification for full details on 702the restrictions imposed on untrusted clients. 703.It Cm GatewayPorts 704Specifies whether remote hosts are allowed to connect to local 705forwarded ports. 706By default, 707.Xr ssh 1 708binds local port forwardings to the loopback address. 709This prevents other remote hosts from connecting to forwarded ports. 710.Cm GatewayPorts 711can be used to specify that ssh 712should bind local port forwardings to the wildcard address, 713thus allowing remote hosts to connect to forwarded ports. 714The argument must be 715.Cm yes 716or 717.Cm no 718(the default). 719.It Cm GlobalKnownHostsFile 720Specifies one or more files to use for the global 721host key database, separated by whitespace. 722The default is 723.Pa /etc/ssh/ssh_known_hosts , 724.Pa /etc/ssh/ssh_known_hosts2 . 725.It Cm GSSAPIAuthentication 726Specifies whether user authentication based on GSSAPI is allowed. 727The default is 728.Cm no . 729.It Cm GSSAPIDelegateCredentials 730Forward (delegate) credentials to the server. 731The default is 732.Cm no . 733.It Cm HashKnownHosts 734Indicates that 735.Xr ssh 1 736should hash host names and addresses when they are added to 737.Pa ~/.ssh/known_hosts . 738These hashed names may be used normally by 739.Xr ssh 1 740and 741.Xr sshd 8 , 742but they do not reveal identifying information should the file's contents 743be disclosed. 744The default is 745.Cm no . 746Note that existing names and addresses in known hosts files 747will not be converted automatically, 748but may be manually hashed using 749.Xr ssh-keygen 1 . 750.It Cm HostbasedAuthentication 751Specifies whether to try rhosts based authentication with public key 752authentication. 753The argument must be 754.Cm yes 755or 756.Cm no 757(the default). 758.It Cm HostbasedKeyTypes 759Specifies the key types that will be used for hostbased authentication 760as a comma-separated pattern list. 761Alternately if the specified value begins with a 762.Sq + 763character, then the specified key types will be appended to the default set 764instead of replacing them. 765If the specified value begins with a 766.Sq - 767character, then the specified key types (including wildcards) will be removed 768from the default set instead of replacing them. 769The default for this option is: 770.Bd -literal -offset 3n 771ecdsa-sha2-nistp256-cert-v01@openssh.com, 772ecdsa-sha2-nistp384-cert-v01@openssh.com, 773ecdsa-sha2-nistp521-cert-v01@openssh.com, 774ssh-ed25519-cert-v01@openssh.com, 775ssh-rsa-cert-v01@openssh.com, 776ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521, 777ssh-ed25519,ssh-rsa 778.Ed 779.Pp 780The 781.Fl Q 782option of 783.Xr ssh 1 784may be used to list supported key types. 785.It Cm HostKeyAlgorithms 786Specifies the host key algorithms 787that the client wants to use in order of preference. 788Alternately if the specified value begins with a 789.Sq + 790character, then the specified key types will be appended to the default set 791instead of replacing them. 792If the specified value begins with a 793.Sq - 794character, then the specified key types (including wildcards) will be removed 795from the default set instead of replacing them. 796The default for this option is: 797.Bd -literal -offset 3n 798ecdsa-sha2-nistp256-cert-v01@openssh.com, 799ecdsa-sha2-nistp384-cert-v01@openssh.com, 800ecdsa-sha2-nistp521-cert-v01@openssh.com, 801ssh-ed25519-cert-v01@openssh.com, 802ssh-rsa-cert-v01@openssh.com, 803ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521, 804ssh-ed25519,ssh-rsa 805.Ed 806.Pp 807If hostkeys are known for the destination host then this default is modified 808to prefer their algorithms. 809.Pp 810The list of available key types may also be obtained using 811.Qq ssh -Q key . 812.It Cm HostKeyAlias 813Specifies an alias that should be used instead of the 814real host name when looking up or saving the host key 815in the host key database files and when validating host certificates. 816This option is useful for tunneling SSH connections 817or for multiple servers running on a single host. 818.It Cm HostName 819Specifies the real host name to log into. 820This can be used to specify nicknames or abbreviations for hosts. 821Arguments to 822.Cm HostName 823accept the tokens described in the 824.Sx TOKENS 825section. 826Numeric IP addresses are also permitted (both on the command line and in 827.Cm HostName 828specifications). 829The default is the name given on the command line. 830.It Cm IdentitiesOnly 831Specifies that 832.Xr ssh 1 833should only use the authentication identity and certificate files explicitly 834configured in the 835.Nm 836files 837or passed on the 838.Xr ssh 1 839command-line, 840even if 841.Xr ssh-agent 1 842or a 843.Cm PKCS11Provider 844offers more identities. 845The argument to this keyword must be 846.Cm yes 847or 848.Cm no 849(the default). 850This option is intended for situations where ssh-agent 851offers many different identities. 852.It Cm IdentityAgent 853Specifies the 854.Ux Ns -domain 855socket used to communicate with the authentication agent. 856.Pp 857This option overrides the 858.Ev SSH_AUTH_SOCK 859environment variable and can be used to select a specific agent. 860Setting the socket name to 861.Cm none 862disables the use of an authentication agent. 863If the string 864.Qq SSH_AUTH_SOCK 865is specified, the location of the socket will be read from the 866.Ev SSH_AUTH_SOCK 867environment variable. 868.Pp 869Arguments to 870.Cm IdentityAgent 871may use the tilde syntax to refer to a user's home directory 872or the tokens described in the 873.Sx TOKENS 874section. 875.It Cm IdentityFile 876Specifies a file from which the user's DSA, ECDSA, Ed25519 or RSA authentication 877identity is read. 878The default is 879.Pa ~/.ssh/id_dsa , 880.Pa ~/.ssh/id_ecdsa , 881.Pa ~/.ssh/id_ed25519 882and 883.Pa ~/.ssh/id_rsa . 884Additionally, any identities represented by the authentication agent 885will be used for authentication unless 886.Cm IdentitiesOnly 887is set. 888If no certificates have been explicitly specified by 889.Cm CertificateFile , 890.Xr ssh 1 891will try to load certificate information from the filename obtained by 892appending 893.Pa -cert.pub 894to the path of a specified 895.Cm IdentityFile . 896.Pp 897Arguments to 898.Cm IdentityFile 899may use the tilde syntax to refer to a user's home directory 900or the tokens described in the 901.Sx TOKENS 902section. 903.Pp 904It is possible to have 905multiple identity files specified in configuration files; all these 906identities will be tried in sequence. 907Multiple 908.Cm IdentityFile 909directives will add to the list of identities tried (this behaviour 910differs from that of other configuration directives). 911.Pp 912.Cm IdentityFile 913may be used in conjunction with 914.Cm IdentitiesOnly 915to select which identities in an agent are offered during authentication. 916.Cm IdentityFile 917may also be used in conjunction with 918.Cm CertificateFile 919in order to provide any certificate also needed for authentication with 920the identity. 921.It Cm IgnoreUnknown 922Specifies a pattern-list of unknown options to be ignored if they are 923encountered in configuration parsing. 924This may be used to suppress errors if 925.Nm 926contains options that are unrecognised by 927.Xr ssh 1 . 928It is recommended that 929.Cm IgnoreUnknown 930be listed early in the configuration file as it will not be applied 931to unknown options that appear before it. 932.It Cm Include 933Include the specified configuration file(s). 934Multiple pathnames may be specified and each pathname may contain 935.Xr glob 3 936wildcards and, for user configurations, shell-like 937.Sq ~ 938references to user home directories. 939Files without absolute paths are assumed to be in 940.Pa ~/.ssh 941if included in a user configuration file or 942.Pa /etc/ssh 943if included from the system configuration file. 944.Cm Include 945directive may appear inside a 946.Cm Match 947or 948.Cm Host 949block 950to perform conditional inclusion. 951.It Cm IPQoS 952Specifies the IPv4 type-of-service or DSCP class for connections. 953Accepted values are 954.Cm af11 , 955.Cm af12 , 956.Cm af13 , 957.Cm af21 , 958.Cm af22 , 959.Cm af23 , 960.Cm af31 , 961.Cm af32 , 962.Cm af33 , 963.Cm af41 , 964.Cm af42 , 965.Cm af43 , 966.Cm cs0 , 967.Cm cs1 , 968.Cm cs2 , 969.Cm cs3 , 970.Cm cs4 , 971.Cm cs5 , 972.Cm cs6 , 973.Cm cs7 , 974.Cm ef , 975.Cm lowdelay , 976.Cm throughput , 977.Cm reliability , 978a numeric value, or 979.Cm none 980to use the operating system default. 981This option may take one or two arguments, separated by whitespace. 982If one argument is specified, it is used as the packet class unconditionally. 983If two values are specified, the first is automatically selected for 984interactive sessions and the second for non-interactive sessions. 985The default is 986.Cm af21 987(Low-Latency Data) 988for interactive sessions and 989.Cm cs1 990(Lower Effort) 991for non-interactive sessions. 992.It Cm KbdInteractiveAuthentication 993Specifies whether to use keyboard-interactive authentication. 994The argument to this keyword must be 995.Cm yes 996(the default) 997or 998.Cm no . 999.It Cm KbdInteractiveDevices 1000Specifies the list of methods to use in keyboard-interactive authentication. 1001Multiple method names must be comma-separated. 1002The default is to use the server specified list. 1003The methods available vary depending on what the server supports. 1004For an OpenSSH server, 1005it may be zero or more of: 1006.Cm bsdauth , 1007.Cm pam , 1008and 1009.Cm skey . 1010.It Cm KexAlgorithms 1011Specifies the available KEX (Key Exchange) algorithms. 1012Multiple algorithms must be comma-separated. 1013Alternately if the specified value begins with a 1014.Sq + 1015character, then the specified methods will be appended to the default set 1016instead of replacing them. 1017If the specified value begins with a 1018.Sq - 1019character, then the specified methods (including wildcards) will be removed 1020from the default set instead of replacing them. 1021The default is: 1022.Bd -literal -offset indent 1023curve25519-sha256,curve25519-sha256@libssh.org, 1024ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521, 1025diffie-hellman-group-exchange-sha256, 1026diffie-hellman-group16-sha512, 1027diffie-hellman-group18-sha512, 1028diffie-hellman-group-exchange-sha1, 1029diffie-hellman-group14-sha256, 1030diffie-hellman-group14-sha1 1031.Ed 1032.Pp 1033The list of available key exchange algorithms may also be obtained using 1034.Qq ssh -Q kex . 1035.It Cm LocalCommand 1036Specifies a command to execute on the local machine after successfully 1037connecting to the server. 1038The command string extends to the end of the line, and is executed with 1039the user's shell. 1040Arguments to 1041.Cm LocalCommand 1042accept the tokens described in the 1043.Sx TOKENS 1044section. 1045.Pp 1046The command is run synchronously and does not have access to the 1047session of the 1048.Xr ssh 1 1049that spawned it. 1050It should not be used for interactive commands. 1051.Pp 1052This directive is ignored unless 1053.Cm PermitLocalCommand 1054has been enabled. 1055.It Cm LocalForward 1056Specifies that a TCP port on the local machine be forwarded over 1057the secure channel to the specified host and port from the remote machine. 1058The first argument must be 1059.Sm off 1060.Oo Ar bind_address : Oc Ar port 1061.Sm on 1062and the second argument must be 1063.Ar host : Ns Ar hostport . 1064IPv6 addresses can be specified by enclosing addresses in square brackets. 1065Multiple forwardings may be specified, and additional forwardings can be 1066given on the command line. 1067Only the superuser can forward privileged ports. 1068By default, the local port is bound in accordance with the 1069.Cm GatewayPorts 1070setting. 1071However, an explicit 1072.Ar bind_address 1073may be used to bind the connection to a specific address. 1074The 1075.Ar bind_address 1076of 1077.Cm localhost 1078indicates that the listening port be bound for local use only, while an 1079empty address or 1080.Sq * 1081indicates that the port should be available from all interfaces. 1082.It Cm LogLevel 1083Gives the verbosity level that is used when logging messages from 1084.Xr ssh 1 . 1085The possible values are: 1086QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3. 1087The default is INFO. 1088DEBUG and DEBUG1 are equivalent. 1089DEBUG2 and DEBUG3 each specify higher levels of verbose output. 1090.It Cm MACs 1091Specifies the MAC (message authentication code) algorithms 1092in order of preference. 1093The MAC algorithm is used for data integrity protection. 1094Multiple algorithms must be comma-separated. 1095If the specified value begins with a 1096.Sq + 1097character, then the specified algorithms will be appended to the default set 1098instead of replacing them. 1099If the specified value begins with a 1100.Sq - 1101character, then the specified algorithms (including wildcards) will be removed 1102from the default set instead of replacing them. 1103.Pp 1104The algorithms that contain 1105.Qq -etm 1106calculate the MAC after encryption (encrypt-then-mac). 1107These are considered safer and their use recommended. 1108.Pp 1109The default is: 1110.Bd -literal -offset indent 1111umac-64-etm@openssh.com,umac-128-etm@openssh.com, 1112hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com, 1113hmac-sha1-etm@openssh.com, 1114umac-64@openssh.com,umac-128@openssh.com, 1115hmac-sha2-256,hmac-sha2-512,hmac-sha1 1116.Ed 1117.Pp 1118The list of available MAC algorithms may also be obtained using 1119.Qq ssh -Q mac . 1120.It Cm NoHostAuthenticationForLocalhost 1121Disable host authentication for localhost (loopback addresses). 1122The argument to this keyword must be 1123.Cm yes 1124or 1125.Cm no 1126(the default). 1127.It Cm NumberOfPasswordPrompts 1128Specifies the number of password prompts before giving up. 1129The argument to this keyword must be an integer. 1130The default is 3. 1131.It Cm PasswordAuthentication 1132Specifies whether to use password authentication. 1133The argument to this keyword must be 1134.Cm yes 1135(the default) 1136or 1137.Cm no . 1138.It Cm PermitLocalCommand 1139Allow local command execution via the 1140.Ic LocalCommand 1141option or using the 1142.Ic !\& Ns Ar command 1143escape sequence in 1144.Xr ssh 1 . 1145The argument must be 1146.Cm yes 1147or 1148.Cm no 1149(the default). 1150.It Cm PKCS11Provider 1151Specifies which PKCS#11 provider to use. 1152The argument to this keyword is the PKCS#11 shared library 1153.Xr ssh 1 1154should use to communicate with a PKCS#11 token providing the user's 1155private RSA key. 1156.It Cm Port 1157Specifies the port number to connect on the remote host. 1158The default is 22. 1159.It Cm PreferredAuthentications 1160Specifies the order in which the client should try authentication methods. 1161This allows a client to prefer one method (e.g.\& 1162.Cm keyboard-interactive ) 1163over another method (e.g.\& 1164.Cm password ) . 1165The default is: 1166.Bd -literal -offset indent 1167gssapi-with-mic,hostbased,publickey, 1168keyboard-interactive,password 1169.Ed 1170.It Cm ProxyCommand 1171Specifies the command to use to connect to the server. 1172The command 1173string extends to the end of the line, and is executed 1174using the user's shell 1175.Ql exec 1176directive to avoid a lingering shell process. 1177.Pp 1178Arguments to 1179.Cm ProxyCommand 1180accept the tokens described in the 1181.Sx TOKENS 1182section. 1183The command can be basically anything, 1184and should read from its standard input and write to its standard output. 1185It should eventually connect an 1186.Xr sshd 8 1187server running on some machine, or execute 1188.Ic sshd -i 1189somewhere. 1190Host key management will be done using the 1191HostName of the host being connected (defaulting to the name typed by 1192the user). 1193Setting the command to 1194.Cm none 1195disables this option entirely. 1196Note that 1197.Cm CheckHostIP 1198is not available for connects with a proxy command. 1199.Pp 1200This directive is useful in conjunction with 1201.Xr nc 1 1202and its proxy support. 1203For example, the following directive would connect via an HTTP proxy at 1204192.0.2.0: 1205.Bd -literal -offset 3n 1206ProxyCommand /usr/bin/nc -X connect -x 192.0.2.0:8080 %h %p 1207.Ed 1208.It Cm ProxyJump 1209Specifies one or more jump proxies as either 1210.Xo 1211.Sm off 1212.Op Ar user No @ 1213.Ar host 1214.Op : Ns Ar port 1215.Sm on 1216or an ssh URI 1217.Xc . 1218Multiple proxies may be separated by comma characters and will be visited 1219sequentially. 1220Setting this option will cause 1221.Xr ssh 1 1222to connect to the target host by first making a 1223.Xr ssh 1 1224connection to the specified 1225.Cm ProxyJump 1226host and then establishing a 1227TCP forwarding to the ultimate target from there. 1228.Pp 1229Note that this option will compete with the 1230.Cm ProxyCommand 1231option - whichever is specified first will prevent later instances of the 1232other from taking effect. 1233.It Cm ProxyUseFdpass 1234Specifies that 1235.Cm ProxyCommand 1236will pass a connected file descriptor back to 1237.Xr ssh 1 1238instead of continuing to execute and pass data. 1239The default is 1240.Cm no . 1241.It Cm PubkeyAcceptedKeyTypes 1242Specifies the key types that will be used for public key authentication 1243as a comma-separated pattern list. 1244Alternately if the specified value begins with a 1245.Sq + 1246character, then the key types after it will be appended to the default 1247instead of replacing it. 1248If the specified value begins with a 1249.Sq - 1250character, then the specified key types (including wildcards) will be removed 1251from the default set instead of replacing them. 1252The default for this option is: 1253.Bd -literal -offset 3n 1254ecdsa-sha2-nistp256-cert-v01@openssh.com, 1255ecdsa-sha2-nistp384-cert-v01@openssh.com, 1256ecdsa-sha2-nistp521-cert-v01@openssh.com, 1257ssh-ed25519-cert-v01@openssh.com, 1258ssh-rsa-cert-v01@openssh.com, 1259ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521, 1260ssh-ed25519,ssh-rsa 1261.Ed 1262.Pp 1263The list of available key types may also be obtained using 1264.Qq ssh -Q key . 1265.It Cm PubkeyAuthentication 1266Specifies whether to try public key authentication. 1267The argument to this keyword must be 1268.Cm yes 1269(the default) 1270or 1271.Cm no . 1272.It Cm RekeyLimit 1273Specifies the maximum amount of data that may be transmitted before the 1274session key is renegotiated, optionally followed a maximum amount of 1275time that may pass before the session key is renegotiated. 1276The first argument is specified in bytes and may have a suffix of 1277.Sq K , 1278.Sq M , 1279or 1280.Sq G 1281to indicate Kilobytes, Megabytes, or Gigabytes, respectively. 1282The default is between 1283.Sq 1G 1284and 1285.Sq 4G , 1286depending on the cipher. 1287The optional second value is specified in seconds and may use any of the 1288units documented in the 1289.Sx TIME FORMATS 1290section of 1291.Xr sshd_config 5 . 1292The default value for 1293.Cm RekeyLimit 1294is 1295.Cm default none , 1296which means that rekeying is performed after the cipher's default amount 1297of data has been sent or received and no time based rekeying is done. 1298.It Cm RemoteCommand 1299Specifies a command to execute on the remote machine after successfully 1300connecting to the server. 1301The command string extends to the end of the line, and is executed with 1302the user's shell. 1303Arguments to 1304.Cm RemoteCommand 1305accept the tokens described in the 1306.Sx TOKENS 1307section. 1308.It Cm RemoteForward 1309Specifies that a TCP port on the remote machine be forwarded over 1310the secure channel. 1311The remote port may either be forwarded to a specified host and port 1312from the local machine, or may act as a SOCKS 4/5 proxy that allows a remote 1313client to connect to arbitrary destinations from the local machine. 1314The first argument must be 1315.Sm off 1316.Oo Ar bind_address : Oc Ar port 1317.Sm on 1318If forwarding to a specific destination then the second argument must be 1319.Ar host : Ns Ar hostport , 1320otherwise if no destination argument is specified then the remote forwarding 1321will be established as a SOCKS proxy. 1322.Pp 1323IPv6 addresses can be specified by enclosing addresses in square brackets. 1324Multiple forwardings may be specified, and additional 1325forwardings can be given on the command line. 1326Privileged ports can be forwarded only when 1327logging in as root on the remote machine. 1328.Pp 1329If the 1330.Ar port 1331argument is 0, 1332the listen port will be dynamically allocated on the server and reported 1333to the client at run time. 1334.Pp 1335If the 1336.Ar bind_address 1337is not specified, the default is to only bind to loopback addresses. 1338If the 1339.Ar bind_address 1340is 1341.Ql * 1342or an empty string, then the forwarding is requested to listen on all 1343interfaces. 1344Specifying a remote 1345.Ar bind_address 1346will only succeed if the server's 1347.Cm GatewayPorts 1348option is enabled (see 1349.Xr sshd_config 5 ) . 1350.It Cm RequestTTY 1351Specifies whether to request a pseudo-tty for the session. 1352The argument may be one of: 1353.Cm no 1354(never request a TTY), 1355.Cm yes 1356(always request a TTY when standard input is a TTY), 1357.Cm force 1358(always request a TTY) or 1359.Cm auto 1360(request a TTY when opening a login session). 1361This option mirrors the 1362.Fl t 1363and 1364.Fl T 1365flags for 1366.Xr ssh 1 . 1367.It Cm RevokedHostKeys 1368Specifies revoked host public keys. 1369Keys listed in this file will be refused for host authentication. 1370Note that if this file does not exist or is not readable, 1371then host authentication will be refused for all hosts. 1372Keys may be specified as a text file, listing one public key per line, or as 1373an OpenSSH Key Revocation List (KRL) as generated by 1374.Xr ssh-keygen 1 . 1375For more information on KRLs, see the KEY REVOCATION LISTS section in 1376.Xr ssh-keygen 1 . 1377.It Cm SendEnv 1378Specifies what variables from the local 1379.Xr environ 7 1380should be sent to the server. 1381The server must also support it, and the server must be configured to 1382accept these environment variables. 1383Note that the 1384.Ev TERM 1385environment variable is always sent whenever a 1386pseudo-terminal is requested as it is required by the protocol. 1387Refer to 1388.Cm AcceptEnv 1389in 1390.Xr sshd_config 5 1391for how to configure the server. 1392Variables are specified by name, which may contain wildcard characters. 1393Multiple environment variables may be separated by whitespace or spread 1394across multiple 1395.Cm SendEnv 1396directives. 1397.Pp 1398See 1399.Sx PATTERNS 1400for more information on patterns. 1401.Pp 1402It is possible to clear previously set 1403.Cm SendEnv 1404variable names by prefixing patterns with 1405.Pa - . 1406The default is not to send any environment variables. 1407.It Cm ServerAliveCountMax 1408Sets the number of server alive messages (see below) which may be 1409sent without 1410.Xr ssh 1 1411receiving any messages back from the server. 1412If this threshold is reached while server alive messages are being sent, 1413ssh will disconnect from the server, terminating the session. 1414It is important to note that the use of server alive messages is very 1415different from 1416.Cm TCPKeepAlive 1417(below). 1418The server alive messages are sent through the encrypted channel 1419and therefore will not be spoofable. 1420The TCP keepalive option enabled by 1421.Cm TCPKeepAlive 1422is spoofable. 1423The server alive mechanism is valuable when the client or 1424server depend on knowing when a connection has become inactive. 1425.Pp 1426The default value is 3. 1427If, for example, 1428.Cm ServerAliveInterval 1429(see below) is set to 15 and 1430.Cm ServerAliveCountMax 1431is left at the default, if the server becomes unresponsive, 1432ssh will disconnect after approximately 45 seconds. 1433.It Cm ServerAliveInterval 1434Sets a timeout interval in seconds after which if no data has been received 1435from the server, 1436.Xr ssh 1 1437will send a message through the encrypted 1438channel to request a response from the server. 1439The default 1440is 0, indicating that these messages will not be sent to the server. 1441.It Cm StreamLocalBindMask 1442Sets the octal file creation mode mask 1443.Pq umask 1444used when creating a Unix-domain socket file for local or remote 1445port forwarding. 1446This option is only used for port forwarding to a Unix-domain socket file. 1447.Pp 1448The default value is 0177, which creates a Unix-domain socket file that is 1449readable and writable only by the owner. 1450Note that not all operating systems honor the file mode on Unix-domain 1451socket files. 1452.It Cm StreamLocalBindUnlink 1453Specifies whether to remove an existing Unix-domain socket file for local 1454or remote port forwarding before creating a new one. 1455If the socket file already exists and 1456.Cm StreamLocalBindUnlink 1457is not enabled, 1458.Nm ssh 1459will be unable to forward the port to the Unix-domain socket file. 1460This option is only used for port forwarding to a Unix-domain socket file. 1461.Pp 1462The argument must be 1463.Cm yes 1464or 1465.Cm no 1466(the default). 1467.It Cm StrictHostKeyChecking 1468If this flag is set to 1469.Cm yes , 1470.Xr ssh 1 1471will never automatically add host keys to the 1472.Pa ~/.ssh/known_hosts 1473file, and refuses to connect to hosts whose host key has changed. 1474This provides maximum protection against man-in-the-middle (MITM) attacks, 1475though it can be annoying when the 1476.Pa /etc/ssh/ssh_known_hosts 1477file is poorly maintained or when connections to new hosts are 1478frequently made. 1479This option forces the user to manually 1480add all new hosts. 1481.Pp 1482If this flag is set to 1483.Dq accept-new 1484then ssh will automatically add new host keys to the user 1485known hosts files, but will not permit connections to hosts with 1486changed host keys. 1487If this flag is set to 1488.Dq no 1489or 1490.Dq off , 1491ssh will automatically add new host keys to the user known hosts files 1492and allow connections to hosts with changed hostkeys to proceed, 1493subject to some restrictions. 1494If this flag is set to 1495.Cm ask 1496(the default), 1497new host keys 1498will be added to the user known host files only after the user 1499has confirmed that is what they really want to do, and 1500ssh will refuse to connect to hosts whose host key has changed. 1501The host keys of 1502known hosts will be verified automatically in all cases. 1503.It Cm SyslogFacility 1504Gives the facility code that is used when logging messages from 1505.Xr ssh 1 . 1506The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2, 1507LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7. 1508The default is USER. 1509.It Cm TCPKeepAlive 1510Specifies whether the system should send TCP keepalive messages to the 1511other side. 1512If they are sent, death of the connection or crash of one 1513of the machines will be properly noticed. 1514However, this means that 1515connections will die if the route is down temporarily, and some people 1516find it annoying. 1517.Pp 1518The default is 1519.Cm yes 1520(to send TCP keepalive messages), and the client will notice 1521if the network goes down or the remote host dies. 1522This is important in scripts, and many users want it too. 1523.Pp 1524To disable TCP keepalive messages, the value should be set to 1525.Cm no . 1526See also 1527.Cm ServerAliveInterval 1528for protocol-level keepalives. 1529.It Cm Tunnel 1530Request 1531.Xr tun 4 1532device forwarding between the client and the server. 1533The argument must be 1534.Cm yes , 1535.Cm point-to-point 1536(layer 3), 1537.Cm ethernet 1538(layer 2), 1539or 1540.Cm no 1541(the default). 1542Specifying 1543.Cm yes 1544requests the default tunnel mode, which is 1545.Cm point-to-point . 1546.It Cm TunnelDevice 1547Specifies the 1548.Xr tun 4 1549devices to open on the client 1550.Pq Ar local_tun 1551and the server 1552.Pq Ar remote_tun . 1553.Pp 1554The argument must be 1555.Sm off 1556.Ar local_tun Op : Ar remote_tun . 1557.Sm on 1558The devices may be specified by numerical ID or the keyword 1559.Cm any , 1560which uses the next available tunnel device. 1561If 1562.Ar remote_tun 1563is not specified, it defaults to 1564.Cm any . 1565The default is 1566.Cm any:any . 1567.It Cm UpdateHostKeys 1568Specifies whether 1569.Xr ssh 1 1570should accept notifications of additional hostkeys from the server sent 1571after authentication has completed and add them to 1572.Cm UserKnownHostsFile . 1573The argument must be 1574.Cm yes , 1575.Cm no 1576(the default) or 1577.Cm ask . 1578Enabling this option allows learning alternate hostkeys for a server 1579and supports graceful key rotation by allowing a server to send replacement 1580public keys before old ones are removed. 1581Additional hostkeys are only accepted if the key used to authenticate the 1582host was already trusted or explicitly accepted by the user. 1583If 1584.Cm UpdateHostKeys 1585is set to 1586.Cm ask , 1587then the user is asked to confirm the modifications to the known_hosts file. 1588Confirmation is currently incompatible with 1589.Cm ControlPersist , 1590and will be disabled if it is enabled. 1591.Pp 1592Presently, only 1593.Xr sshd 8 1594from OpenSSH 6.8 and greater support the 1595.Qq hostkeys@openssh.com 1596protocol extension used to inform the client of all the server's hostkeys. 1597.It Cm UsePrivilegedPort 1598Specifies whether to use a privileged port for outgoing connections. 1599The argument must be 1600.Cm yes 1601or 1602.Cm no 1603(the default). 1604If set to 1605.Cm yes , 1606.Xr ssh 1 1607must be setuid root. 1608.It Cm User 1609Specifies the user to log in as. 1610This can be useful when a different user name is used on different machines. 1611This saves the trouble of 1612having to remember to give the user name on the command line. 1613.It Cm UserKnownHostsFile 1614Specifies one or more files to use for the user 1615host key database, separated by whitespace. 1616The default is 1617.Pa ~/.ssh/known_hosts , 1618.Pa ~/.ssh/known_hosts2 . 1619.It Cm VerifyHostKeyDNS 1620Specifies whether to verify the remote key using DNS and SSHFP resource 1621records. 1622If this option is set to 1623.Cm yes , 1624the client will implicitly trust keys that match a secure fingerprint 1625from DNS. 1626Insecure fingerprints will be handled as if this option was set to 1627.Cm ask . 1628If this option is set to 1629.Cm ask , 1630information on fingerprint match will be displayed, but the user will still 1631need to confirm new host keys according to the 1632.Cm StrictHostKeyChecking 1633option. 1634The default is 1635.Cm no . 1636.Pp 1637See also 1638.Sx VERIFYING HOST KEYS 1639in 1640.Xr ssh 1 . 1641.It Cm VisualHostKey 1642If this flag is set to 1643.Cm yes , 1644an ASCII art representation of the remote host key fingerprint is 1645printed in addition to the fingerprint string at login and 1646for unknown host keys. 1647If this flag is set to 1648.Cm no 1649(the default), 1650no fingerprint strings are printed at login and 1651only the fingerprint string will be printed for unknown host keys. 1652.It Cm XAuthLocation 1653Specifies the full pathname of the 1654.Xr xauth 1 1655program. 1656The default is 1657.Pa /usr/X11R6/bin/xauth . 1658.El 1659.Sh PATTERNS 1660A 1661.Em pattern 1662consists of zero or more non-whitespace characters, 1663.Sq * 1664(a wildcard that matches zero or more characters), 1665or 1666.Sq ?\& 1667(a wildcard that matches exactly one character). 1668For example, to specify a set of declarations for any host in the 1669.Qq .co.uk 1670set of domains, 1671the following pattern could be used: 1672.Pp 1673.Dl Host *.co.uk 1674.Pp 1675The following pattern 1676would match any host in the 192.168.0.[0-9] network range: 1677.Pp 1678.Dl Host 192.168.0.? 1679.Pp 1680A 1681.Em pattern-list 1682is a comma-separated list of patterns. 1683Patterns within pattern-lists may be negated 1684by preceding them with an exclamation mark 1685.Pq Sq !\& . 1686For example, 1687to allow a key to be used from anywhere within an organization 1688except from the 1689.Qq dialup 1690pool, 1691the following entry (in authorized_keys) could be used: 1692.Pp 1693.Dl from=\&"!*.dialup.example.com,*.example.com\&" 1694.Pp 1695Note that a negated match will never produce a positive result by itself. 1696For example, attempting to match 1697.Qq host3 1698against the following pattern-list will fail: 1699.Pp 1700.Dl from=\&"!host1,!host2\&" 1701.Pp 1702The solution here is to include a term that will yield a positive match, 1703such as a wildcard: 1704.Pp 1705.Dl from=\&"!host1,!host2,*\&" 1706.Sh TOKENS 1707Arguments to some keywords can make use of tokens, 1708which are expanded at runtime: 1709.Pp 1710.Bl -tag -width XXXX -offset indent -compact 1711.It %% 1712A literal 1713.Sq % . 1714.It \&%C 1715Hash of %l%h%p%r. 1716.It %d 1717Local user's home directory. 1718.It %h 1719The remote hostname. 1720.It %i 1721The local user ID. 1722.It %L 1723The local hostname. 1724.It %l 1725The local hostname, including the domain name. 1726.It %n 1727The original remote hostname, as given on the command line. 1728.It %p 1729The remote port. 1730.It %r 1731The remote username. 1732.It \&%T 1733The local 1734.Xr tun 4 1735or 1736.Xr tap 4 1737network interface assigned if 1738tunnel forwarding was requested, or 1739.Qq NONE 1740otherwise. 1741.It %u 1742The local username. 1743.El 1744.Pp 1745.Cm Match exec 1746accepts the tokens %%, %h, %L, %l, %n, %p, %r, and %u. 1747.Pp 1748.Cm CertificateFile 1749accepts the tokens %%, %d, %h, %l, %r, and %u. 1750.Pp 1751.Cm ControlPath 1752accepts the tokens %%, %C, %h, %i, %L, %l, %n, %p, %r, and %u. 1753.Pp 1754.Cm HostName 1755accepts the tokens %% and %h. 1756.Pp 1757.Cm IdentityAgent 1758and 1759.Cm IdentityFile 1760accept the tokens %%, %d, %h, %l, %r, and %u. 1761.Pp 1762.Cm LocalCommand 1763accepts the tokens %%, %C, %d, %h, %l, %n, %p, %r, %T, and %u. 1764.Pp 1765.Cm ProxyCommand 1766accepts the tokens %%, %h, %p, and %r. 1767.Pp 1768.Cm RemoteCommand 1769accepts the tokens %%, %C, %d, %h, %l, %n, %p, %r, and %u. 1770.Sh FILES 1771.Bl -tag -width Ds 1772.It Pa ~/.ssh/config 1773This is the per-user configuration file. 1774The format of this file is described above. 1775This file is used by the SSH client. 1776Because of the potential for abuse, this file must have strict permissions: 1777read/write for the user, and not accessible by others. 1778.It Pa /etc/ssh/ssh_config 1779Systemwide configuration file. 1780This file provides defaults for those 1781values that are not specified in the user's configuration file, and 1782for those users who do not have a configuration file. 1783This file must be world-readable. 1784.El 1785.Sh SEE ALSO 1786.Xr ssh 1 1787.Sh AUTHORS 1788.An -nosplit 1789OpenSSH is a derivative of the original and free 1790ssh 1.2.12 release by 1791.An Tatu Ylonen . 1792.An Aaron Campbell , Bob Beck , Markus Friedl , 1793.An Niels Provos , Theo de Raadt 1794and 1795.An Dug Song 1796removed many bugs, re-added newer features and 1797created OpenSSH. 1798.An Markus Friedl 1799contributed the support for SSH protocol versions 1.5 and 2.0. 1800