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