[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.351

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