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.402 2024/09/09 14:41:21 naddy Exp $ 37.Dd $Mdocdate: September 9 2024 $ 38.Dt SSH_CONFIG 5 39.Os 40.Sh NAME 41.Nm ssh_config 42.Nd OpenSSH client configuration file 43.Sh DESCRIPTION 44.Xr ssh 1 45obtains configuration data from the following sources in 46the following order: 47.Pp 48.Bl -enum -offset indent -compact 49.It 50command-line options 51.It 52user's configuration file 53.Pq Pa ~/.ssh/config 54.It 55system-wide configuration file 56.Pq Pa /etc/ssh/ssh_config 57.El 58.Pp 59Unless noted otherwise, for each parameter, the first obtained value 60will be used. 61The configuration files contain sections separated by 62.Cm Host 63specifications, and that section is only applied for hosts that 64match one of the patterns given in the specification. 65The matched host name is usually the one given on the command line 66(see the 67.Cm CanonicalizeHostname 68option for exceptions). 69.Pp 70Since the first obtained value for each parameter is used, more 71host-specific declarations should be given near the beginning of the 72file, and general defaults at the end. 73.Pp 74The file contains keyword-argument pairs, one per line. 75Lines starting with 76.Ql # 77and empty lines are interpreted as comments. 78Arguments may optionally be enclosed in double quotes 79.Pq \&" 80in order to represent arguments containing spaces. 81Configuration options may be separated by whitespace or 82optional whitespace and exactly one 83.Ql = ; 84the latter format is useful to avoid the need to quote whitespace 85when specifying configuration options using the 86.Nm ssh , 87.Nm scp , 88and 89.Nm sftp 90.Fl o 91option. 92.Pp 93The possible 94keywords and their meanings are as follows (note that 95keywords are case-insensitive and arguments are case-sensitive): 96.Bl -tag -width Ds 97.It Cm Host 98Restricts the following declarations (up to the next 99.Cm Host 100or 101.Cm Match 102keyword) to be only for those hosts that match one of the patterns 103given after the keyword. 104If more than one pattern is provided, they should be separated by whitespace. 105A single 106.Ql * 107as a pattern can be used to provide global 108defaults for all hosts. 109The host is usually the 110.Ar hostname 111argument given on the command line 112(see the 113.Cm CanonicalizeHostname 114keyword for exceptions). 115.Pp 116A pattern entry may be negated by prefixing it with an exclamation mark 117.Pq Sq !\& . 118If a negated entry is matched, then the 119.Cm Host 120entry is ignored, regardless of whether any other patterns on the line 121match. 122Negated matches are therefore useful to provide exceptions for wildcard 123matches. 124.Pp 125See 126.Sx PATTERNS 127for more information on patterns. 128.It Cm Match 129Restricts the following declarations (up to the next 130.Cm Host 131or 132.Cm Match 133keyword) to be used only when the conditions following the 134.Cm Match 135keyword are satisfied. 136Match conditions are specified using one or more criteria 137or the single token 138.Cm all 139which always matches. 140The available criteria keywords are: 141.Cm canonical , 142.Cm final , 143.Cm exec , 144.Cm localnetwork , 145.Cm host , 146.Cm originalhost , 147.Cm tagged , 148.Cm user , 149and 150.Cm localuser . 151The 152.Cm all 153criteria must appear alone or immediately after 154.Cm canonical 155or 156.Cm final . 157Other criteria may be combined arbitrarily. 158All criteria but 159.Cm all , 160.Cm canonical , 161and 162.Cm final 163require an argument. 164Criteria may be negated by prepending an exclamation mark 165.Pq Sq !\& . 166.Pp 167The 168.Cm canonical 169keyword matches only when the configuration file is being re-parsed 170after hostname canonicalization (see the 171.Cm CanonicalizeHostname 172option). 173This may be useful to specify conditions that work with canonical host 174names only. 175.Pp 176The 177.Cm final 178keyword requests that the configuration be re-parsed (regardless of whether 179.Cm CanonicalizeHostname 180is enabled), and matches only during this final pass. 181If 182.Cm CanonicalizeHostname 183is enabled, then 184.Cm canonical 185and 186.Cm final 187match during the same pass. 188.Pp 189The 190.Cm exec 191keyword executes the specified command under the user's shell. 192If the command returns a zero exit status then the condition is considered true. 193Commands containing whitespace characters must be quoted. 194Arguments to 195.Cm exec 196accept the tokens described in the 197.Sx TOKENS 198section. 199.Pp 200The 201.Cm localnetwork 202keyword matches the addresses of active local network interfaces against the 203supplied list of networks in CIDR format. 204This may be convenient for varying the effective configuration on devices that 205roam between networks. 206Note that network address is not a trustworthy criteria in many 207situations (e.g. when the network is automatically configured using DHCP) 208and so caution should be applied if using it to control security-sensitive 209configuration. 210.Pp 211The other keywords' criteria must be single entries or comma-separated 212lists and may use the wildcard and negation operators described in the 213.Sx PATTERNS 214section. 215The criteria for the 216.Cm host 217keyword are matched against the target hostname, after any substitution 218by the 219.Cm Hostname 220or 221.Cm CanonicalizeHostname 222options. 223The 224.Cm originalhost 225keyword matches against the hostname as it was specified on the command-line. 226The 227.Cm tagged 228keyword matches a tag name specified by a prior 229.Cm Tag 230directive or on the 231.Xr ssh 1 232command-line using the 233.Fl P 234flag. 235The 236.Cm user 237keyword matches against the target username on the remote host. 238The 239.Cm localuser 240keyword matches against the name of the local user running 241.Xr ssh 1 242(this keyword may be useful in system-wide 243.Nm 244files). 245.It Cm AddKeysToAgent 246Specifies whether keys should be automatically added to a running 247.Xr ssh-agent 1 . 248If this option is set to 249.Cm yes 250and a key is loaded from a file, the key and its passphrase are added to 251the agent with the default lifetime, as if by 252.Xr ssh-add 1 . 253If this option is set to 254.Cm ask , 255.Xr ssh 1 256will require confirmation using the 257.Ev SSH_ASKPASS 258program before adding a key (see 259.Xr ssh-add 1 260for details). 261If this option is set to 262.Cm confirm , 263each use of the key must be confirmed, as if the 264.Fl c 265option was specified to 266.Xr ssh-add 1 . 267If this option is set to 268.Cm no , 269no keys are added to the agent. 270Alternately, this option may be specified as a time interval 271using the format described in the 272.Sx TIME FORMATS 273section of 274.Xr sshd_config 5 275to specify the key's lifetime in 276.Xr ssh-agent 1 , 277after which it will automatically be removed. 278The argument must be 279.Cm no 280(the default), 281.Cm yes , 282.Cm confirm 283(optionally followed by a time interval), 284.Cm ask 285or a time interval. 286.It Cm AddressFamily 287Specifies which address family to use when connecting. 288Valid arguments are 289.Cm any 290(the default), 291.Cm inet 292(use IPv4 only), or 293.Cm inet6 294(use IPv6 only). 295.It Cm BatchMode 296If set to 297.Cm yes , 298user interaction such as password prompts and host key confirmation requests 299will be disabled. 300This option is useful in scripts and other batch jobs where no user 301is present to interact with 302.Xr ssh 1 . 303The argument must be 304.Cm yes 305or 306.Cm no 307(the default). 308.It Cm BindAddress 309Use the specified address on the local machine as the source address of 310the connection. 311Only useful on systems with more than one address. 312.It Cm BindInterface 313Use the address of the specified interface on the local machine as the 314source address of the connection. 315.It Cm CanonicalDomains 316When 317.Cm CanonicalizeHostname 318is enabled, this option specifies the list of domain suffixes in which to 319search for the specified destination host. 320.It Cm CanonicalizeFallbackLocal 321Specifies whether to fail with an error when hostname canonicalization fails. 322The default, 323.Cm yes , 324will attempt to look up the unqualified hostname using the system resolver's 325search rules. 326A value of 327.Cm no 328will cause 329.Xr ssh 1 330to fail instantly if 331.Cm CanonicalizeHostname 332is enabled and the target hostname cannot be found in any of the domains 333specified by 334.Cm CanonicalDomains . 335.It Cm CanonicalizeHostname 336Controls whether explicit hostname canonicalization is performed. 337The default, 338.Cm no , 339is not to perform any name rewriting and let the system resolver handle all 340hostname lookups. 341If set to 342.Cm yes 343then, for connections that do not use a 344.Cm ProxyCommand 345or 346.Cm ProxyJump , 347.Xr ssh 1 348will attempt to canonicalize the hostname specified on the command line 349using the 350.Cm CanonicalDomains 351suffixes and 352.Cm CanonicalizePermittedCNAMEs 353rules. 354If 355.Cm CanonicalizeHostname 356is set to 357.Cm always , 358then canonicalization is applied to proxied connections too. 359.Pp 360If this option is enabled, then the configuration files are processed 361again using the new target name to pick up any new configuration in matching 362.Cm Host 363and 364.Cm Match 365stanzas. 366A value of 367.Cm none 368disables the use of a 369.Cm ProxyJump 370host. 371.It Cm CanonicalizeMaxDots 372Specifies the maximum number of dot characters in a hostname before 373canonicalization is disabled. 374The default, 1, 375allows a single dot (i.e. hostname.subdomain). 376.It Cm CanonicalizePermittedCNAMEs 377Specifies rules to determine whether CNAMEs should be followed when 378canonicalizing hostnames. 379The rules consist of one or more arguments of 380.Ar source_domain_list : Ns Ar target_domain_list , 381where 382.Ar source_domain_list 383is a pattern-list of domains that may follow CNAMEs in canonicalization, 384and 385.Ar target_domain_list 386is a pattern-list of domains that they may resolve to. 387.Pp 388For example, 389.Qq *.a.example.com:*.b.example.com,*.c.example.com 390will allow hostnames matching 391.Qq *.a.example.com 392to be canonicalized to names in the 393.Qq *.b.example.com 394or 395.Qq *.c.example.com 396domains. 397.Pp 398A single argument of 399.Qq none 400causes no CNAMEs to be considered for canonicalization. 401This is the default behaviour. 402.It Cm CASignatureAlgorithms 403Specifies which algorithms are allowed for signing of certificates 404by certificate authorities (CAs). 405The default is: 406.Bd -literal -offset indent 407ssh-ed25519,ecdsa-sha2-nistp256, 408ecdsa-sha2-nistp384,ecdsa-sha2-nistp521, 409sk-ssh-ed25519@openssh.com, 410sk-ecdsa-sha2-nistp256@openssh.com, 411rsa-sha2-512,rsa-sha2-256 412.Ed 413.Pp 414If the specified list begins with a 415.Sq + 416character, then the specified algorithms will be appended to the default set 417instead of replacing them. 418If the specified list begins with a 419.Sq - 420character, then the specified algorithms (including wildcards) will be removed 421from the default set instead of replacing them. 422.Pp 423.Xr ssh 1 424will not accept host certificates signed using algorithms other than those 425specified. 426.It Cm CertificateFile 427Specifies a file from which the user's certificate is read. 428A corresponding private key must be provided separately in order 429to use this certificate either 430from an 431.Cm IdentityFile 432directive or 433.Fl i 434flag to 435.Xr ssh 1 , 436via 437.Xr ssh-agent 1 , 438or via a 439.Cm PKCS11Provider 440or 441.Cm SecurityKeyProvider . 442.Pp 443Arguments to 444.Cm CertificateFile 445may use the tilde syntax to refer to a user's home directory, 446the tokens described in the 447.Sx TOKENS 448section and environment variables as described in the 449.Sx ENVIRONMENT VARIABLES 450section. 451.Pp 452It is possible to have multiple certificate files specified in 453configuration files; these certificates will be tried in sequence. 454Multiple 455.Cm CertificateFile 456directives will add to the list of certificates used for 457authentication. 458.It Cm ChannelTimeout 459Specifies whether and how quickly 460.Xr ssh 1 461should close inactive channels. 462Timeouts are specified as one or more 463.Dq type=interval 464pairs separated by whitespace, where the 465.Dq type 466must be the special keyword 467.Dq global 468or a channel type name from the list below, optionally containing 469wildcard characters. 470.Pp 471The timeout value 472.Dq interval 473is specified in seconds or may use any of the units documented in the 474.Sx TIME FORMATS 475section. 476For example, 477.Dq session=5m 478would cause interactive sessions to terminate after five minutes of 479inactivity. 480Specifying a zero value disables the inactivity timeout. 481.Pp 482The special timeout 483.Dq global 484applies to all active channels, taken together. 485Traffic on any active channel will reset the timeout, but when the timeout 486expires then all open channels will be closed. 487Note that this global timeout is not matched by wildcards and must be 488specified explicitly. 489.Pp 490The available channel type names include: 491.Bl -tag -width Ds 492.It Cm agent-connection 493Open connections to 494.Xr ssh-agent 1 . 495.It Cm direct-tcpip , Cm direct-streamlocal@openssh.com 496Open TCP or Unix socket (respectively) connections that have 497been established from a 498.Xr ssh 1 499local forwarding, i.e.\& 500.Cm LocalForward 501or 502.Cm DynamicForward . 503.It Cm forwarded-tcpip , Cm forwarded-streamlocal@openssh.com 504Open TCP or Unix socket (respectively) connections that have been 505established to a 506.Xr sshd 8 507listening on behalf of a 508.Xr ssh 1 509remote forwarding, i.e.\& 510.Cm RemoteForward . 511.It Cm session 512The interactive main session, including shell session, command execution, 513.Xr scp 1 , 514.Xr sftp 1 , 515etc. 516.It Cm tun-connection 517Open 518.Cm TunnelForward 519connections. 520.It Cm x11-connection 521Open X11 forwarding sessions. 522.El 523.Pp 524Note that in all the above cases, terminating an inactive session does not 525guarantee to remove all resources associated with the session, e.g. shell 526processes or X11 clients relating to the session may continue to execute. 527.Pp 528Moreover, terminating an inactive channel or session does not necessarily 529close the SSH connection, nor does it prevent a client from 530requesting another channel of the same type. 531In particular, expiring an inactive forwarding session does not prevent 532another identical forwarding from being subsequently created. 533.Pp 534The default is not to expire channels of any type for inactivity. 535.It Cm CheckHostIP 536If set to 537.Cm yes , 538.Xr ssh 1 539will additionally check the host IP address in the 540.Pa known_hosts 541file. 542This allows it to detect if a host key changed due to DNS spoofing 543and will add addresses of destination hosts to 544.Pa ~/.ssh/known_hosts 545in the process, regardless of the setting of 546.Cm StrictHostKeyChecking . 547If the option is set to 548.Cm no 549(the default), 550the check will not be executed. 551.It Cm Ciphers 552Specifies the ciphers allowed and their order of preference. 553Multiple ciphers must be comma-separated. 554If the specified list begins with a 555.Sq + 556character, then the specified ciphers will be appended to the default set 557instead of replacing them. 558If the specified list begins with a 559.Sq - 560character, then the specified ciphers (including wildcards) will be removed 561from the default set instead of replacing them. 562If the specified list begins with a 563.Sq ^ 564character, then the specified ciphers will be placed at the head of the 565default set. 566.Pp 567The supported ciphers are: 568.Bd -literal -offset indent 5693des-cbc 570aes128-cbc 571aes192-cbc 572aes256-cbc 573aes128-ctr 574aes192-ctr 575aes256-ctr 576aes128-gcm@openssh.com 577aes256-gcm@openssh.com 578chacha20-poly1305@openssh.com 579.Ed 580.Pp 581The default is: 582.Bd -literal -offset indent 583chacha20-poly1305@openssh.com, 584aes128-ctr,aes192-ctr,aes256-ctr, 585aes128-gcm@openssh.com,aes256-gcm@openssh.com 586.Ed 587.Pp 588The list of available ciphers may also be obtained using 589.Qq ssh -Q cipher . 590.It Cm ClearAllForwardings 591Specifies that all local, remote, and dynamic port forwardings 592specified in the configuration files or on the command line be 593cleared. 594This option is primarily useful when used from the 595.Xr ssh 1 596command line to clear port forwardings set in 597configuration files, and is automatically set by 598.Xr scp 1 599and 600.Xr sftp 1 . 601The argument must be 602.Cm yes 603or 604.Cm no 605(the default). 606.It Cm Compression 607Specifies whether to use compression. 608The argument must be 609.Cm yes 610or 611.Cm no 612(the default). 613.It Cm ConnectionAttempts 614Specifies the number of tries (one per second) to make before exiting. 615The argument must be an integer. 616This may be useful in scripts if the connection sometimes fails. 617The default is 1. 618.It Cm ConnectTimeout 619Specifies the timeout (in seconds) used when connecting to the 620SSH server, instead of using the default system TCP timeout. 621This timeout is applied both to establishing the connection and to performing 622the initial SSH protocol handshake and key exchange. 623.It Cm ControlMaster 624Enables the sharing of multiple sessions over a single network connection. 625When set to 626.Cm yes , 627.Xr ssh 1 628will listen for connections on a control socket specified using the 629.Cm ControlPath 630argument. 631Additional sessions can connect to this socket using the same 632.Cm ControlPath 633with 634.Cm ControlMaster 635set to 636.Cm no 637(the default). 638These sessions will try to reuse the master instance's network connection 639rather than initiating new ones, but will fall back to connecting normally 640if the control socket does not exist, or is not listening. 641.Pp 642Setting this to 643.Cm ask 644will cause 645.Xr ssh 1 646to listen for control connections, but require confirmation using 647.Xr ssh-askpass 1 . 648If the 649.Cm ControlPath 650cannot be opened, 651.Xr ssh 1 652will continue without connecting to a master instance. 653.Pp 654X11 and 655.Xr ssh-agent 1 656forwarding is supported over these multiplexed connections, however the 657display and agent forwarded will be the one belonging to the master 658connection i.e. it is not possible to forward multiple displays or agents. 659.Pp 660Two additional options allow for opportunistic multiplexing: try to use a 661master connection but fall back to creating a new one if one does not already 662exist. 663These options are: 664.Cm auto 665and 666.Cm autoask . 667The latter requires confirmation like the 668.Cm ask 669option. 670.It Cm ControlPath 671Specify the path to the control socket used for connection sharing as described 672in the 673.Cm ControlMaster 674section above or the string 675.Cm none 676to disable connection sharing. 677Arguments to 678.Cm ControlPath 679may use the tilde syntax to refer to a user's home directory, 680the tokens described in the 681.Sx TOKENS 682section and environment variables as described in the 683.Sx ENVIRONMENT VARIABLES 684section. 685It is recommended that any 686.Cm ControlPath 687used for opportunistic connection sharing include 688at least %h, %p, and %r (or alternatively %C) and be placed in a directory 689that is not writable by other users. 690This ensures that shared connections are uniquely identified. 691.It Cm ControlPersist 692When used in conjunction with 693.Cm ControlMaster , 694specifies that the master connection should remain open 695in the background (waiting for future client connections) 696after the initial client connection has been closed. 697If set to 698.Cm no 699(the default), 700then the master connection will not be placed into the background, 701and will close as soon as the initial client connection is closed. 702If set to 703.Cm yes 704or 0, 705then the master connection will remain in the background indefinitely 706(until killed or closed via a mechanism such as the 707.Qq ssh -O exit ) . 708If set to a time in seconds, or a time in any of the formats documented in 709.Xr sshd_config 5 , 710then the backgrounded master connection will automatically terminate 711after it has remained idle (with no client connections) for the 712specified time. 713.It Cm DynamicForward 714Specifies that a TCP port on the local machine be forwarded 715over the secure channel, and the application 716protocol is then used to determine where to connect to from the 717remote machine. 718.Pp 719The argument must be 720.Sm off 721.Oo Ar bind_address : Oc Ar port . 722.Sm on 723IPv6 addresses can be specified by enclosing addresses in square brackets. 724By default, the local port is bound in accordance with the 725.Cm GatewayPorts 726setting. 727However, an explicit 728.Ar bind_address 729may be used to bind the connection to a specific address. 730The 731.Ar bind_address 732of 733.Cm localhost 734indicates that the listening port be bound for local use only, while an 735empty address or 736.Sq * 737indicates that the port should be available from all interfaces. 738.Pp 739Currently the SOCKS4 and SOCKS5 protocols are supported, and 740.Xr ssh 1 741will act as a SOCKS server. 742Multiple forwardings may be specified, and 743additional forwardings can be given on the command line. 744Only the superuser can forward privileged ports. 745.It Cm EnableEscapeCommandline 746Enables the command line option in the 747.Cm EscapeChar 748menu for interactive sessions (default 749.Ql ~C ) . 750By default, the command line is disabled. 751.It Cm EnableSSHKeysign 752Setting this option to 753.Cm yes 754in the global client configuration file 755.Pa /etc/ssh/ssh_config 756enables the use of the helper program 757.Xr ssh-keysign 8 758during 759.Cm HostbasedAuthentication . 760The argument must be 761.Cm yes 762or 763.Cm no 764(the default). 765This option should be placed in the non-hostspecific section. 766See 767.Xr ssh-keysign 8 768for more information. 769.It Cm EscapeChar 770Sets the escape character (default: 771.Ql ~ ) . 772The escape character can also 773be set on the command line. 774The argument should be a single character, 775.Ql ^ 776followed by a letter, or 777.Cm none 778to disable the escape 779character entirely (making the connection transparent for binary 780data). 781.It Cm ExitOnForwardFailure 782Specifies whether 783.Xr ssh 1 784should terminate the connection if it cannot set up all requested 785dynamic, tunnel, local, and remote port forwardings, (e.g.\& 786if either end is unable to bind and listen on a specified port). 787Note that 788.Cm ExitOnForwardFailure 789does not apply to connections made over port forwardings and will not, 790for example, cause 791.Xr ssh 1 792to exit if TCP connections to the ultimate forwarding destination fail. 793The argument must be 794.Cm yes 795or 796.Cm no 797(the default). 798.It Cm FingerprintHash 799Specifies the hash algorithm used when displaying key fingerprints. 800Valid options are: 801.Cm md5 802and 803.Cm sha256 804(the default). 805.It Cm ForkAfterAuthentication 806Requests 807.Nm ssh 808to go to background just before command execution. 809This is useful if 810.Nm ssh 811is going to ask for passwords or passphrases, but the user 812wants it in the background. 813This implies the 814.Cm StdinNull 815configuration option being set to 816.Dq yes . 817The recommended way to start X11 programs at a remote site is with 818something like 819.Ic ssh -f host xterm , 820which is the same as 821.Ic ssh host xterm 822if the 823.Cm ForkAfterAuthentication 824configuration option is set to 825.Dq yes . 826.Pp 827If the 828.Cm ExitOnForwardFailure 829configuration option is set to 830.Dq yes , 831then a client started with the 832.Cm ForkAfterAuthentication 833configuration option being set to 834.Dq yes 835will wait for all remote port forwards to be successfully established 836before placing itself in the background. 837The argument to this keyword must be 838.Cm yes 839(same as the 840.Fl f 841option) or 842.Cm no 843(the default). 844.It Cm ForwardAgent 845Specifies whether the connection to the authentication agent (if any) 846will be forwarded to the remote machine. 847The argument may be 848.Cm yes , 849.Cm no 850(the default), 851an explicit path to an agent socket or the name of an environment variable 852(beginning with 853.Sq $ ) 854in which to find the path. 855.Pp 856Agent forwarding should be enabled with caution. 857Users with the ability to bypass file permissions on the remote host 858(for the agent's Unix-domain socket) 859can access the local agent through the forwarded connection. 860An attacker cannot obtain key material from the agent, 861however they can perform operations on the keys that enable them to 862authenticate using the identities loaded into the agent. 863.It Cm ForwardX11 864Specifies whether X11 connections will be automatically redirected 865over the secure channel and 866.Ev DISPLAY 867set. 868The argument must be 869.Cm yes 870or 871.Cm no 872(the default). 873.Pp 874X11 forwarding should be enabled with caution. 875Users with the ability to bypass file permissions on the remote host 876(for the user's X11 authorization database) 877can access the local X11 display through the forwarded connection. 878An attacker may then be able to perform activities such as keystroke monitoring 879if the 880.Cm ForwardX11Trusted 881option is also enabled. 882.It Cm ForwardX11Timeout 883Specify a timeout for untrusted X11 forwarding 884using the format described in the 885.Sx TIME FORMATS 886section of 887.Xr sshd_config 5 . 888X11 connections received by 889.Xr ssh 1 890after this time will be refused. 891Setting 892.Cm ForwardX11Timeout 893to zero will disable the timeout and permit X11 forwarding for the life 894of the connection. 895The default is to disable untrusted X11 forwarding after twenty minutes has 896elapsed. 897.It Cm ForwardX11Trusted 898If this option is set to 899.Cm yes , 900remote X11 clients will have full access to the original X11 display. 901.Pp 902If this option is set to 903.Cm no 904(the default), 905remote X11 clients will be considered untrusted and prevented 906from stealing or tampering with data belonging to trusted X11 907clients. 908Furthermore, the 909.Xr xauth 1 910token used for the session will be set to expire after 20 minutes. 911Remote clients will be refused access after this time. 912.Pp 913See the X11 SECURITY extension specification for full details on 914the restrictions imposed on untrusted clients. 915.It Cm GatewayPorts 916Specifies whether remote hosts are allowed to connect to local 917forwarded ports. 918By default, 919.Xr ssh 1 920binds local port forwardings to the loopback address. 921This prevents other remote hosts from connecting to forwarded ports. 922.Cm GatewayPorts 923can be used to specify that ssh 924should bind local port forwardings to the wildcard address, 925thus allowing remote hosts to connect to forwarded ports. 926The argument must be 927.Cm yes 928or 929.Cm no 930(the default). 931.It Cm GlobalKnownHostsFile 932Specifies one or more files to use for the global 933host key database, separated by whitespace. 934The default is 935.Pa /etc/ssh/ssh_known_hosts , 936.Pa /etc/ssh/ssh_known_hosts2 . 937.It Cm GSSAPIAuthentication 938Specifies whether user authentication based on GSSAPI is allowed. 939The default is 940.Cm no . 941.It Cm GSSAPIDelegateCredentials 942Forward (delegate) credentials to the server. 943The default is 944.Cm no . 945.It Cm HashKnownHosts 946Indicates that 947.Xr ssh 1 948should hash host names and addresses when they are added to 949.Pa ~/.ssh/known_hosts . 950These hashed names may be used normally by 951.Xr ssh 1 952and 953.Xr sshd 8 , 954but they do not visually reveal identifying information if the 955file's contents are disclosed. 956The default is 957.Cm no . 958Note that existing names and addresses in known hosts files 959will not be converted automatically, 960but may be manually hashed using 961.Xr ssh-keygen 1 . 962.It Cm HostbasedAcceptedAlgorithms 963Specifies the signature algorithms that will be used for hostbased 964authentication as a comma-separated list of patterns. 965Alternately if the specified list begins with a 966.Sq + 967character, then the specified signature algorithms will be appended 968to the default set instead of replacing them. 969If the specified list begins with a 970.Sq - 971character, then the specified signature algorithms (including wildcards) 972will be removed from the default set instead of replacing them. 973If the specified list begins with a 974.Sq ^ 975character, then the specified signature algorithms will be placed 976at the head of the default set. 977The default for this option is: 978.Bd -literal -offset 3n 979ssh-ed25519-cert-v01@openssh.com, 980ecdsa-sha2-nistp256-cert-v01@openssh.com, 981ecdsa-sha2-nistp384-cert-v01@openssh.com, 982ecdsa-sha2-nistp521-cert-v01@openssh.com, 983sk-ssh-ed25519-cert-v01@openssh.com, 984sk-ecdsa-sha2-nistp256-cert-v01@openssh.com, 985rsa-sha2-512-cert-v01@openssh.com, 986rsa-sha2-256-cert-v01@openssh.com, 987ssh-ed25519, 988ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521, 989sk-ssh-ed25519@openssh.com, 990sk-ecdsa-sha2-nistp256@openssh.com, 991rsa-sha2-512,rsa-sha2-256 992.Ed 993.Pp 994The 995.Fl Q 996option of 997.Xr ssh 1 998may be used to list supported signature algorithms. 999This was formerly named HostbasedKeyTypes. 1000.It Cm HostbasedAuthentication 1001Specifies whether to try rhosts based authentication with public key 1002authentication. 1003The argument must be 1004.Cm yes 1005or 1006.Cm no 1007(the default). 1008.It Cm HostKeyAlgorithms 1009Specifies the host key signature algorithms 1010that the client wants to use in order of preference. 1011Alternately if the specified list begins with a 1012.Sq + 1013character, then the specified signature algorithms will be appended to 1014the default set instead of replacing them. 1015If the specified list begins with a 1016.Sq - 1017character, then the specified signature algorithms (including wildcards) 1018will be removed from the default set instead of replacing them. 1019If the specified list begins with a 1020.Sq ^ 1021character, then the specified signature algorithms will be placed 1022at the head of the default set. 1023The default for this option is: 1024.Bd -literal -offset 3n 1025ssh-ed25519-cert-v01@openssh.com, 1026ecdsa-sha2-nistp256-cert-v01@openssh.com, 1027ecdsa-sha2-nistp384-cert-v01@openssh.com, 1028ecdsa-sha2-nistp521-cert-v01@openssh.com, 1029sk-ssh-ed25519-cert-v01@openssh.com, 1030sk-ecdsa-sha2-nistp256-cert-v01@openssh.com, 1031rsa-sha2-512-cert-v01@openssh.com, 1032rsa-sha2-256-cert-v01@openssh.com, 1033ssh-ed25519, 1034ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521, 1035sk-ecdsa-sha2-nistp256@openssh.com, 1036sk-ssh-ed25519@openssh.com, 1037rsa-sha2-512,rsa-sha2-256 1038.Ed 1039.Pp 1040If hostkeys are known for the destination host then this default is modified 1041to prefer their algorithms. 1042.Pp 1043The list of available signature algorithms may also be obtained using 1044.Qq ssh -Q HostKeyAlgorithms . 1045.It Cm HostKeyAlias 1046Specifies an alias that should be used instead of the 1047real host name when looking up or saving the host key 1048in the host key database files and when validating host certificates. 1049This option is useful for tunneling SSH connections 1050or for multiple servers running on a single host. 1051.It Cm Hostname 1052Specifies the real host name to log into. 1053This can be used to specify nicknames or abbreviations for hosts. 1054Arguments to 1055.Cm Hostname 1056accept the tokens described in the 1057.Sx TOKENS 1058section. 1059Numeric IP addresses are also permitted (both on the command line and in 1060.Cm Hostname 1061specifications). 1062The default is the name given on the command line. 1063.It Cm IdentitiesOnly 1064Specifies that 1065.Xr ssh 1 1066should only use the configured authentication identity and certificate files 1067(either the default files, or those explicitly configured in the 1068.Nm 1069files 1070or passed on the 1071.Xr ssh 1 1072command-line), 1073even if 1074.Xr ssh-agent 1 1075or a 1076.Cm PKCS11Provider 1077or 1078.Cm SecurityKeyProvider 1079offers more identities. 1080The argument to this keyword must be 1081.Cm yes 1082or 1083.Cm no 1084(the default). 1085This option is intended for situations where ssh-agent 1086offers many different identities. 1087.It Cm IdentityAgent 1088Specifies the 1089.Ux Ns -domain 1090socket used to communicate with the authentication agent. 1091.Pp 1092This option overrides the 1093.Ev SSH_AUTH_SOCK 1094environment variable and can be used to select a specific agent. 1095Setting the socket name to 1096.Cm none 1097disables the use of an authentication agent. 1098If the string 1099.Qq SSH_AUTH_SOCK 1100is specified, the location of the socket will be read from the 1101.Ev SSH_AUTH_SOCK 1102environment variable. 1103Otherwise if the specified value begins with a 1104.Sq $ 1105character, then it will be treated as an environment variable containing 1106the location of the socket. 1107.Pp 1108Arguments to 1109.Cm IdentityAgent 1110may use the tilde syntax to refer to a user's home directory, 1111the tokens described in the 1112.Sx TOKENS 1113section and environment variables as described in the 1114.Sx ENVIRONMENT VARIABLES 1115section. 1116.It Cm IdentityFile 1117Specifies a file from which the user's ECDSA, authenticator-hosted ECDSA, 1118Ed25519, authenticator-hosted Ed25519 or RSA authentication identity is read. 1119You can also specify a public key file to use the corresponding 1120private key that is loaded in 1121.Xr ssh-agent 1 1122when the private key file is not present locally. 1123The default is 1124.Pa ~/.ssh/id_rsa , 1125.Pa ~/.ssh/id_ecdsa , 1126.Pa ~/.ssh/id_ecdsa_sk , 1127.Pa ~/.ssh/id_ed25519 1128and 1129.Pa ~/.ssh/id_ed25519_sk . 1130Additionally, any identities represented by the authentication agent 1131will be used for authentication unless 1132.Cm IdentitiesOnly 1133is set. 1134If no certificates have been explicitly specified by 1135.Cm CertificateFile , 1136.Xr ssh 1 1137will try to load certificate information from the filename obtained by 1138appending 1139.Pa -cert.pub 1140to the path of a specified 1141.Cm IdentityFile . 1142.Pp 1143Arguments to 1144.Cm IdentityFile 1145may use the tilde syntax to refer to a user's home directory 1146or the tokens described in the 1147.Sx TOKENS 1148section. 1149Alternately an argument of 1150.Cm none 1151may be used to indicate no identity files should be loaded. 1152.Pp 1153It is possible to have 1154multiple identity files specified in configuration files; all these 1155identities will be tried in sequence. 1156Multiple 1157.Cm IdentityFile 1158directives will add to the list of identities tried (this behaviour 1159differs from that of other configuration directives). 1160.Pp 1161.Cm IdentityFile 1162may be used in conjunction with 1163.Cm IdentitiesOnly 1164to select which identities in an agent are offered during authentication. 1165.Cm IdentityFile 1166may also be used in conjunction with 1167.Cm CertificateFile 1168in order to provide any certificate also needed for authentication with 1169the identity. 1170.It Cm IgnoreUnknown 1171Specifies a pattern-list of unknown options to be ignored if they are 1172encountered in configuration parsing. 1173This may be used to suppress errors if 1174.Nm 1175contains options that are unrecognised by 1176.Xr ssh 1 . 1177It is recommended that 1178.Cm IgnoreUnknown 1179be listed early in the configuration file as it will not be applied 1180to unknown options that appear before it. 1181.It Cm Include 1182Include the specified configuration file(s). 1183Multiple pathnames may be specified and each pathname may contain 1184.Xr glob 7 1185wildcards, 1186tokens as described in the 1187.Sx TOKENS 1188section, environment variables as described in the 1189.Sx ENVIRONMENT VARIABLES 1190section and, for user configurations, shell-like 1191.Sq ~ 1192references to user home directories. 1193Wildcards will be expanded and processed in lexical order. 1194Files without absolute paths are assumed to be in 1195.Pa ~/.ssh 1196if included in a user configuration file or 1197.Pa /etc/ssh 1198if included from the system configuration file. 1199.Cm Include 1200directive may appear inside a 1201.Cm Match 1202or 1203.Cm Host 1204block 1205to perform conditional inclusion. 1206.It Cm IPQoS 1207Specifies the IPv4 type-of-service or DSCP class for connections. 1208Accepted values are 1209.Cm af11 , 1210.Cm af12 , 1211.Cm af13 , 1212.Cm af21 , 1213.Cm af22 , 1214.Cm af23 , 1215.Cm af31 , 1216.Cm af32 , 1217.Cm af33 , 1218.Cm af41 , 1219.Cm af42 , 1220.Cm af43 , 1221.Cm cs0 , 1222.Cm cs1 , 1223.Cm cs2 , 1224.Cm cs3 , 1225.Cm cs4 , 1226.Cm cs5 , 1227.Cm cs6 , 1228.Cm cs7 , 1229.Cm ef , 1230.Cm le , 1231.Cm lowdelay , 1232.Cm throughput , 1233.Cm reliability , 1234a numeric value, or 1235.Cm none 1236to use the operating system default. 1237This option may take one or two arguments, separated by whitespace. 1238If one argument is specified, it is used as the packet class unconditionally. 1239If two values are specified, the first is automatically selected for 1240interactive sessions and the second for non-interactive sessions. 1241The default is 1242.Cm af21 1243(Low-Latency Data) 1244for interactive sessions and 1245.Cm cs1 1246(Lower Effort) 1247for non-interactive sessions. 1248.It Cm KbdInteractiveAuthentication 1249Specifies whether to use keyboard-interactive authentication. 1250The argument to this keyword must be 1251.Cm yes 1252(the default) 1253or 1254.Cm no . 1255.Cm ChallengeResponseAuthentication 1256is a deprecated alias for this. 1257.It Cm KbdInteractiveDevices 1258Specifies the list of methods to use in keyboard-interactive authentication. 1259Multiple method names must be comma-separated. 1260The default is to use the server specified list. 1261The methods available vary depending on what the server supports. 1262For an OpenSSH server, 1263it may be zero or more of: 1264.Cm bsdauth 1265and 1266.Cm pam . 1267.It Cm KexAlgorithms 1268Specifies the permitted KEX (Key Exchange) algorithms that will be used and 1269their preference order. 1270The selected algorithm will be the first algorithm in this list that 1271the server also supports. 1272Multiple algorithms must be comma-separated. 1273.Pp 1274If the specified list begins with a 1275.Sq + 1276character, then the specified algorithms will be appended to the default set 1277instead of replacing them. 1278If the specified list begins with a 1279.Sq - 1280character, then the specified algorithms (including wildcards) will be removed 1281from the default set instead of replacing them. 1282If the specified list begins with a 1283.Sq ^ 1284character, then the specified algorithms will be placed at the head of the 1285default set. 1286.Pp 1287The default is: 1288.Bd -literal -offset indent 1289sntrup761x25519-sha512,sntrup761x25519-sha512@openssh.com, 1290mlkem768x25519-sha256, 1291curve25519-sha256,curve25519-sha256@libssh.org, 1292ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521, 1293diffie-hellman-group-exchange-sha256, 1294diffie-hellman-group16-sha512, 1295diffie-hellman-group18-sha512, 1296diffie-hellman-group14-sha256 1297.Ed 1298.Pp 1299The list of supported key exchange algorithms may also be obtained using 1300.Qq ssh -Q kex . 1301.It Cm KnownHostsCommand 1302Specifies a command to use to obtain a list of host keys, in addition to 1303those listed in 1304.Cm UserKnownHostsFile 1305and 1306.Cm GlobalKnownHostsFile . 1307This command is executed after the files have been read. 1308It may write host key lines to standard output in identical format to the 1309usual files (described in the 1310.Sx VERIFYING HOST KEYS 1311section in 1312.Xr ssh 1 ) . 1313Arguments to 1314.Cm KnownHostsCommand 1315accept the tokens described in the 1316.Sx TOKENS 1317section. 1318The command may be invoked multiple times per connection: once when preparing 1319the preference list of host key algorithms to use, again to obtain the 1320host key for the requested host name and, if 1321.Cm CheckHostIP 1322is enabled, one more time to obtain the host key matching the server's 1323address. 1324If the command exits abnormally or returns a non-zero exit status then the 1325connection is terminated. 1326.It Cm LocalCommand 1327Specifies a command to execute on the local machine after successfully 1328connecting to the server. 1329The command string extends to the end of the line, and is executed with 1330the user's shell. 1331Arguments to 1332.Cm LocalCommand 1333accept the tokens described in the 1334.Sx TOKENS 1335section. 1336.Pp 1337The command is run synchronously and does not have access to the 1338session of the 1339.Xr ssh 1 1340that spawned it. 1341It should not be used for interactive commands. 1342.Pp 1343This directive is ignored unless 1344.Cm PermitLocalCommand 1345has been enabled. 1346.It Cm LocalForward 1347Specifies that a TCP port on the local machine be forwarded over 1348the secure channel to the specified host and port from the remote machine. 1349The first argument specifies the listener and may be 1350.Sm off 1351.Oo Ar bind_address : Oc Ar port 1352.Sm on 1353or a Unix domain socket path. 1354The second argument is the destination and may be 1355.Ar host : Ns Ar hostport 1356or a Unix domain socket path if the remote host supports it. 1357.Pp 1358IPv6 addresses can be specified by enclosing addresses in square brackets. 1359Multiple forwardings may be specified, and additional forwardings can be 1360given on the command line. 1361Only the superuser can forward privileged ports. 1362By default, the local port is bound in accordance with the 1363.Cm GatewayPorts 1364setting. 1365However, an explicit 1366.Ar bind_address 1367may be used to bind the connection to a specific address. 1368The 1369.Ar bind_address 1370of 1371.Cm localhost 1372indicates that the listening port be bound for local use only, while an 1373empty address or 1374.Sq * 1375indicates that the port should be available from all interfaces. 1376Unix domain socket paths may use the tokens described in the 1377.Sx TOKENS 1378section and environment variables as described in the 1379.Sx ENVIRONMENT VARIABLES 1380section. 1381.It Cm LogLevel 1382Gives the verbosity level that is used when logging messages from 1383.Xr ssh 1 . 1384The possible values are: 1385QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3. 1386The default is INFO. 1387DEBUG and DEBUG1 are equivalent. 1388DEBUG2 and DEBUG3 each specify higher levels of verbose output. 1389.It Cm LogVerbose 1390Specify one or more overrides to LogLevel. 1391An override consists of one or more pattern lists that matches the 1392source file, function and line number to force detailed logging for. 1393For example, an override pattern of: 1394.Bd -literal -offset indent 1395kex.c:*:1000,*:kex_exchange_identification():*,packet.c:* 1396.Ed 1397.Pp 1398would enable detailed logging for line 1000 of 1399.Pa kex.c , 1400everything in the 1401.Fn kex_exchange_identification 1402function, and all code in the 1403.Pa packet.c 1404file. 1405This option is intended for debugging and no overrides are enabled by default. 1406.It Cm MACs 1407Specifies the MAC (message authentication code) algorithms 1408in order of preference. 1409The MAC algorithm is used for data integrity protection. 1410Multiple algorithms must be comma-separated. 1411If the specified list begins with a 1412.Sq + 1413character, then the specified algorithms will be appended to the default set 1414instead of replacing them. 1415If the specified list begins with a 1416.Sq - 1417character, then the specified algorithms (including wildcards) will be removed 1418from the default set instead of replacing them. 1419If the specified list begins with a 1420.Sq ^ 1421character, then the specified algorithms will be placed at the head of the 1422default set. 1423.Pp 1424The algorithms that contain 1425.Qq -etm 1426calculate the MAC after encryption (encrypt-then-mac). 1427These are considered safer and their use recommended. 1428.Pp 1429The default is: 1430.Bd -literal -offset indent 1431umac-64-etm@openssh.com,umac-128-etm@openssh.com, 1432hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com, 1433hmac-sha1-etm@openssh.com, 1434umac-64@openssh.com,umac-128@openssh.com, 1435hmac-sha2-256,hmac-sha2-512,hmac-sha1 1436.Ed 1437.Pp 1438The list of available MAC algorithms may also be obtained using 1439.Qq ssh -Q mac . 1440.It Cm NoHostAuthenticationForLocalhost 1441Disable host authentication for localhost (loopback addresses). 1442The argument to this keyword must be 1443.Cm yes 1444or 1445.Cm no 1446(the default). 1447.It Cm NumberOfPasswordPrompts 1448Specifies the number of password prompts before giving up. 1449The argument to this keyword must be an integer. 1450The default is 3. 1451.It Cm ObscureKeystrokeTiming 1452Specifies whether 1453.Xr ssh 1 1454should try to obscure inter-keystroke timings from passive observers of 1455network traffic. 1456If enabled, then for interactive sessions, 1457.Xr ssh 1 1458will send keystrokes at fixed intervals of a few tens of milliseconds 1459and will send fake keystroke packets for some time after typing ceases. 1460The argument to this keyword must be 1461.Cm yes , 1462.Cm no 1463or an interval specifier of the form 1464.Cm interval:milliseconds 1465(e.g.\& 1466.Cm interval:80 1467for 80 milliseconds). 1468The default is to obscure keystrokes using a 20ms packet interval. 1469Note that smaller intervals will result in higher fake keystroke packet rates. 1470.It Cm PasswordAuthentication 1471Specifies whether to use password authentication. 1472The argument to this keyword must be 1473.Cm yes 1474(the default) 1475or 1476.Cm no . 1477.It Cm PermitLocalCommand 1478Allow local command execution via the 1479.Ic LocalCommand 1480option or using the 1481.Ic !\& Ns Ar command 1482escape sequence in 1483.Xr ssh 1 . 1484The argument must be 1485.Cm yes 1486or 1487.Cm no 1488(the default). 1489.It Cm PermitRemoteOpen 1490Specifies the destinations to which remote TCP port forwarding is permitted when 1491.Cm RemoteForward 1492is used as a SOCKS proxy. 1493The forwarding specification must be one of the following forms: 1494.Pp 1495.Bl -item -offset indent -compact 1496.It 1497.Cm PermitRemoteOpen 1498.Sm off 1499.Ar host : port 1500.Sm on 1501.It 1502.Cm PermitRemoteOpen 1503.Sm off 1504.Ar IPv4_addr : port 1505.Sm on 1506.It 1507.Cm PermitRemoteOpen 1508.Sm off 1509.Ar \&[ IPv6_addr \&] : port 1510.Sm on 1511.El 1512.Pp 1513Multiple forwards may be specified by separating them with whitespace. 1514An argument of 1515.Cm any 1516can be used to remove all restrictions and permit any forwarding requests. 1517An argument of 1518.Cm none 1519can be used to prohibit all forwarding requests. 1520The wildcard 1521.Sq * 1522can be used for host or port to allow all hosts or ports respectively. 1523Otherwise, no pattern matching or address lookups are performed on supplied 1524names. 1525.It Cm PKCS11Provider 1526Specifies which PKCS#11 provider to use or 1527.Cm none 1528to indicate that no provider should be used (the default). 1529The argument to this keyword is a path to the PKCS#11 shared library 1530.Xr ssh 1 1531should use to communicate with a PKCS#11 token providing keys for user 1532authentication. 1533.It Cm Port 1534Specifies the port number to connect on the remote host. 1535The default is 22. 1536.It Cm PreferredAuthentications 1537Specifies the order in which the client should try authentication methods. 1538This allows a client to prefer one method (e.g.\& 1539.Cm keyboard-interactive ) 1540over another method (e.g.\& 1541.Cm password ) . 1542The default is: 1543.Bd -literal -offset indent 1544gssapi-with-mic,hostbased,publickey, 1545keyboard-interactive,password 1546.Ed 1547.It Cm ProxyCommand 1548Specifies the command to use to connect to the server. 1549The command 1550string extends to the end of the line, and is executed 1551using the user's shell 1552.Ql exec 1553directive to avoid a lingering shell process. 1554.Pp 1555Arguments to 1556.Cm ProxyCommand 1557accept the tokens described in the 1558.Sx TOKENS 1559section. 1560The command can be basically anything, 1561and should read from its standard input and write to its standard output. 1562It should eventually connect an 1563.Xr sshd 8 1564server running on some machine, or execute 1565.Ic sshd -i 1566somewhere. 1567Host key management will be done using the 1568.Cm Hostname 1569of the host being connected (defaulting to the name typed by the user). 1570Setting the command to 1571.Cm none 1572disables this option entirely. 1573Note that 1574.Cm CheckHostIP 1575is not available for connects with a proxy command. 1576.Pp 1577This directive is useful in conjunction with 1578.Xr nc 1 1579and its proxy support. 1580For example, the following directive would connect via an HTTP proxy at 1581192.0.2.0: 1582.Bd -literal -offset 3n 1583ProxyCommand /usr/bin/nc -X connect -x 192.0.2.0:8080 %h %p 1584.Ed 1585.It Cm ProxyJump 1586Specifies one or more jump proxies as either 1587.Xo 1588.Sm off 1589.Op Ar user No @ 1590.Ar host 1591.Op : Ns Ar port 1592.Sm on 1593or an ssh URI 1594.Xc . 1595Multiple proxies may be separated by comma characters and will be visited 1596sequentially. 1597Setting this option will cause 1598.Xr ssh 1 1599to connect to the target host by first making a 1600.Xr ssh 1 1601connection to the specified 1602.Cm ProxyJump 1603host and then establishing a 1604TCP forwarding to the ultimate target from there. 1605Setting the host to 1606.Cm none 1607disables this option entirely. 1608.Pp 1609Note that this option will compete with the 1610.Cm ProxyCommand 1611option - whichever is specified first will prevent later instances of the 1612other from taking effect. 1613.Pp 1614Note also that the configuration for the destination host (either supplied 1615via the command-line or the configuration file) is not generally applied 1616to jump hosts. 1617.Pa ~/.ssh/config 1618should be used if specific configuration is required for jump hosts. 1619.It Cm ProxyUseFdpass 1620Specifies that 1621.Cm ProxyCommand 1622will pass a connected file descriptor back to 1623.Xr ssh 1 1624instead of continuing to execute and pass data. 1625The default is 1626.Cm no . 1627.It Cm PubkeyAcceptedAlgorithms 1628Specifies the signature algorithms that will be used for public key 1629authentication as a comma-separated list of patterns. 1630If the specified list begins with a 1631.Sq + 1632character, then the algorithms after it will be appended to the default 1633instead of replacing it. 1634If the specified list begins with a 1635.Sq - 1636character, then the specified algorithms (including wildcards) will be removed 1637from the default set instead of replacing them. 1638If the specified list begins with a 1639.Sq ^ 1640character, then the specified algorithms will be placed at the head of the 1641default set. 1642The default for this option is: 1643.Bd -literal -offset 3n 1644ssh-ed25519-cert-v01@openssh.com, 1645ecdsa-sha2-nistp256-cert-v01@openssh.com, 1646ecdsa-sha2-nistp384-cert-v01@openssh.com, 1647ecdsa-sha2-nistp521-cert-v01@openssh.com, 1648sk-ssh-ed25519-cert-v01@openssh.com, 1649sk-ecdsa-sha2-nistp256-cert-v01@openssh.com, 1650rsa-sha2-512-cert-v01@openssh.com, 1651rsa-sha2-256-cert-v01@openssh.com, 1652ssh-ed25519, 1653ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521, 1654sk-ssh-ed25519@openssh.com, 1655sk-ecdsa-sha2-nistp256@openssh.com, 1656rsa-sha2-512,rsa-sha2-256 1657.Ed 1658.Pp 1659The list of available signature algorithms may also be obtained using 1660.Qq ssh -Q PubkeyAcceptedAlgorithms . 1661.It Cm PubkeyAuthentication 1662Specifies whether to try public key authentication. 1663The argument to this keyword must be 1664.Cm yes 1665(the default), 1666.Cm no , 1667.Cm unbound 1668or 1669.Cm host-bound . 1670The final two options enable public key authentication while respectively 1671disabling or enabling the OpenSSH host-bound authentication protocol 1672extension required for restricted 1673.Xr ssh-agent 1 1674forwarding. 1675.It Cm RekeyLimit 1676Specifies the maximum amount of data that may be transmitted or received 1677before the session key is renegotiated, optionally followed by a maximum 1678amount of time that may pass before the session key is renegotiated. 1679The first argument is specified in bytes and may have a suffix of 1680.Sq K , 1681.Sq M , 1682or 1683.Sq G 1684to indicate Kilobytes, Megabytes, or Gigabytes, respectively. 1685The default is between 1686.Sq 1G 1687and 1688.Sq 4G , 1689depending on the cipher. 1690The optional second value is specified in seconds and may use any of the 1691units documented in the TIME FORMATS section of 1692.Xr sshd_config 5 . 1693The default value for 1694.Cm RekeyLimit 1695is 1696.Cm default none , 1697which means that rekeying is performed after the cipher's default amount 1698of data has been sent or received and no time based rekeying is done. 1699.It Cm RemoteCommand 1700Specifies a command to execute on the remote machine after successfully 1701connecting to the server. 1702The command string extends to the end of the line, and is executed with 1703the user's shell. 1704Arguments to 1705.Cm RemoteCommand 1706accept the tokens described in the 1707.Sx TOKENS 1708section. 1709.It Cm RemoteForward 1710Specifies that a TCP port on the remote machine be forwarded over 1711the secure channel. 1712The remote port may either be forwarded to a specified host and port 1713from the local machine, or may act as a SOCKS 4/5 proxy that allows a remote 1714client to connect to arbitrary destinations from the local machine. 1715The first argument is the listening specification and may be 1716.Sm off 1717.Oo Ar bind_address : Oc Ar port 1718.Sm on 1719or, if the remote host supports it, a Unix domain socket path. 1720If forwarding to a specific destination then the second argument must be 1721.Ar host : Ns Ar hostport 1722or a Unix domain socket path, 1723otherwise if no destination argument is specified then the remote forwarding 1724will be established as a SOCKS proxy. 1725When acting as a SOCKS proxy, the destination of the connection can be 1726restricted by 1727.Cm PermitRemoteOpen . 1728.Pp 1729IPv6 addresses can be specified by enclosing addresses in square brackets. 1730Multiple forwardings may be specified, and additional 1731forwardings can be given on the command line. 1732Privileged ports can be forwarded only when 1733logging in as root on the remote machine. 1734Unix domain socket paths may use the tokens described in the 1735.Sx TOKENS 1736section and environment variables as described in the 1737.Sx ENVIRONMENT VARIABLES 1738section. 1739.Pp 1740If the 1741.Ar port 1742argument is 0, 1743the listen port will be dynamically allocated on the server and reported 1744to the client at run time. 1745.Pp 1746If the 1747.Ar bind_address 1748is not specified, the default is to only bind to loopback addresses. 1749If the 1750.Ar bind_address 1751is 1752.Ql * 1753or an empty string, then the forwarding is requested to listen on all 1754interfaces. 1755Specifying a remote 1756.Ar bind_address 1757will only succeed if the server's 1758.Cm GatewayPorts 1759option is enabled (see 1760.Xr sshd_config 5 ) . 1761.It Cm RequestTTY 1762Specifies whether to request a pseudo-tty for the session. 1763The argument may be one of: 1764.Cm no 1765(never request a TTY), 1766.Cm yes 1767(always request a TTY when standard input is a TTY), 1768.Cm force 1769(always request a TTY) or 1770.Cm auto 1771(request a TTY when opening a login session). 1772This option mirrors the 1773.Fl t 1774and 1775.Fl T 1776flags for 1777.Xr ssh 1 . 1778.It Cm RequiredRSASize 1779Specifies the minimum RSA key size (in bits) that 1780.Xr ssh 1 1781will accept. 1782User authentication keys smaller than this limit will be ignored. 1783Servers that present host keys smaller than this limit will cause the 1784connection to be terminated. 1785The default is 1786.Cm 1024 1787bits. 1788Note that this limit may only be raised from the default. 1789.It Cm RevokedHostKeys 1790Specifies revoked host public keys. 1791Keys listed in this file will be refused for host authentication. 1792Note that if this file does not exist or is not readable, 1793then host authentication will be refused for all hosts. 1794Keys may be specified as a text file, listing one public key per line, or as 1795an OpenSSH Key Revocation List (KRL) as generated by 1796.Xr ssh-keygen 1 . 1797For more information on KRLs, see the KEY REVOCATION LISTS section in 1798.Xr ssh-keygen 1 . 1799Arguments to 1800.Cm RevokedHostKeys 1801may use the tilde syntax to refer to a user's home directory, 1802the tokens described in the 1803.Sx TOKENS 1804section and environment variables as described in the 1805.Sx ENVIRONMENT VARIABLES 1806section. 1807.It Cm SecurityKeyProvider 1808Specifies a path to a library that will be used when loading any 1809FIDO authenticator-hosted keys, overriding the default of using 1810the built-in USB HID support. 1811.Pp 1812If the specified value begins with a 1813.Sq $ 1814character, then it will be treated as an environment variable containing 1815the path to the library. 1816.It Cm SendEnv 1817Specifies what variables from the local 1818.Xr environ 7 1819should be sent to the server. 1820The server must also support it, and the server must be configured to 1821accept these environment variables. 1822Note that the 1823.Ev TERM 1824environment variable is always sent whenever a 1825pseudo-terminal is requested as it is required by the protocol. 1826Refer to 1827.Cm AcceptEnv 1828in 1829.Xr sshd_config 5 1830for how to configure the server. 1831Variables are specified by name, which may contain wildcard characters. 1832Multiple environment variables may be separated by whitespace or spread 1833across multiple 1834.Cm SendEnv 1835directives. 1836.Pp 1837See 1838.Sx PATTERNS 1839for more information on patterns. 1840.Pp 1841It is possible to clear previously set 1842.Cm SendEnv 1843variable names by prefixing patterns with 1844.Pa - . 1845The default is not to send any environment variables. 1846.It Cm ServerAliveCountMax 1847Sets the number of server alive messages (see below) which may be 1848sent without 1849.Xr ssh 1 1850receiving any messages back from the server. 1851If this threshold is reached while server alive messages are being sent, 1852ssh will disconnect from the server, terminating the session. 1853It is important to note that the use of server alive messages is very 1854different from 1855.Cm TCPKeepAlive 1856(below). 1857The server alive messages are sent through the encrypted channel 1858and therefore will not be spoofable. 1859The TCP keepalive option enabled by 1860.Cm TCPKeepAlive 1861is spoofable. 1862The server alive mechanism is valuable when the client or 1863server depend on knowing when a connection has become unresponsive. 1864.Pp 1865The default value is 3. 1866If, for example, 1867.Cm ServerAliveInterval 1868(see below) is set to 15 and 1869.Cm ServerAliveCountMax 1870is left at the default, if the server becomes unresponsive, 1871ssh will disconnect after approximately 45 seconds. 1872.It Cm ServerAliveInterval 1873Sets a timeout interval in seconds after which if no data has been received 1874from the server, 1875.Xr ssh 1 1876will send a message through the encrypted 1877channel to request a response from the server. 1878The default 1879is 0, indicating that these messages will not be sent to the server. 1880.It Cm SessionType 1881May be used to either request invocation of a subsystem on the remote system, 1882or to prevent the execution of a remote command at all. 1883The latter is useful for just forwarding ports. 1884The argument to this keyword must be 1885.Cm none 1886(same as the 1887.Fl N 1888option), 1889.Cm subsystem 1890(same as the 1891.Fl s 1892option) or 1893.Cm default 1894(shell or command execution). 1895.It Cm SetEnv 1896Directly specify one or more environment variables and their contents to 1897be sent to the server. 1898Similarly to 1899.Cm SendEnv , 1900with the exception of the 1901.Ev TERM 1902variable, the server must be prepared to accept the environment variable. 1903.It Cm StdinNull 1904Redirects stdin from 1905.Pa /dev/null 1906(actually, prevents reading from stdin). 1907Either this or the equivalent 1908.Fl n 1909option must be used when 1910.Nm ssh 1911is run in the background. 1912The argument to this keyword must be 1913.Cm yes 1914(same as the 1915.Fl n 1916option) or 1917.Cm no 1918(the default). 1919.It Cm StreamLocalBindMask 1920Sets the octal file creation mode mask 1921.Pq umask 1922used when creating a Unix-domain socket file for local or remote 1923port forwarding. 1924This option is only used for port forwarding to a Unix-domain socket file. 1925.Pp 1926The default value is 0177, which creates a Unix-domain socket file that is 1927readable and writable only by the owner. 1928Note that not all operating systems honor the file mode on Unix-domain 1929socket files. 1930.It Cm StreamLocalBindUnlink 1931Specifies whether to remove an existing Unix-domain socket file for local 1932or remote port forwarding before creating a new one. 1933If the socket file already exists and 1934.Cm StreamLocalBindUnlink 1935is not enabled, 1936.Nm ssh 1937will be unable to forward the port to the Unix-domain socket file. 1938This option is only used for port forwarding to a Unix-domain socket file. 1939.Pp 1940The argument must be 1941.Cm yes 1942or 1943.Cm no 1944(the default). 1945.It Cm StrictHostKeyChecking 1946If this flag is set to 1947.Cm yes , 1948.Xr ssh 1 1949will never automatically add host keys to the 1950.Pa ~/.ssh/known_hosts 1951file, and refuses to connect to hosts whose host key has changed. 1952This provides maximum protection against man-in-the-middle (MITM) attacks, 1953though it can be annoying when the 1954.Pa /etc/ssh/ssh_known_hosts 1955file is poorly maintained or when connections to new hosts are 1956frequently made. 1957This option forces the user to manually 1958add all new hosts. 1959.Pp 1960If this flag is set to 1961.Cm accept-new 1962then ssh will automatically add new host keys to the user's 1963.Pa known_hosts 1964file, but will not permit connections to hosts with 1965changed host keys. 1966If this flag is set to 1967.Cm no 1968or 1969.Cm off , 1970ssh will automatically add new host keys to the user known hosts files 1971and allow connections to hosts with changed hostkeys to proceed, 1972subject to some restrictions. 1973If this flag is set to 1974.Cm ask 1975(the default), 1976new host keys 1977will be added to the user known host files only after the user 1978has confirmed that is what they really want to do, and 1979ssh will refuse to connect to hosts whose host key has changed. 1980The host keys of 1981known hosts will be verified automatically in all cases. 1982.It Cm SyslogFacility 1983Gives the facility code that is used when logging messages from 1984.Xr ssh 1 . 1985The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2, 1986LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7. 1987The default is USER. 1988.It Cm TCPKeepAlive 1989Specifies whether the system should send TCP keepalive messages to the 1990other side. 1991If they are sent, death of the connection or crash of one 1992of the machines will be properly noticed. 1993However, this means that 1994connections will die if the route is down temporarily, and some people 1995find it annoying. 1996.Pp 1997The default is 1998.Cm yes 1999(to send TCP keepalive messages), and the client will notice 2000if the network goes down or the remote host dies. 2001This is important in scripts, and many users want it too. 2002.Pp 2003To disable TCP keepalive messages, the value should be set to 2004.Cm no . 2005See also 2006.Cm ServerAliveInterval 2007for protocol-level keepalives. 2008.It Cm Tag 2009Specify a configuration tag name that may be later used by a 2010.Cm Match 2011directive to select a block of configuration. 2012.It Cm Tunnel 2013Request 2014.Xr tun 4 2015device forwarding between the client and the server. 2016The argument must be 2017.Cm yes , 2018.Cm point-to-point 2019(layer 3), 2020.Cm ethernet 2021(layer 2), 2022or 2023.Cm no 2024(the default). 2025Specifying 2026.Cm yes 2027requests the default tunnel mode, which is 2028.Cm point-to-point . 2029.It Cm TunnelDevice 2030Specifies the 2031.Xr tun 4 2032devices to open on the client 2033.Pq Ar local_tun 2034and the server 2035.Pq Ar remote_tun . 2036.Pp 2037The argument must be 2038.Sm off 2039.Ar local_tun Op : Ar remote_tun . 2040.Sm on 2041The devices may be specified by numerical ID or the keyword 2042.Cm any , 2043which uses the next available tunnel device. 2044If 2045.Ar remote_tun 2046is not specified, it defaults to 2047.Cm any . 2048The default is 2049.Cm any:any . 2050.It Cm UpdateHostKeys 2051Specifies whether 2052.Xr ssh 1 2053should accept notifications of additional hostkeys from the server sent 2054after authentication has completed and add them to 2055.Cm UserKnownHostsFile . 2056The argument must be 2057.Cm yes , 2058.Cm no 2059or 2060.Cm ask . 2061This option allows learning alternate hostkeys for a server 2062and supports graceful key rotation by allowing a server to send replacement 2063public keys before old ones are removed. 2064.Pp 2065Additional hostkeys are only accepted if the key used to authenticate the 2066host was already trusted or explicitly accepted by the user, the host was 2067authenticated via 2068.Cm UserKnownHostsFile 2069(i.e. not 2070.Cm GlobalKnownHostsFile ) 2071and the host was authenticated using a plain key and not a certificate. 2072.Pp 2073.Cm UpdateHostKeys 2074is enabled by default if the user has not overridden the default 2075.Cm UserKnownHostsFile 2076setting and has not enabled 2077.Cm VerifyHostKeyDNS , 2078otherwise 2079.Cm UpdateHostKeys 2080will be set to 2081.Cm no . 2082.Pp 2083If 2084.Cm UpdateHostKeys 2085is set to 2086.Cm ask , 2087then the user is asked to confirm the modifications to the known_hosts file. 2088Confirmation is currently incompatible with 2089.Cm ControlPersist , 2090and will be disabled if it is enabled. 2091.Pp 2092Presently, only 2093.Xr sshd 8 2094from OpenSSH 6.8 and greater support the 2095.Qq hostkeys@openssh.com 2096protocol extension used to inform the client of all the server's hostkeys. 2097.It Cm User 2098Specifies the user to log in as. 2099This can be useful when a different user name is used on different machines. 2100This saves the trouble of 2101having to remember to give the user name on the command line. 2102.It Cm UserKnownHostsFile 2103Specifies one or more files to use for the user 2104host key database, separated by whitespace. 2105Each filename may use tilde notation to refer to the user's home directory, 2106the tokens described in the 2107.Sx TOKENS 2108section and environment variables as described in the 2109.Sx ENVIRONMENT VARIABLES 2110section. 2111A value of 2112.Cm none 2113causes 2114.Xr ssh 1 2115to ignore any user-specific known hosts files. 2116The default is 2117.Pa ~/.ssh/known_hosts , 2118.Pa ~/.ssh/known_hosts2 . 2119.It Cm VerifyHostKeyDNS 2120Specifies whether to verify the remote key using DNS and SSHFP resource 2121records. 2122If this option is set to 2123.Cm yes , 2124the client will implicitly trust keys that match a secure fingerprint 2125from DNS. 2126Insecure fingerprints will be handled as if this option was set to 2127.Cm ask . 2128If this option is set to 2129.Cm ask , 2130information on fingerprint match will be displayed, but the user will still 2131need to confirm new host keys according to the 2132.Cm StrictHostKeyChecking 2133option. 2134The default is 2135.Cm no . 2136.Pp 2137See also 2138.Sx VERIFYING HOST KEYS 2139in 2140.Xr ssh 1 . 2141.It Cm VisualHostKey 2142If this flag is set to 2143.Cm yes , 2144an ASCII art representation of the remote host key fingerprint is 2145printed in addition to the fingerprint string at login and 2146for unknown host keys. 2147If this flag is set to 2148.Cm no 2149(the default), 2150no fingerprint strings are printed at login and 2151only the fingerprint string will be printed for unknown host keys. 2152.It Cm XAuthLocation 2153Specifies the full pathname of the 2154.Xr xauth 1 2155program. 2156The default is 2157.Pa /usr/local/bin/xauth . 2158.El 2159.Sh PATTERNS 2160A 2161.Em pattern 2162consists of zero or more non-whitespace characters, 2163.Sq * 2164(a wildcard that matches zero or more characters), 2165or 2166.Sq ?\& 2167(a wildcard that matches exactly one character). 2168For example, to specify a set of declarations for any host in the 2169.Qq .co.uk 2170set of domains, 2171the following pattern could be used: 2172.Pp 2173.Dl Host *.co.uk 2174.Pp 2175The following pattern 2176would match any host in the 192.168.0.[0-9] network range: 2177.Pp 2178.Dl Host 192.168.0.? 2179.Pp 2180A 2181.Em pattern-list 2182is a comma-separated list of patterns. 2183Patterns within pattern-lists may be negated 2184by preceding them with an exclamation mark 2185.Pq Sq !\& . 2186For example, 2187to allow a key to be used from anywhere within an organization 2188except from the 2189.Qq dialup 2190pool, 2191the following entry (in authorized_keys) could be used: 2192.Pp 2193.Dl from=\&"!*.dialup.example.com,*.example.com\&" 2194.Pp 2195Note that a negated match will never produce a positive result by itself. 2196For example, attempting to match 2197.Qq host3 2198against the following pattern-list will fail: 2199.Pp 2200.Dl from=\&"!host1,!host2\&" 2201.Pp 2202The solution here is to include a term that will yield a positive match, 2203such as a wildcard: 2204.Pp 2205.Dl from=\&"!host1,!host2,*\&" 2206.Sh TOKENS 2207Arguments to some keywords can make use of tokens, 2208which are expanded at runtime: 2209.Pp 2210.Bl -tag -width XXXX -offset indent -compact 2211.It %% 2212A literal 2213.Sq % . 2214.It \&%C 2215Hash of %l%h%p%r%j. 2216.It %d 2217Local user's home directory. 2218.It %f 2219The fingerprint of the server's host key. 2220.It %H 2221The 2222.Pa known_hosts 2223hostname or address that is being searched for. 2224.It %h 2225The remote hostname. 2226.It \%%I 2227A string describing the reason for a 2228.Cm KnownHostsCommand 2229execution: either 2230.Cm ADDRESS 2231when looking up a host by address (only when 2232.Cm CheckHostIP 2233is enabled), 2234.Cm HOSTNAME 2235when searching by hostname, or 2236.Cm ORDER 2237when preparing the host key algorithm preference list to use for the 2238destination host. 2239.It %i 2240The local user ID. 2241.It %j 2242The contents of the ProxyJump option, or the empty string if this 2243option is unset. 2244.It %K 2245The base64 encoded host key. 2246.It %k 2247The host key alias if specified, otherwise the original remote hostname given 2248on the command line. 2249.It %L 2250The local hostname. 2251.It %l 2252The local hostname, including the domain name. 2253.It %n 2254The original remote hostname, as given on the command line. 2255.It %p 2256The remote port. 2257.It %r 2258The remote username. 2259.It \&%T 2260The local 2261.Xr tun 4 2262or 2263.Xr tap 4 2264network interface assigned if 2265tunnel forwarding was requested, or 2266.Qq NONE 2267otherwise. 2268.It %t 2269The type of the server host key, e.g. 2270.Cm ssh-ed25519 . 2271.It %u 2272The local username. 2273.El 2274.Pp 2275.Cm CertificateFile , 2276.Cm ControlPath , 2277.Cm IdentityAgent , 2278.Cm IdentityFile , 2279.Cm Include , 2280.Cm KnownHostsCommand , 2281.Cm LocalForward , 2282.Cm Match exec , 2283.Cm RemoteCommand , 2284.Cm RemoteForward , 2285.Cm RevokedHostKeys , 2286and 2287.Cm UserKnownHostsFile 2288accept the tokens %%, %C, %d, %h, %i, %j, %k, %L, %l, %n, %p, %r, and %u. 2289.Pp 2290.Cm KnownHostsCommand 2291additionally accepts the tokens %f, %H, %I, %K and %t. 2292.Pp 2293.Cm Hostname 2294accepts the tokens %% and %h. 2295.Pp 2296.Cm LocalCommand 2297accepts all tokens. 2298.Pp 2299.Cm ProxyCommand 2300and 2301.Cm ProxyJump 2302accept the tokens %%, %h, %n, %p, and %r. 2303.Pp 2304Note that some of these directives build commands for execution via the shell. 2305Because 2306.Xr ssh 1 2307performs no filtering or escaping of characters that have special meaning in 2308shell commands (e.g. quotes), it is the user's responsibility to ensure that 2309the arguments passed to 2310.Xr ssh 1 2311do not contain such characters and that tokens are appropriately quoted 2312when used. 2313.Sh ENVIRONMENT VARIABLES 2314Arguments to some keywords can be expanded at runtime from environment 2315variables on the client by enclosing them in 2316.Ic ${} , 2317for example 2318.Ic ${HOME}/.ssh 2319would refer to the user's .ssh directory. 2320If a specified environment variable does not exist then an error will be 2321returned and the setting for that keyword will be ignored. 2322.Pp 2323The keywords 2324.Cm CertificateFile , 2325.Cm ControlPath , 2326.Cm IdentityAgent , 2327.Cm IdentityFile , 2328.Cm Include , 2329.Cm KnownHostsCommand , 2330and 2331.Cm UserKnownHostsFile 2332support environment variables. 2333The keywords 2334.Cm LocalForward 2335and 2336.Cm RemoteForward 2337support environment variables only for Unix domain socket paths. 2338.Sh FILES 2339.Bl -tag -width Ds 2340.It Pa ~/.ssh/config 2341This is the per-user configuration file. 2342The format of this file is described above. 2343This file is used by the SSH client. 2344Because of the potential for abuse, this file must have strict permissions: 2345read/write for the user, and not writable by others. 2346.It Pa /etc/ssh/ssh_config 2347Systemwide configuration file. 2348This file provides defaults for those 2349values that are not specified in the user's configuration file, and 2350for those users who do not have a configuration file. 2351This file must be world-readable. 2352.El 2353.Sh SEE ALSO 2354.Xr ssh 1 2355.Sh AUTHORS 2356.An -nosplit 2357OpenSSH is a derivative of the original and free 2358ssh 1.2.12 release by 2359.An Tatu Ylonen . 2360.An Aaron Campbell , Bob Beck , Markus Friedl , 2361.An Niels Provos , Theo de Raadt 2362and 2363.An Dug Song 2364removed many bugs, re-added newer features and 2365created OpenSSH. 2366.An Markus Friedl 2367contributed the support for SSH protocol versions 1.5 and 2.0. 2368