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