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

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.174   ! djm        36: .\" $OpenBSD: ssh_config.5,v 1.173 2013/10/16 22:49:39 djm Exp $
1.172     jmc        37: .Dd $Mdocdate: October 16 2013 $
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 SYNOPSIS
1.98      jmc        44: .Nm ~/.ssh/config
                     45: .Nm /etc/ssh/ssh_config
1.1       stevesk    46: .Sh DESCRIPTION
1.84      jmc        47: .Xr ssh 1
1.1       stevesk    48: obtains configuration data from the following sources in
                     49: the following order:
1.79      jmc        50: .Pp
1.2       stevesk    51: .Bl -enum -offset indent -compact
                     52: .It
                     53: command-line options
                     54: .It
                     55: user's configuration file
1.50      djm        56: .Pq Pa ~/.ssh/config
1.2       stevesk    57: .It
                     58: system-wide configuration file
                     59: .Pq Pa /etc/ssh/ssh_config
                     60: .El
1.1       stevesk    61: .Pp
                     62: For each parameter, the first obtained value
                     63: will be used.
1.41      jmc        64: The configuration files contain sections separated by
1.1       stevesk    65: .Dq Host
                     66: specifications, and that section is only applied for hosts that
                     67: match one of the patterns given in the specification.
                     68: The matched host name is the one given on the command line.
                     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.1       stevesk    74: The configuration file has the following format:
                     75: .Pp
                     76: Empty lines and lines starting with
                     77: .Ql #
                     78: are comments.
                     79: Otherwise a line is of the format
                     80: .Dq keyword arguments .
                     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.
1.88      dtucker    92: Arguments may optionally be enclosed in double quotes
                     93: .Pq \&"
                     94: in order to represent arguments containing spaces.
1.1       stevesk    95: .Pp
                     96: The possible
                     97: keywords and their meanings are as follows (note that
                     98: keywords are case-insensitive and arguments are case-sensitive):
                     99: .Bl -tag -width Ds
                    100: .It Cm Host
                    101: Restricts the following declarations (up to the next
                    102: .Cm Host
1.169     djm       103: or
                    104: .Cm Match
1.1       stevesk   105: keyword) to be only for those hosts that match one of the patterns
                    106: given after the keyword.
1.112     krw       107: If more than one pattern is provided, they should be separated by whitespace.
1.1       stevesk   108: A single
1.83      jmc       109: .Ql *
1.1       stevesk   110: as a pattern can be used to provide global
                    111: defaults for all hosts.
                    112: The host is the
                    113: .Ar hostname
1.83      jmc       114: argument given on the command line (i.e. the name is not converted to
1.1       stevesk   115: a canonicalized host name before matching).
1.148     djm       116: .Pp
                    117: A pattern entry may be negated by prefixing it with an exclamation mark
                    118: .Pq Sq !\& .
                    119: If a negated entry is matched, then the
                    120: .Cm Host
                    121: entry is ignored, regardless of whether any other patterns on the line
                    122: match.
                    123: Negated matches are therefore useful to provide exceptions for wildcard
                    124: matches.
1.81      jmc       125: .Pp
                    126: See
                    127: .Sx PATTERNS
                    128: for more information on patterns.
1.170     jmc       129: .It Cm Match
1.169     djm       130: Restricts the following declarations (up to the next
                    131: .Cm Host
                    132: or
                    133: .Cm Match
                    134: keyword) to be used only when the conditions following the
                    135: .Cm Match
                    136: keyword are satisfied.
                    137: Match conditions are specified using one or more keyword/criteria pairs.
                    138: The available keywords are:
                    139: .Cm command ,
                    140: .Cm host ,
                    141: .Cm originalhost ,
                    142: .Cm user ,
                    143: and
                    144: .Cm localuser .
                    145: .Pp
                    146: The criteria for the
                    147: .Cm command
                    148: keyword is a path to a command that is executed.
                    149: If the command returns a zero exit status then the condition is considered true.
                    150: Commands containing whitespace characters must be quoted.
                    151: .Pp
                    152: The other keywords' criteria must be single entries or comma-separated
                    153: lists and may use the wildcard and negation operators described in the
                    154: .Sx PATTERNS
                    155: section.
                    156: The criteria for the
                    157: .Cm host
                    158: keyword are matched against the target hostname, after any substitution
                    159: by the
                    160: .Cm Hostname
                    161: option.
                    162: The
                    163: .Cm originalhost
                    164: keyword matches against the hostname as it was specified on the command-line.
                    165: The
                    166: .Cm user
                    167: keyword matches against the target username on the remote host.
                    168: The
                    169: .Cm localuser
                    170: keyword matches against the name of the local user running
                    171: .Xr ssh 1
                    172: (this keyword may be useful in system-wide
                    173: .Nm
                    174: files).
1.10      djm       175: .It Cm AddressFamily
1.11      jmc       176: Specifies which address family to use when connecting.
                    177: Valid arguments are
1.10      djm       178: .Dq any ,
                    179: .Dq inet
1.84      jmc       180: (use IPv4 only), or
1.10      djm       181: .Dq inet6
1.40      jmc       182: (use IPv6 only).
1.1       stevesk   183: .It Cm BatchMode
                    184: If set to
                    185: .Dq yes ,
                    186: passphrase/password querying will be disabled.
                    187: This option is useful in scripts and other batch jobs where no user
                    188: is present to supply the password.
                    189: The argument must be
                    190: .Dq yes
                    191: or
                    192: .Dq no .
                    193: The default is
                    194: .Dq no .
                    195: .It Cm BindAddress
1.60      dtucker   196: Use the specified address on the local machine as the source address of
1.61      jmc       197: the connection.
                    198: Only useful on systems with more than one address.
1.1       stevesk   199: Note that this option does not work if
                    200: .Cm UsePrivilegedPort
                    201: is set to
                    202: .Dq yes .
1.171     djm       203: .It Cm CanonicalDomains
1.172     jmc       204: When
1.173     djm       205: .Cm CanonicalizeHostname
1.171     djm       206: is enabled, this option specifies the list of domain suffixes in which to
                    207: search for the specified destination host.
1.173     djm       208: .It Cm CanonicalizeFallbackLocal
1.174   ! djm       209: Specifies whether to fail with an error when hostname canonicalization fails.
1.172     jmc       210: The default,
                    211: .Dq no ,
                    212: will attempt to look up the unqualified hostname using the system resolver's
1.171     djm       213: search rules.
                    214: A value of
                    215: .Dq yes
                    216: will cause
                    217: .Xr ssh 1
                    218: to fail instantly if
1.173     djm       219: .Cm CanonicalizeHostname
1.171     djm       220: is enabled and the target hostname cannot be found in any of the domains
                    221: specified by
                    222: .Cm CanonicalDomains .
1.173     djm       223: .It Cm CanonicalizeHostname
1.174   ! djm       224: Controls whether explicit hostname canonicalization is performed.
1.172     jmc       225: The default,
                    226: .Dq no ,
1.171     djm       227: is not to perform any name rewriting and let the system resolver handle all
                    228: hostname lookups.
                    229: If set to
                    230: .Dq yes
                    231: then, for connections that do not use a
                    232: .Cm ProxyCommand ,
                    233: .Xr ssh 1
1.173     djm       234: will attempt to canonicalize the hostname specified on the command line
1.171     djm       235: using the
                    236: .Cm CanonicalDomains
                    237: suffixes and
1.173     djm       238: .Cm CanonicalizePermittedCNAMEs
1.171     djm       239: rules.
                    240: If
1.173     djm       241: .Cm CanonicalizeHostname
1.171     djm       242: is set to
                    243: .Dq always ,
1.174   ! djm       244: then canonicalization is applied to proxied connections too.
1.173     djm       245: .It Cm CanonicalizeMaxDots
1.172     jmc       246: Specifies the maximum number of dot characters in a hostname before
1.174   ! djm       247: canonicalization is disabled.
1.172     jmc       248: The default,
                    249: .Dq 1 ,
                    250: allows a single dot (i.e. hostname.subdomain).
1.173     djm       251: .It Cm CanonicalizePermittedCNAMEs
1.172     jmc       252: Specifies rules to determine whether CNAMEs should be followed when
1.173     djm       253: canonicalizing hostnames.
1.171     djm       254: The rules consist of one or more arguments of
1.172     jmc       255: .Ar source_domain_list : Ns Ar target_domain_list ,
1.171     djm       256: where
                    257: .Ar source_domain_list
1.174   ! djm       258: is a pattern-list of domains that may follow CNAMEs in canonicalization,
1.171     djm       259: and
                    260: .Ar target_domain_list
1.172     jmc       261: is a pattern-list of domains that they may resolve to.
1.171     djm       262: .Pp
                    263: For example,
                    264: .Dq *.a.example.com:*.b.example.com,*.c.example.com
                    265: will allow hostnames matching
                    266: .Dq *.a.example.com
1.173     djm       267: to be canonicalized to names in the
1.171     djm       268: .Dq *.b.example.com
                    269: or
                    270: .Dq *.c.example.com
                    271: domains.
1.1       stevesk   272: .It Cm ChallengeResponseAuthentication
1.82      jmc       273: Specifies whether to use challenge-response authentication.
1.1       stevesk   274: The argument to this keyword must be
                    275: .Dq yes
                    276: or
                    277: .Dq no .
                    278: The default is
                    279: .Dq yes .
                    280: .It Cm CheckHostIP
                    281: If this flag is set to
                    282: .Dq yes ,
1.84      jmc       283: .Xr ssh 1
                    284: will additionally check the host IP address in the
1.1       stevesk   285: .Pa known_hosts
                    286: file.
                    287: This allows ssh to detect if a host key changed due to DNS spoofing.
1.107     grunk     288: If the option is set to
1.1       stevesk   289: .Dq no ,
                    290: the check will not be executed.
                    291: The default is
                    292: .Dq yes .
                    293: .It Cm Cipher
                    294: Specifies the cipher to use for encrypting the session
                    295: in protocol version 1.
                    296: Currently,
                    297: .Dq blowfish ,
                    298: .Dq 3des ,
                    299: and
                    300: .Dq des
                    301: are supported.
                    302: .Ar des
                    303: is only supported in the
1.84      jmc       304: .Xr ssh 1
1.1       stevesk   305: client for interoperability with legacy protocol 1 implementations
                    306: that do not support the
                    307: .Ar 3des
1.7       jmc       308: cipher.
                    309: Its use is strongly discouraged due to cryptographic weaknesses.
1.1       stevesk   310: The default is
                    311: .Dq 3des .
                    312: .It Cm Ciphers
                    313: Specifies the ciphers allowed for protocol version 2
                    314: in order of preference.
                    315: Multiple ciphers must be comma-separated.
1.35      dtucker   316: The supported ciphers are
                    317: .Dq 3des-cbc ,
                    318: .Dq aes128-cbc ,
                    319: .Dq aes192-cbc ,
                    320: .Dq aes256-cbc ,
                    321: .Dq aes128-ctr ,
                    322: .Dq aes192-ctr ,
                    323: .Dq aes256-ctr ,
1.161     markus    324: .Dq aes128-gcm@openssh.com ,
                    325: .Dq aes256-gcm@openssh.com ,
1.54      djm       326: .Dq arcfour128 ,
                    327: .Dq arcfour256 ,
1.35      dtucker   328: .Dq arcfour ,
                    329: .Dq blowfish-cbc ,
                    330: and
                    331: .Dq cast128-cbc .
1.84      jmc       332: The default is:
                    333: .Bd -literal -offset 3n
1.116     naddy     334: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,
1.161     markus    335: aes128-gcm@openssh.com,aes256-gcm@openssh.com,
1.116     naddy     336: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,
                    337: aes256-cbc,arcfour
1.1       stevesk   338: .Ed
                    339: .It Cm ClearAllForwardings
1.84      jmc       340: Specifies that all local, remote, and dynamic port forwardings
1.1       stevesk   341: specified in the configuration files or on the command line be
1.7       jmc       342: cleared.
                    343: This option is primarily useful when used from the
1.84      jmc       344: .Xr ssh 1
1.1       stevesk   345: command line to clear port forwardings set in
                    346: configuration files, and is automatically set by
                    347: .Xr scp 1
                    348: and
                    349: .Xr sftp 1 .
                    350: The argument must be
                    351: .Dq yes
                    352: or
                    353: .Dq no .
                    354: The default is
                    355: .Dq no .
                    356: .It Cm Compression
                    357: Specifies whether to use compression.
                    358: The argument must be
                    359: .Dq yes
                    360: or
                    361: .Dq no .
                    362: The default is
                    363: .Dq no .
                    364: .It Cm CompressionLevel
                    365: Specifies the compression level to use if compression is enabled.
                    366: The argument must be an integer from 1 (fast) to 9 (slow, best).
                    367: The default level is 6, which is good for most applications.
                    368: The meaning of the values is the same as in
                    369: .Xr gzip 1 .
                    370: Note that this option applies to protocol version 1 only.
                    371: .It Cm ConnectionAttempts
                    372: Specifies the number of tries (one per second) to make before exiting.
                    373: The argument must be an integer.
                    374: This may be useful in scripts if the connection sometimes fails.
                    375: The default is 1.
1.9       djm       376: .It Cm ConnectTimeout
1.84      jmc       377: Specifies the timeout (in seconds) used when connecting to the
                    378: SSH server, instead of using the default system TCP timeout.
1.11      jmc       379: This value is used only when the target is down or really unreachable,
                    380: not when it refuses the connection.
1.36      djm       381: .It Cm ControlMaster
                    382: Enables the sharing of multiple sessions over a single network connection.
                    383: When set to
1.84      jmc       384: .Dq yes ,
                    385: .Xr ssh 1
1.36      djm       386: will listen for connections on a control socket specified using the
                    387: .Cm ControlPath
                    388: argument.
                    389: Additional sessions can connect to this socket using the same
                    390: .Cm ControlPath
                    391: with
                    392: .Cm ControlMaster
                    393: set to
                    394: .Dq no
1.38      jmc       395: (the default).
1.64      jmc       396: These sessions will try to reuse the master instance's network connection
1.63      djm       397: rather than initiating new ones, but will fall back to connecting normally
                    398: if the control socket does not exist, or is not listening.
                    399: .Pp
1.37      djm       400: Setting this to
                    401: .Dq ask
1.84      jmc       402: will cause ssh
1.37      djm       403: to listen for control connections, but require confirmation using the
                    404: .Ev SSH_ASKPASS
                    405: program before they are accepted (see
                    406: .Xr ssh-add 1
1.38      jmc       407: for details).
1.51      jakob     408: If the
                    409: .Cm ControlPath
1.84      jmc       410: cannot be opened,
                    411: ssh will continue without connecting to a master instance.
1.58      djm       412: .Pp
                    413: X11 and
1.59      jmc       414: .Xr ssh-agent 1
1.58      djm       415: forwarding is supported over these multiplexed connections, however the
1.70      stevesk   416: display and agent forwarded will be the one belonging to the master
1.59      jmc       417: connection i.e. it is not possible to forward multiple displays or agents.
1.56      djm       418: .Pp
                    419: Two additional options allow for opportunistic multiplexing: try to use a
                    420: master connection but fall back to creating a new one if one does not already
                    421: exist.
                    422: These options are:
                    423: .Dq auto
                    424: and
                    425: .Dq autoask .
                    426: The latter requires confirmation like the
                    427: .Dq ask
                    428: option.
1.36      djm       429: .It Cm ControlPath
1.55      djm       430: Specify the path to the control socket used for connection sharing as described
                    431: in the
1.36      djm       432: .Cm ControlMaster
1.57      djm       433: section above or the string
                    434: .Dq none
                    435: to disable connection sharing.
1.55      djm       436: In the path,
1.147     djm       437: .Ql %L
                    438: will be substituted by the first component of the local host name,
1.77      djm       439: .Ql %l
1.147     djm       440: will be substituted by the local host name (including any domain name),
1.55      djm       441: .Ql %h
                    442: will be substituted by the target host name,
1.150     jmc       443: .Ql %n
                    444: will be substituted by the original target host name
                    445: specified on the command line,
1.55      djm       446: .Ql %p
1.147     djm       447: the port,
1.55      djm       448: .Ql %r
1.147     djm       449: by the remote login username, and
                    450: .Ql %u
                    451: by the username of the user running
                    452: .Xr ssh 1 .
1.56      djm       453: It is recommended that any
                    454: .Cm ControlPath
                    455: used for opportunistic connection sharing include
1.78      jmc       456: at least %h, %p, and %r.
1.56      djm       457: This ensures that shared connections are uniquely identified.
1.137     djm       458: .It Cm ControlPersist
                    459: When used in conjunction with
                    460: .Cm ControlMaster ,
                    461: specifies that the master connection should remain open
                    462: in the background (waiting for future client connections)
                    463: after the initial client connection has been closed.
                    464: If set to
                    465: .Dq no ,
                    466: then the master connection will not be placed into the background,
                    467: and will close as soon as the initial client connection is closed.
                    468: If set to
                    469: .Dq yes ,
                    470: then the master connection will remain in the background indefinitely
                    471: (until killed or closed via a mechanism such as the
                    472: .Xr ssh 1
                    473: .Dq Fl O No exit
                    474: option).
                    475: If set to a time in seconds, or a time in any of the formats documented in
                    476: .Xr sshd_config 5 ,
                    477: then the backgrounded master connection will automatically terminate
                    478: after it has remained idle (with no client connections) for the
                    479: specified time.
1.38      jmc       480: .It Cm DynamicForward
1.74      jmc       481: Specifies that a TCP port on the local machine be forwarded
1.38      jmc       482: over the secure channel, and the application
                    483: protocol is then used to determine where to connect to from the
                    484: remote machine.
1.62      djm       485: .Pp
                    486: The argument must be
                    487: .Sm off
                    488: .Oo Ar bind_address : Oc Ar port .
                    489: .Sm on
1.138     djm       490: IPv6 addresses can be specified by enclosing addresses in square brackets.
1.62      djm       491: By default, the local port is bound in accordance with the
                    492: .Cm GatewayPorts
                    493: setting.
                    494: However, an explicit
                    495: .Ar bind_address
                    496: may be used to bind the connection to a specific address.
                    497: The
                    498: .Ar bind_address
                    499: of
                    500: .Dq localhost
                    501: indicates that the listening port be bound for local use only, while an
                    502: empty address or
                    503: .Sq *
                    504: indicates that the port should be available from all interfaces.
                    505: .Pp
1.38      jmc       506: Currently the SOCKS4 and SOCKS5 protocols are supported, and
1.84      jmc       507: .Xr ssh 1
1.38      jmc       508: will act as a SOCKS server.
                    509: Multiple forwardings may be specified, and
                    510: additional forwardings can be given on the command line.
                    511: Only the superuser can forward privileged ports.
1.14      markus    512: .It Cm EnableSSHKeysign
                    513: Setting this option to
                    514: .Dq yes
                    515: in the global client configuration file
                    516: .Pa /etc/ssh/ssh_config
                    517: enables the use of the helper program
                    518: .Xr ssh-keysign 8
                    519: during
                    520: .Cm HostbasedAuthentication .
                    521: The argument must be
                    522: .Dq yes
                    523: or
                    524: .Dq no .
                    525: The default is
                    526: .Dq no .
1.23      jmc       527: This option should be placed in the non-hostspecific section.
1.14      markus    528: See
                    529: .Xr ssh-keysign 8
                    530: for more information.
1.1       stevesk   531: .It Cm EscapeChar
                    532: Sets the escape character (default:
                    533: .Ql ~ ) .
                    534: The escape character can also
                    535: be set on the command line.
                    536: The argument should be a single character,
                    537: .Ql ^
                    538: followed by a letter, or
                    539: .Dq none
                    540: to disable the escape
                    541: character entirely (making the connection transparent for binary
                    542: data).
1.96      markus    543: .It Cm ExitOnForwardFailure
                    544: Specifies whether
                    545: .Xr ssh 1
                    546: should terminate the connection if it cannot set up all requested
1.102     stevesk   547: dynamic, tunnel, local, and remote port forwardings.
1.96      markus    548: The argument must be
                    549: .Dq yes
                    550: or
                    551: .Dq no .
                    552: The default is
                    553: .Dq no .
1.1       stevesk   554: .It Cm ForwardAgent
                    555: Specifies whether the connection to the authentication agent (if any)
                    556: will be forwarded to the remote machine.
                    557: The argument must be
                    558: .Dq yes
                    559: or
                    560: .Dq no .
                    561: The default is
                    562: .Dq no .
1.3       stevesk   563: .Pp
1.7       jmc       564: Agent forwarding should be enabled with caution.
                    565: Users with the ability to bypass file permissions on the remote host
                    566: (for the agent's Unix-domain socket)
                    567: can access the local agent through the forwarded connection.
                    568: An attacker cannot obtain key material from the agent,
1.3       stevesk   569: however they can perform operations on the keys that enable them to
                    570: authenticate using the identities loaded into the agent.
1.1       stevesk   571: .It Cm ForwardX11
                    572: Specifies whether X11 connections will be automatically redirected
                    573: over the secure channel and
                    574: .Ev DISPLAY
                    575: set.
                    576: The argument must be
                    577: .Dq yes
                    578: or
                    579: .Dq no .
                    580: The default is
                    581: .Dq no .
1.3       stevesk   582: .Pp
1.7       jmc       583: X11 forwarding should be enabled with caution.
                    584: Users with the ability to bypass file permissions on the remote host
1.22      markus    585: (for the user's X11 authorization database)
1.7       jmc       586: can access the local X11 display through the forwarded connection.
1.22      markus    587: An attacker may then be able to perform activities such as keystroke monitoring
                    588: if the
                    589: .Cm ForwardX11Trusted
                    590: option is also enabled.
1.134     djm       591: .It Cm ForwardX11Timeout
1.135     jmc       592: Specify a timeout for untrusted X11 forwarding
                    593: using the format described in the
1.166     jmc       594: TIME FORMATS section of
1.134     djm       595: .Xr sshd_config 5 .
                    596: X11 connections received by
                    597: .Xr ssh 1
                    598: after this time will be refused.
                    599: The default is to disable untrusted X11 forwarding after twenty minutes has
                    600: elapsed.
1.22      markus    601: .It Cm ForwardX11Trusted
1.34      jmc       602: If this option is set to
1.84      jmc       603: .Dq yes ,
                    604: remote X11 clients will have full access to the original X11 display.
1.42      djm       605: .Pp
1.22      markus    606: If this option is set to
1.84      jmc       607: .Dq no ,
                    608: remote X11 clients will be considered untrusted and prevented
1.22      markus    609: from stealing or tampering with data belonging to trusted X11
                    610: clients.
1.42      djm       611: Furthermore, the
                    612: .Xr xauth 1
                    613: token used for the session will be set to expire after 20 minutes.
                    614: Remote clients will be refused access after this time.
1.22      markus    615: .Pp
                    616: The default is
                    617: .Dq no .
                    618: .Pp
                    619: See the X11 SECURITY extension specification for full details on
                    620: the restrictions imposed on untrusted clients.
1.1       stevesk   621: .It Cm GatewayPorts
                    622: Specifies whether remote hosts are allowed to connect to local
                    623: forwarded ports.
                    624: By default,
1.84      jmc       625: .Xr ssh 1
1.7       jmc       626: binds local port forwardings to the loopback address.
                    627: This prevents other remote hosts from connecting to forwarded ports.
1.1       stevesk   628: .Cm GatewayPorts
1.84      jmc       629: can be used to specify that ssh
1.1       stevesk   630: should bind local port forwardings to the wildcard address,
                    631: thus allowing remote hosts to connect to forwarded ports.
                    632: The argument must be
                    633: .Dq yes
                    634: or
                    635: .Dq no .
                    636: The default is
                    637: .Dq no .
                    638: .It Cm GlobalKnownHostsFile
1.151     djm       639: Specifies one or more files to use for the global
                    640: host key database, separated by whitespace.
                    641: The default is
                    642: .Pa /etc/ssh/ssh_known_hosts ,
                    643: .Pa /etc/ssh/ssh_known_hosts2 .
1.18      markus    644: .It Cm GSSAPIAuthentication
1.27      markus    645: Specifies whether user authentication based on GSSAPI is allowed.
1.20      jmc       646: The default is
1.21      markus    647: .Dq no .
1.18      markus    648: Note that this option applies to protocol version 2 only.
                    649: .It Cm GSSAPIDelegateCredentials
                    650: Forward (delegate) credentials to the server.
                    651: The default is
                    652: .Dq no .
                    653: Note that this option applies to protocol version 2 only.
1.44      djm       654: .It Cm HashKnownHosts
                    655: Indicates that
1.84      jmc       656: .Xr ssh 1
1.44      djm       657: should hash host names and addresses when they are added to
1.50      djm       658: .Pa ~/.ssh/known_hosts .
1.44      djm       659: These hashed names may be used normally by
1.84      jmc       660: .Xr ssh 1
1.44      djm       661: and
1.84      jmc       662: .Xr sshd 8 ,
1.44      djm       663: but they do not reveal identifying information should the file's contents
                    664: be disclosed.
                    665: The default is
                    666: .Dq no .
1.97      jmc       667: Note that existing names and addresses in known hosts files
                    668: will not be converted automatically,
                    669: but may be manually hashed using
1.45      djm       670: .Xr ssh-keygen 1 .
1.1       stevesk   671: .It Cm HostbasedAuthentication
                    672: Specifies whether to try rhosts based authentication with public key
                    673: authentication.
                    674: The argument must be
                    675: .Dq yes
                    676: or
                    677: .Dq no .
                    678: The default is
                    679: .Dq no .
                    680: This option applies to protocol version 2 only and
                    681: is similar to
                    682: .Cm RhostsRSAAuthentication .
                    683: .It Cm HostKeyAlgorithms
                    684: Specifies the protocol version 2 host key algorithms
                    685: that the client wants to use in order of preference.
                    686: The default for this option is:
1.139     djm       687: .Bd -literal -offset 3n
                    688: ecdsa-sha2-nistp256-cert-v01@openssh.com,
                    689: ecdsa-sha2-nistp384-cert-v01@openssh.com,
                    690: ecdsa-sha2-nistp521-cert-v01@openssh.com,
                    691: ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,
                    692: ssh-rsa-cert-v00@openssh.com,ssh-dss-cert-v00@openssh.com,
                    693: ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
                    694: ssh-rsa,ssh-dss
                    695: .Ed
1.145     djm       696: .Pp
                    697: If hostkeys are known for the destination host then this default is modified
                    698: to prefer their algorithms.
1.1       stevesk   699: .It Cm HostKeyAlias
                    700: Specifies an alias that should be used instead of the
                    701: real host name when looking up or saving the host key
                    702: in the host key database files.
1.84      jmc       703: This option is useful for tunneling SSH connections
1.1       stevesk   704: or for multiple servers running on a single host.
                    705: .It Cm HostName
                    706: Specifies the real host name to log into.
                    707: This can be used to specify nicknames or abbreviations for hosts.
1.136     djm       708: If the hostname contains the character sequence
                    709: .Ql %h ,
1.150     jmc       710: then this will be replaced with the host name specified on the command line
1.136     djm       711: (this is useful for manipulating unqualified names).
1.84      jmc       712: The default is the name given on the command line.
1.1       stevesk   713: Numeric IP addresses are also permitted (both on the command line and in
                    714: .Cm HostName
                    715: specifications).
1.29      markus    716: .It Cm IdentitiesOnly
                    717: Specifies that
1.84      jmc       718: .Xr ssh 1
1.29      markus    719: should only use the authentication identity files configured in the
1.31      jmc       720: .Nm
1.29      markus    721: files,
1.84      jmc       722: even if
                    723: .Xr ssh-agent 1
1.159     djm       724: or a
                    725: .Cm PKCS11Provider
1.29      markus    726: offers more identities.
                    727: The argument to this keyword must be
                    728: .Dq yes
                    729: or
                    730: .Dq no .
1.84      jmc       731: This option is intended for situations where ssh-agent
1.29      markus    732: offers many different identities.
                    733: The default is
                    734: .Dq no .
1.67      jmc       735: .It Cm IdentityFile
1.155     dtucker   736: Specifies a file from which the user's DSA, ECDSA or RSA authentication
1.139     djm       737: identity is read.
1.67      jmc       738: The default is
                    739: .Pa ~/.ssh/identity
                    740: for protocol version 1, and
1.139     djm       741: .Pa ~/.ssh/id_dsa ,
                    742: .Pa ~/.ssh/id_ecdsa
                    743: and
1.67      jmc       744: .Pa ~/.ssh/id_rsa
                    745: for protocol version 2.
                    746: Additionally, any identities represented by the authentication agent
1.165     djm       747: will be used for authentication unless
                    748: .Cm IdentitiesOnly
                    749: is set.
1.129     djm       750: .Xr ssh 1
                    751: will try to load certificate information from the filename obtained by
                    752: appending
                    753: .Pa -cert.pub
                    754: to the path of a specified
                    755: .Cm IdentityFile .
1.90      djm       756: .Pp
1.67      jmc       757: The file name may use the tilde
1.91      jmc       758: syntax to refer to a user's home directory or one of the following
1.90      djm       759: escape characters:
                    760: .Ql %d
                    761: (local user's home directory),
                    762: .Ql %u
                    763: (local user name),
                    764: .Ql %l
                    765: (local host name),
                    766: .Ql %h
                    767: (remote host name) or
1.92      djm       768: .Ql %r
1.90      djm       769: (remote user name).
                    770: .Pp
1.67      jmc       771: It is possible to have
                    772: multiple identity files specified in configuration files; all these
                    773: identities will be tried in sequence.
1.152     djm       774: Multiple
                    775: .Cm IdentityFile
                    776: directives will add to the list of identities tried (this behaviour
                    777: differs from that of other configuration directives).
1.165     djm       778: .Pp
                    779: .Cm IdentityFile
                    780: may be used in conjunction with
                    781: .Cm IdentitiesOnly
                    782: to select which identities in an agent are offered during authentication.
1.164     jmc       783: .It Cm IgnoreUnknown
                    784: Specifies a pattern-list of unknown options to be ignored if they are
                    785: encountered in configuration parsing.
                    786: This may be used to suppress errors if
                    787: .Nm
                    788: contains options that are unrecognised by
                    789: .Xr ssh 1 .
                    790: It is recommended that
                    791: .Cm IgnoreUnknown
                    792: be listed early in the configuration file as it will not be applied
                    793: to unknown options that appear before it.
1.143     djm       794: .It Cm IPQoS
                    795: Specifies the IPv4 type-of-service or DSCP class for connections.
                    796: Accepted values are
                    797: .Dq af11 ,
                    798: .Dq af12 ,
                    799: .Dq af13 ,
1.154     djm       800: .Dq af21 ,
1.143     djm       801: .Dq af22 ,
                    802: .Dq af23 ,
                    803: .Dq af31 ,
                    804: .Dq af32 ,
                    805: .Dq af33 ,
                    806: .Dq af41 ,
                    807: .Dq af42 ,
                    808: .Dq af43 ,
                    809: .Dq cs0 ,
                    810: .Dq cs1 ,
                    811: .Dq cs2 ,
                    812: .Dq cs3 ,
                    813: .Dq cs4 ,
                    814: .Dq cs5 ,
                    815: .Dq cs6 ,
                    816: .Dq cs7 ,
                    817: .Dq ef ,
                    818: .Dq lowdelay ,
                    819: .Dq throughput ,
                    820: .Dq reliability ,
                    821: or a numeric value.
1.146     djm       822: This option may take one or two arguments, separated by whitespace.
1.143     djm       823: If one argument is specified, it is used as the packet class unconditionally.
                    824: If two values are specified, the first is automatically selected for
                    825: interactive sessions and the second for non-interactive sessions.
                    826: The default is
                    827: .Dq lowdelay
                    828: for interactive sessions and
                    829: .Dq throughput
                    830: for non-interactive sessions.
1.103     djm       831: .It Cm KbdInteractiveAuthentication
                    832: Specifies whether to use keyboard-interactive authentication.
                    833: The argument to this keyword must be
                    834: .Dq yes
                    835: or
                    836: .Dq no .
                    837: The default is
                    838: .Dq yes .
1.39      djm       839: .It Cm KbdInteractiveDevices
                    840: Specifies the list of methods to use in keyboard-interactive authentication.
                    841: Multiple method names must be comma-separated.
                    842: The default is to use the server specified list.
1.85      jmc       843: The methods available vary depending on what the server supports.
                    844: For an OpenSSH server,
                    845: it may be zero or more of:
                    846: .Dq bsdauth ,
                    847: .Dq pam ,
                    848: and
                    849: .Dq skey .
1.140     djm       850: .It Cm KexAlgorithms
                    851: Specifies the available KEX (Key Exchange) algorithms.
                    852: Multiple algorithms must be comma-separated.
1.141     jmc       853: The default is:
                    854: .Bd -literal -offset indent
                    855: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
                    856: diffie-hellman-group-exchange-sha256,
                    857: diffie-hellman-group-exchange-sha1,
                    858: diffie-hellman-group14-sha1,
                    859: diffie-hellman-group1-sha1
                    860: .Ed
1.65      reyk      861: .It Cm LocalCommand
                    862: Specifies a command to execute on the local machine after successfully
                    863: connecting to the server.
                    864: The command string extends to the end of the line, and is executed with
1.105     jmc       865: the user's shell.
1.109     dtucker   866: The following escape character substitutions will be performed:
                    867: .Ql %d
                    868: (local user's home directory),
                    869: .Ql %h
                    870: (remote host name),
                    871: .Ql %l
                    872: (local host name),
                    873: .Ql %n
                    874: (host name as provided on the command line),
                    875: .Ql %p
                    876: (remote port),
                    877: .Ql %r
                    878: (remote user name) or
                    879: .Ql %u
                    880: (local user name).
1.123     djm       881: .Pp
                    882: The command is run synchronously and does not have access to the
                    883: session of the
                    884: .Xr ssh 1
                    885: that spawned it.
                    886: It should not be used for interactive commands.
                    887: .Pp
1.65      reyk      888: This directive is ignored unless
                    889: .Cm PermitLocalCommand
                    890: has been enabled.
1.1       stevesk   891: .It Cm LocalForward
1.74      jmc       892: Specifies that a TCP port on the local machine be forwarded over
1.1       stevesk   893: the secure channel to the specified host and port from the remote machine.
1.49      jmc       894: The first argument must be
1.43      djm       895: .Sm off
1.49      jmc       896: .Oo Ar bind_address : Oc Ar port
1.43      djm       897: .Sm on
1.49      jmc       898: and the second argument must be
                    899: .Ar host : Ns Ar hostport .
1.138     djm       900: IPv6 addresses can be specified by enclosing addresses in square brackets.
1.46      jmc       901: Multiple forwardings may be specified, and additional forwardings can be
1.43      djm       902: given on the command line.
1.1       stevesk   903: Only the superuser can forward privileged ports.
1.43      djm       904: By default, the local port is bound in accordance with the
                    905: .Cm GatewayPorts
                    906: setting.
                    907: However, an explicit
                    908: .Ar bind_address
                    909: may be used to bind the connection to a specific address.
                    910: The
                    911: .Ar bind_address
                    912: of
                    913: .Dq localhost
1.46      jmc       914: indicates that the listening port be bound for local use only, while an
                    915: empty address or
                    916: .Sq *
1.43      djm       917: indicates that the port should be available from all interfaces.
1.1       stevesk   918: .It Cm LogLevel
                    919: Gives the verbosity level that is used when logging messages from
1.84      jmc       920: .Xr ssh 1 .
1.1       stevesk   921: The possible values are:
1.84      jmc       922: QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3.
1.7       jmc       923: The default is INFO.
                    924: DEBUG and DEBUG1 are equivalent.
                    925: DEBUG2 and DEBUG3 each specify higher levels of verbose output.
1.1       stevesk   926: .It Cm MACs
                    927: Specifies the MAC (message authentication code) algorithms
                    928: in order of preference.
                    929: The MAC algorithm is used in protocol version 2
                    930: for data integrity protection.
                    931: Multiple algorithms must be comma-separated.
1.160     markus    932: The algorithms that contain
                    933: .Dq -etm
                    934: calculate the MAC after encryption (encrypt-then-mac).
                    935: These are considered safer and their use recommended.
1.84      jmc       936: The default is:
1.101     jmc       937: .Bd -literal -offset indent
1.160     markus    938: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,
                    939: umac-64-etm@openssh.com,umac-128-etm@openssh.com,
                    940: hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
                    941: hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,
                    942: hmac-md5-96-etm@openssh.com,
1.158     markus    943: hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,
1.157     naddy     944: hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,
                    945: hmac-sha1-96,hmac-md5-96
1.101     jmc       946: .Ed
1.1       stevesk   947: .It Cm NoHostAuthenticationForLocalhost
                    948: This option can be used if the home directory is shared across machines.
                    949: In this case localhost will refer to a different machine on each of
                    950: the machines and the user will get many warnings about changed host keys.
                    951: However, this option disables host authentication for localhost.
                    952: The argument to this keyword must be
                    953: .Dq yes
                    954: or
                    955: .Dq no .
                    956: The default is to check the host key for localhost.
                    957: .It Cm NumberOfPasswordPrompts
                    958: Specifies the number of password prompts before giving up.
                    959: The argument to this keyword must be an integer.
1.84      jmc       960: The default is 3.
1.1       stevesk   961: .It Cm PasswordAuthentication
                    962: Specifies whether to use password authentication.
                    963: The argument to this keyword must be
                    964: .Dq yes
                    965: or
                    966: .Dq no .
                    967: The default is
                    968: .Dq yes .
1.65      reyk      969: .It Cm PermitLocalCommand
                    970: Allow local command execution via the
                    971: .Ic LocalCommand
                    972: option or using the
1.66      jmc       973: .Ic !\& Ns Ar command
1.65      reyk      974: escape sequence in
                    975: .Xr ssh 1 .
                    976: The argument must be
                    977: .Dq yes
                    978: or
                    979: .Dq no .
                    980: The default is
                    981: .Dq no .
1.127     markus    982: .It Cm PKCS11Provider
                    983: Specifies which PKCS#11 provider to use.
1.144     jmc       984: The argument to this keyword is the PKCS#11 shared library
1.127     markus    985: .Xr ssh 1
1.128     markus    986: should use to communicate with a PKCS#11 token providing the user's
1.127     markus    987: private RSA key.
1.67      jmc       988: .It Cm Port
                    989: Specifies the port number to connect on the remote host.
1.84      jmc       990: The default is 22.
1.1       stevesk   991: .It Cm PreferredAuthentications
                    992: Specifies the order in which the client should try protocol 2
1.11      jmc       993: authentication methods.
1.48      jmc       994: This allows a client to prefer one method (e.g.\&
1.1       stevesk   995: .Cm keyboard-interactive )
1.48      jmc       996: over another method (e.g.\&
1.131     jmc       997: .Cm password ) .
                    998: The default is:
                    999: .Bd -literal -offset indent
                   1000: gssapi-with-mic,hostbased,publickey,
                   1001: keyboard-interactive,password
                   1002: .Ed
1.1       stevesk  1003: .It Cm Protocol
                   1004: Specifies the protocol versions
1.84      jmc      1005: .Xr ssh 1
1.1       stevesk  1006: should support in order of preference.
                   1007: The possible values are
1.84      jmc      1008: .Sq 1
1.1       stevesk  1009: and
1.84      jmc      1010: .Sq 2 .
1.1       stevesk  1011: Multiple versions must be comma-separated.
1.120     markus   1012: When this option is set to
1.121     jmc      1013: .Dq 2,1
1.120     markus   1014: .Nm ssh
                   1015: will try version 2 and fall back to version 1
                   1016: if version 2 is not available.
1.1       stevesk  1017: The default is
1.121     jmc      1018: .Sq 2 .
1.1       stevesk  1019: .It Cm ProxyCommand
                   1020: Specifies the command to use to connect to the server.
                   1021: The command
                   1022: string extends to the end of the line, and is executed with
1.105     jmc      1023: the user's shell.
1.133     jmc      1024: In the command string, any occurrence of
1.1       stevesk  1025: .Ql %h
                   1026: will be substituted by the host name to
1.132     djm      1027: connect,
1.1       stevesk  1028: .Ql %p
1.133     jmc      1029: by the port, and
                   1030: .Ql %r
1.132     djm      1031: by the remote user name.
1.1       stevesk  1032: The command can be basically anything,
                   1033: and should read from its standard input and write to its standard output.
                   1034: It should eventually connect an
                   1035: .Xr sshd 8
                   1036: server running on some machine, or execute
                   1037: .Ic sshd -i
                   1038: somewhere.
                   1039: Host key management will be done using the
                   1040: HostName of the host being connected (defaulting to the name typed by
                   1041: the user).
1.7       jmc      1042: Setting the command to
                   1043: .Dq none
1.6       markus   1044: disables this option entirely.
1.1       stevesk  1045: Note that
                   1046: .Cm CheckHostIP
                   1047: is not available for connects with a proxy command.
1.52      djm      1048: .Pp
                   1049: This directive is useful in conjunction with
                   1050: .Xr nc 1
                   1051: and its proxy support.
1.53      jmc      1052: For example, the following directive would connect via an HTTP proxy at
1.52      djm      1053: 192.0.2.0:
                   1054: .Bd -literal -offset 3n
                   1055: ProxyCommand /usr/bin/nc -X connect -x 192.0.2.0:8080 %h %p
                   1056: .Ed
1.167     djm      1057: .It Cm ProxyUseFdpass
1.168     jmc      1058: Specifies that
1.167     djm      1059: .Cm ProxyCommand
                   1060: will pass a connected file descriptor back to
1.168     jmc      1061: .Xr ssh 1
1.167     djm      1062: instead of continuing to execute and pass data.
                   1063: The default is
                   1064: .Dq no .
1.1       stevesk  1065: .It Cm PubkeyAuthentication
                   1066: Specifies whether to try public key authentication.
                   1067: The argument to this keyword must be
                   1068: .Dq yes
                   1069: or
                   1070: .Dq no .
                   1071: The default is
                   1072: .Dq yes .
                   1073: This option applies to protocol version 2 only.
1.75      dtucker  1074: .It Cm RekeyLimit
                   1075: Specifies the maximum amount of data that may be transmitted before the
1.162     dtucker  1076: session key is renegotiated, optionally followed a maximum amount of
                   1077: time that may pass before the session key is renegotiated.
                   1078: The first argument is specified in bytes and may have a suffix of
1.76      jmc      1079: .Sq K ,
                   1080: .Sq M ,
1.75      dtucker  1081: or
1.76      jmc      1082: .Sq G
1.75      dtucker  1083: to indicate Kilobytes, Megabytes, or Gigabytes, respectively.
                   1084: The default is between
1.84      jmc      1085: .Sq 1G
1.75      dtucker  1086: and
1.84      jmc      1087: .Sq 4G ,
1.75      dtucker  1088: depending on the cipher.
1.162     dtucker  1089: The optional second value is specified in seconds and may use any of the
                   1090: units documented in the
1.166     jmc      1091: TIME FORMATS section of
1.162     dtucker  1092: .Xr sshd_config 5 .
                   1093: The default value for
                   1094: .Cm RekeyLimit
                   1095: is
                   1096: .Dq default none ,
                   1097: which means that rekeying is performed after the cipher's default amount
                   1098: of data has been sent or received and no time based rekeying is done.
1.76      jmc      1099: This option applies to protocol version 2 only.
1.1       stevesk  1100: .It Cm RemoteForward
1.74      jmc      1101: Specifies that a TCP port on the remote machine be forwarded over
1.1       stevesk  1102: the secure channel to the specified host and port from the local machine.
1.49      jmc      1103: The first argument must be
1.43      djm      1104: .Sm off
1.49      jmc      1105: .Oo Ar bind_address : Oc Ar port
1.43      djm      1106: .Sm on
1.49      jmc      1107: and the second argument must be
                   1108: .Ar host : Ns Ar hostport .
1.138     djm      1109: IPv6 addresses can be specified by enclosing addresses in square brackets.
1.1       stevesk  1110: Multiple forwardings may be specified, and additional
                   1111: forwardings can be given on the command line.
1.113     stevesk  1112: Privileged ports can be forwarded only when
                   1113: logging in as root on the remote machine.
1.118     jmc      1114: .Pp
1.117     djm      1115: If the
                   1116: .Ar port
                   1117: argument is
                   1118: .Ql 0 ,
                   1119: the listen port will be dynamically allocated on the server and reported
                   1120: to the client at run time.
1.43      djm      1121: .Pp
                   1122: If the
                   1123: .Ar bind_address
                   1124: is not specified, the default is to only bind to loopback addresses.
                   1125: If the
                   1126: .Ar bind_address
                   1127: is
                   1128: .Ql *
                   1129: or an empty string, then the forwarding is requested to listen on all
                   1130: interfaces.
                   1131: Specifying a remote
                   1132: .Ar bind_address
1.46      jmc      1133: will only succeed if the server's
                   1134: .Cm GatewayPorts
1.43      djm      1135: option is enabled (see
1.46      jmc      1136: .Xr sshd_config 5 ) .
1.149     djm      1137: .It Cm RequestTTY
                   1138: Specifies whether to request a pseudo-tty for the session.
                   1139: The argument may be one of:
                   1140: .Dq no
                   1141: (never request a TTY),
                   1142: .Dq yes
                   1143: (always request a TTY when standard input is a TTY),
                   1144: .Dq force
                   1145: (always request a TTY) or
                   1146: .Dq auto
                   1147: (request a TTY when opening a login session).
                   1148: This option mirrors the
                   1149: .Fl t
                   1150: and
                   1151: .Fl T
                   1152: flags for
                   1153: .Xr ssh 1 .
1.1       stevesk  1154: .It Cm RhostsRSAAuthentication
                   1155: Specifies whether to try rhosts based authentication with RSA host
                   1156: authentication.
                   1157: The argument must be
                   1158: .Dq yes
                   1159: or
                   1160: .Dq no .
                   1161: The default is
                   1162: .Dq no .
                   1163: This option applies to protocol version 1 only and requires
1.84      jmc      1164: .Xr ssh 1
1.1       stevesk  1165: to be setuid root.
                   1166: .It Cm RSAAuthentication
                   1167: Specifies whether to try RSA authentication.
                   1168: The argument to this keyword must be
                   1169: .Dq yes
                   1170: or
                   1171: .Dq no .
                   1172: RSA authentication will only be
                   1173: attempted if the identity file exists, or an authentication agent is
                   1174: running.
                   1175: The default is
                   1176: .Dq yes .
                   1177: Note that this option applies to protocol version 1 only.
1.32      djm      1178: .It Cm SendEnv
                   1179: Specifies what variables from the local
                   1180: .Xr environ 7
                   1181: should be sent to the server.
1.84      jmc      1182: Note that environment passing is only supported for protocol 2.
                   1183: The server must also support it, and the server must be configured to
1.33      djm      1184: accept these environment variables.
1.32      djm      1185: Refer to
                   1186: .Cm AcceptEnv
                   1187: in
                   1188: .Xr sshd_config 5
                   1189: for how to configure the server.
1.80      jmc      1190: Variables are specified by name, which may contain wildcard characters.
1.33      djm      1191: Multiple environment variables may be separated by whitespace or spread
1.32      djm      1192: across multiple
                   1193: .Cm SendEnv
                   1194: directives.
                   1195: The default is not to send any environment variables.
1.81      jmc      1196: .Pp
                   1197: See
                   1198: .Sx PATTERNS
                   1199: for more information on patterns.
1.28      markus   1200: .It Cm ServerAliveCountMax
1.73      jmc      1201: Sets the number of server alive messages (see below) which may be
1.28      markus   1202: sent without
1.84      jmc      1203: .Xr ssh 1
1.28      markus   1204: receiving any messages back from the server.
                   1205: If this threshold is reached while server alive messages are being sent,
1.84      jmc      1206: ssh will disconnect from the server, terminating the session.
1.28      markus   1207: It is important to note that the use of server alive messages is very
                   1208: different from
                   1209: .Cm TCPKeepAlive
                   1210: (below).
                   1211: The server alive messages are sent through the encrypted channel
                   1212: and therefore will not be spoofable.
                   1213: The TCP keepalive option enabled by
                   1214: .Cm TCPKeepAlive
                   1215: is spoofable.
                   1216: The server alive mechanism is valuable when the client or
                   1217: server depend on knowing when a connection has become inactive.
                   1218: .Pp
                   1219: The default value is 3.
                   1220: If, for example,
                   1221: .Cm ServerAliveInterval
1.84      jmc      1222: (see below) is set to 15 and
1.28      markus   1223: .Cm ServerAliveCountMax
1.84      jmc      1224: is left at the default, if the server becomes unresponsive,
                   1225: ssh will disconnect after approximately 45 seconds.
1.89      markus   1226: This option applies to protocol version 2 only.
1.67      jmc      1227: .It Cm ServerAliveInterval
                   1228: Sets a timeout interval in seconds after which if no data has been received
                   1229: from the server,
1.84      jmc      1230: .Xr ssh 1
1.67      jmc      1231: will send a message through the encrypted
                   1232: channel to request a response from the server.
                   1233: The default
                   1234: is 0, indicating that these messages will not be sent to the server.
                   1235: This option applies to protocol version 2 only.
1.1       stevesk  1236: .It Cm StrictHostKeyChecking
                   1237: If this flag is set to
                   1238: .Dq yes ,
1.84      jmc      1239: .Xr ssh 1
1.1       stevesk  1240: will never automatically add host keys to the
1.50      djm      1241: .Pa ~/.ssh/known_hosts
1.1       stevesk  1242: file, and refuses to connect to hosts whose host key has changed.
                   1243: This provides maximum protection against trojan horse attacks,
1.84      jmc      1244: though it can be annoying when the
1.1       stevesk  1245: .Pa /etc/ssh/ssh_known_hosts
1.84      jmc      1246: file is poorly maintained or when connections to new hosts are
1.1       stevesk  1247: frequently made.
                   1248: This option forces the user to manually
                   1249: add all new hosts.
                   1250: If this flag is set to
                   1251: .Dq no ,
1.84      jmc      1252: ssh will automatically add new host keys to the
1.1       stevesk  1253: user known hosts files.
                   1254: If this flag is set to
                   1255: .Dq ask ,
                   1256: new host keys
                   1257: will be added to the user known host files only after the user
                   1258: has confirmed that is what they really want to do, and
1.84      jmc      1259: ssh will refuse to connect to hosts whose host key has changed.
1.1       stevesk  1260: The host keys of
                   1261: known hosts will be verified automatically in all cases.
                   1262: The argument must be
                   1263: .Dq yes ,
1.84      jmc      1264: .Dq no ,
1.1       stevesk  1265: or
                   1266: .Dq ask .
                   1267: The default is
                   1268: .Dq ask .
1.26      markus   1269: .It Cm TCPKeepAlive
                   1270: Specifies whether the system should send TCP keepalive messages to the
                   1271: other side.
                   1272: If they are sent, death of the connection or crash of one
                   1273: of the machines will be properly noticed.
                   1274: However, this means that
                   1275: connections will die if the route is down temporarily, and some people
                   1276: find it annoying.
                   1277: .Pp
                   1278: The default is
                   1279: .Dq yes
                   1280: (to send TCP keepalive messages), and the client will notice
                   1281: if the network goes down or the remote host dies.
                   1282: This is important in scripts, and many users want it too.
                   1283: .Pp
                   1284: To disable TCP keepalive messages, the value should be set to
                   1285: .Dq no .
1.65      reyk     1286: .It Cm Tunnel
1.95      stevesk  1287: Request
1.65      reyk     1288: .Xr tun 4
1.69      jmc      1289: device forwarding between the client and the server.
1.65      reyk     1290: The argument must be
1.68      reyk     1291: .Dq yes ,
1.95      stevesk  1292: .Dq point-to-point
                   1293: (layer 3),
                   1294: .Dq ethernet
                   1295: (layer 2),
1.65      reyk     1296: or
                   1297: .Dq no .
1.95      stevesk  1298: Specifying
                   1299: .Dq yes
                   1300: requests the default tunnel mode, which is
                   1301: .Dq point-to-point .
1.65      reyk     1302: The default is
                   1303: .Dq no .
                   1304: .It Cm TunnelDevice
1.95      stevesk  1305: Specifies the
1.65      reyk     1306: .Xr tun 4
1.95      stevesk  1307: devices to open on the client
                   1308: .Pq Ar local_tun
                   1309: and the server
                   1310: .Pq Ar remote_tun .
                   1311: .Pp
                   1312: The argument must be
                   1313: .Sm off
                   1314: .Ar local_tun Op : Ar remote_tun .
                   1315: .Sm on
                   1316: The devices may be specified by numerical ID or the keyword
                   1317: .Dq any ,
                   1318: which uses the next available tunnel device.
                   1319: If
                   1320: .Ar remote_tun
                   1321: is not specified, it defaults to
                   1322: .Dq any .
                   1323: The default is
                   1324: .Dq any:any .
1.72      jmc      1325: .It Cm UsePrivilegedPort
                   1326: Specifies whether to use a privileged port for outgoing connections.
                   1327: The argument must be
                   1328: .Dq yes
                   1329: or
                   1330: .Dq no .
                   1331: The default is
                   1332: .Dq no .
                   1333: If set to
1.84      jmc      1334: .Dq yes ,
                   1335: .Xr ssh 1
1.72      jmc      1336: must be setuid root.
                   1337: Note that this option must be set to
                   1338: .Dq yes
                   1339: for
                   1340: .Cm RhostsRSAAuthentication
                   1341: with older servers.
1.1       stevesk  1342: .It Cm User
                   1343: Specifies the user to log in as.
                   1344: This can be useful when a different user name is used on different machines.
                   1345: This saves the trouble of
                   1346: having to remember to give the user name on the command line.
                   1347: .It Cm UserKnownHostsFile
1.151     djm      1348: Specifies one or more files to use for the user
                   1349: host key database, separated by whitespace.
                   1350: The default is
                   1351: .Pa ~/.ssh/known_hosts ,
                   1352: .Pa ~/.ssh/known_hosts2 .
1.8       jakob    1353: .It Cm VerifyHostKeyDNS
                   1354: Specifies whether to verify the remote key using DNS and SSHFP resource
                   1355: records.
1.24      jakob    1356: If this option is set to
                   1357: .Dq yes ,
1.25      jmc      1358: the client will implicitly trust keys that match a secure fingerprint
1.24      jakob    1359: from DNS.
                   1360: Insecure fingerprints will be handled as if this option was set to
                   1361: .Dq ask .
                   1362: If this option is set to
                   1363: .Dq ask ,
                   1364: information on fingerprint match will be displayed, but the user will still
                   1365: need to confirm new host keys according to the
                   1366: .Cm StrictHostKeyChecking
                   1367: option.
                   1368: The argument must be
                   1369: .Dq yes ,
1.84      jmc      1370: .Dq no ,
1.25      jmc      1371: or
                   1372: .Dq ask .
1.8       jakob    1373: The default is
                   1374: .Dq no .
1.12      jakob    1375: Note that this option applies to protocol version 2 only.
1.84      jmc      1376: .Pp
1.166     jmc      1377: See also VERIFYING HOST KEYS in
1.84      jmc      1378: .Xr ssh 1 .
1.111     grunk    1379: .It Cm VisualHostKey
                   1380: If this flag is set to
                   1381: .Dq yes ,
                   1382: an ASCII art representation of the remote host key fingerprint is
1.114     stevesk  1383: printed in addition to the hex fingerprint string at login and
                   1384: for unknown host keys.
1.111     grunk    1385: If this flag is set to
                   1386: .Dq no ,
1.114     stevesk  1387: no fingerprint strings are printed at login and
                   1388: only the hex fingerprint string will be printed for unknown host keys.
1.111     grunk    1389: The default is
                   1390: .Dq no .
1.1       stevesk  1391: .It Cm XAuthLocation
1.5       stevesk  1392: Specifies the full pathname of the
1.1       stevesk  1393: .Xr xauth 1
                   1394: program.
                   1395: The default is
                   1396: .Pa /usr/X11R6/bin/xauth .
                   1397: .El
1.86      jmc      1398: .Sh PATTERNS
                   1399: A
                   1400: .Em pattern
                   1401: consists of zero or more non-whitespace characters,
                   1402: .Sq *
                   1403: (a wildcard that matches zero or more characters),
                   1404: or
                   1405: .Sq ?\&
                   1406: (a wildcard that matches exactly one character).
                   1407: For example, to specify a set of declarations for any host in the
                   1408: .Dq .co.uk
                   1409: set of domains,
                   1410: the following pattern could be used:
                   1411: .Pp
                   1412: .Dl Host *.co.uk
                   1413: .Pp
                   1414: The following pattern
                   1415: would match any host in the 192.168.0.[0-9] network range:
                   1416: .Pp
                   1417: .Dl Host 192.168.0.?
                   1418: .Pp
                   1419: A
                   1420: .Em pattern-list
                   1421: is a comma-separated list of patterns.
                   1422: Patterns within pattern-lists may be negated
                   1423: by preceding them with an exclamation mark
                   1424: .Pq Sq !\& .
                   1425: For example,
1.174   ! djm      1426: to allow a key to be used from anywhere within an organization
1.86      jmc      1427: except from the
                   1428: .Dq dialup
                   1429: pool,
                   1430: the following entry (in authorized_keys) could be used:
                   1431: .Pp
                   1432: .Dl from=\&"!*.dialup.example.com,*.example.com\&"
1.1       stevesk  1433: .Sh FILES
                   1434: .Bl -tag -width Ds
1.50      djm      1435: .It Pa ~/.ssh/config
1.1       stevesk  1436: This is the per-user configuration file.
                   1437: The format of this file is described above.
1.84      jmc      1438: This file is used by the SSH client.
1.30      djm      1439: Because of the potential for abuse, this file must have strict permissions:
                   1440: read/write for the user, and not accessible by others.
1.1       stevesk  1441: .It Pa /etc/ssh/ssh_config
                   1442: Systemwide configuration file.
                   1443: This file provides defaults for those
                   1444: values that are not specified in the user's configuration file, and
                   1445: for those users who do not have a configuration file.
                   1446: This file must be world-readable.
                   1447: .El
1.13      jmc      1448: .Sh SEE ALSO
                   1449: .Xr ssh 1
1.1       stevesk  1450: .Sh AUTHORS
                   1451: OpenSSH is a derivative of the original and free
                   1452: ssh 1.2.12 release by Tatu Ylonen.
                   1453: Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
                   1454: Theo de Raadt and Dug Song
                   1455: removed many bugs, re-added newer features and
                   1456: created OpenSSH.
                   1457: Markus Friedl contributed the support for SSH
                   1458: protocol versions 1.5 and 2.0.