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