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

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