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

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