[BACK]Return to ssh_config.5 CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Annotation of src/usr.bin/ssh/ssh_config.5, Revision 1.381

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