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