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