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