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

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