Annotation of src/usr.bin/ssh/ssh_config.5, Revision 1.284
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.284 ! djm 36: .\" $OpenBSD: ssh_config.5,v 1.283 2018/09/20 06:58:48 jmc Exp $
1.283 jmc 37: .Dd $Mdocdate: September 20 2018 $
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 DESCRIPTION
1.84 jmc 44: .Xr ssh 1
1.1 stevesk 45: obtains configuration data from the following sources in
46: the following order:
1.79 jmc 47: .Pp
1.2 stevesk 48: .Bl -enum -offset indent -compact
49: .It
50: command-line options
51: .It
52: user's configuration file
1.50 djm 53: .Pq Pa ~/.ssh/config
1.2 stevesk 54: .It
55: system-wide configuration file
56: .Pq Pa /etc/ssh/ssh_config
57: .El
1.1 stevesk 58: .Pp
59: For each parameter, the first obtained value
60: will be used.
1.41 jmc 61: The configuration files contain sections separated by
1.240 jmc 62: .Cm Host
1.1 stevesk 63: specifications, and that section is only applied for hosts that
64: match one of the patterns given in the specification.
1.193 djm 65: The matched host name is usually the one given on the command line
66: (see the
67: .Cm CanonicalizeHostname
1.240 jmc 68: option for exceptions).
1.1 stevesk 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.240 jmc 74: The file contains keyword-argument pairs, one per line.
75: Lines starting with
1.1 stevesk 76: .Ql #
1.240 jmc 77: and empty lines are interpreted as comments.
78: Arguments may optionally be enclosed in double quotes
79: .Pq \&"
80: in order to represent arguments containing spaces.
1.1 stevesk 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.
92: .Pp
93: The possible
94: keywords and their meanings are as follows (note that
95: keywords are case-insensitive and arguments are case-sensitive):
96: .Bl -tag -width Ds
97: .It Cm Host
98: Restricts the following declarations (up to the next
99: .Cm Host
1.169 djm 100: or
101: .Cm Match
1.1 stevesk 102: keyword) to be only for those hosts that match one of the patterns
103: given after the keyword.
1.112 krw 104: If more than one pattern is provided, they should be separated by whitespace.
1.1 stevesk 105: A single
1.83 jmc 106: .Ql *
1.1 stevesk 107: as a pattern can be used to provide global
108: defaults for all hosts.
1.193 djm 109: The host is usually the
1.1 stevesk 110: .Ar hostname
1.193 djm 111: argument given on the command line
112: (see the
113: .Cm CanonicalizeHostname
1.240 jmc 114: keyword for exceptions).
1.148 djm 115: .Pp
116: A pattern entry may be negated by prefixing it with an exclamation mark
117: .Pq Sq !\& .
118: If a negated entry is matched, then the
119: .Cm Host
120: entry is ignored, regardless of whether any other patterns on the line
121: match.
122: Negated matches are therefore useful to provide exceptions for wildcard
123: matches.
1.81 jmc 124: .Pp
125: See
126: .Sx PATTERNS
127: for more information on patterns.
1.170 jmc 128: .It Cm Match
1.169 djm 129: Restricts the following declarations (up to the next
130: .Cm Host
131: or
132: .Cm Match
133: keyword) to be used only when the conditions following the
134: .Cm Match
135: keyword are satisfied.
1.220 sobrado 136: Match conditions are specified using one or more criteria
1.178 dtucker 137: or the single token
138: .Cm all
1.193 djm 139: which always matches.
140: The available criteria keywords are:
141: .Cm canonical ,
1.176 djm 142: .Cm exec ,
1.169 djm 143: .Cm host ,
144: .Cm originalhost ,
145: .Cm user ,
146: and
147: .Cm localuser .
1.193 djm 148: The
149: .Cm all
150: criteria must appear alone or immediately after
1.194 jmc 151: .Cm canonical .
1.193 djm 152: Other criteria may be combined arbitrarily.
153: All criteria but
154: .Cm all
155: and
156: .Cm canonical
157: require an argument.
158: Criteria may be negated by prepending an exclamation mark
159: .Pq Sq !\& .
1.169 djm 160: .Pp
1.177 jmc 161: The
1.193 djm 162: .Cm canonical
1.210 dtucker 163: keyword matches only when the configuration file is being re-parsed
1.193 djm 164: after hostname canonicalization (see the
165: .Cm CanonicalizeHostname
166: option.)
167: This may be useful to specify conditions that work with canonical host
168: names only.
169: The
1.176 djm 170: .Cm exec
1.177 jmc 171: keyword executes the specified command under the user's shell.
1.169 djm 172: If the command returns a zero exit status then the condition is considered true.
173: Commands containing whitespace characters must be quoted.
1.239 jmc 174: Arguments to
175: .Cm exec
176: accept the tokens described in the
177: .Sx TOKENS
178: section.
1.169 djm 179: .Pp
180: The other keywords' criteria must be single entries or comma-separated
181: lists and may use the wildcard and negation operators described in the
182: .Sx PATTERNS
183: section.
184: The criteria for the
185: .Cm host
186: keyword are matched against the target hostname, after any substitution
187: by the
188: .Cm Hostname
1.193 djm 189: or
190: .Cm CanonicalizeHostname
191: options.
1.169 djm 192: The
193: .Cm originalhost
194: keyword matches against the hostname as it was specified on the command-line.
195: The
196: .Cm user
197: keyword matches against the target username on the remote host.
198: The
199: .Cm localuser
200: keyword matches against the name of the local user running
201: .Xr ssh 1
202: (this keyword may be useful in system-wide
203: .Nm
204: files).
1.222 jcs 205: .It Cm AddKeysToAgent
206: Specifies whether keys should be automatically added to a running
1.223 jmc 207: .Xr ssh-agent 1 .
1.222 jcs 208: If this option is set to
1.240 jmc 209: .Cm yes
1.222 jcs 210: and a key is loaded from a file, the key and its passphrase are added to
211: the agent with the default lifetime, as if by
212: .Xr ssh-add 1 .
213: If this option is set to
1.240 jmc 214: .Cm ask ,
215: .Xr ssh 1
1.222 jcs 216: will require confirmation using the
217: .Ev SSH_ASKPASS
218: program before adding a key (see
219: .Xr ssh-add 1
220: for details).
221: If this option is set to
1.240 jmc 222: .Cm confirm ,
1.222 jcs 223: each use of the key must be confirmed, as if the
224: .Fl c
225: option was specified to
226: .Xr ssh-add 1 .
227: If this option is set to
1.240 jmc 228: .Cm no ,
1.222 jcs 229: no keys are added to the agent.
230: The argument must be
1.240 jmc 231: .Cm yes ,
232: .Cm confirm ,
233: .Cm ask ,
1.222 jcs 234: or
1.240 jmc 235: .Cm no
236: (the default).
1.10 djm 237: .It Cm AddressFamily
1.11 jmc 238: Specifies which address family to use when connecting.
239: Valid arguments are
1.240 jmc 240: .Cm any
241: (the default),
242: .Cm inet
1.84 jmc 243: (use IPv4 only), or
1.240 jmc 244: .Cm inet6
1.40 jmc 245: (use IPv6 only).
1.1 stevesk 246: .It Cm BatchMode
247: If set to
1.240 jmc 248: .Cm yes ,
1.1 stevesk 249: passphrase/password querying will be disabled.
250: This option is useful in scripts and other batch jobs where no user
251: is present to supply the password.
252: The argument must be
1.240 jmc 253: .Cm yes
1.1 stevesk 254: or
1.240 jmc 255: .Cm no
256: (the default).
1.268 jmc 257: .It Cm BindAddress
258: Use the specified address on the local machine as the source address of
259: the connection.
260: Only useful on systems with more than one address.
261: .It Cm BindInterface
262: Use the address of the specified interface on the local machine as the
263: source address of the connection.
1.171 djm 264: .It Cm CanonicalDomains
1.172 jmc 265: When
1.173 djm 266: .Cm CanonicalizeHostname
1.171 djm 267: is enabled, this option specifies the list of domain suffixes in which to
268: search for the specified destination host.
1.173 djm 269: .It Cm CanonicalizeFallbackLocal
1.174 djm 270: Specifies whether to fail with an error when hostname canonicalization fails.
1.172 jmc 271: The default,
1.240 jmc 272: .Cm yes ,
1.172 jmc 273: will attempt to look up the unqualified hostname using the system resolver's
1.171 djm 274: search rules.
275: A value of
1.240 jmc 276: .Cm no
1.171 djm 277: will cause
278: .Xr ssh 1
279: to fail instantly if
1.173 djm 280: .Cm CanonicalizeHostname
1.171 djm 281: is enabled and the target hostname cannot be found in any of the domains
282: specified by
283: .Cm CanonicalDomains .
1.173 djm 284: .It Cm CanonicalizeHostname
1.174 djm 285: Controls whether explicit hostname canonicalization is performed.
1.172 jmc 286: The default,
1.240 jmc 287: .Cm no ,
1.171 djm 288: is not to perform any name rewriting and let the system resolver handle all
289: hostname lookups.
290: If set to
1.240 jmc 291: .Cm yes
1.171 djm 292: then, for connections that do not use a
1.284 ! djm 293: .Cm ProxyCommand
! 294: or
! 295: .Cm ProxyJump ,
1.171 djm 296: .Xr ssh 1
1.173 djm 297: will attempt to canonicalize the hostname specified on the command line
1.171 djm 298: using the
299: .Cm CanonicalDomains
300: suffixes and
1.173 djm 301: .Cm CanonicalizePermittedCNAMEs
1.171 djm 302: rules.
303: If
1.173 djm 304: .Cm CanonicalizeHostname
1.171 djm 305: is set to
1.240 jmc 306: .Cm always ,
1.174 djm 307: then canonicalization is applied to proxied connections too.
1.185 djm 308: .Pp
1.193 djm 309: If this option is enabled, then the configuration files are processed
310: again using the new target name to pick up any new configuration in matching
1.185 djm 311: .Cm Host
1.193 djm 312: and
313: .Cm Match
1.185 djm 314: stanzas.
1.173 djm 315: .It Cm CanonicalizeMaxDots
1.172 jmc 316: Specifies the maximum number of dot characters in a hostname before
1.174 djm 317: canonicalization is disabled.
1.240 jmc 318: The default, 1,
1.172 jmc 319: allows a single dot (i.e. hostname.subdomain).
1.173 djm 320: .It Cm CanonicalizePermittedCNAMEs
1.172 jmc 321: Specifies rules to determine whether CNAMEs should be followed when
1.173 djm 322: canonicalizing hostnames.
1.171 djm 323: The rules consist of one or more arguments of
1.172 jmc 324: .Ar source_domain_list : Ns Ar target_domain_list ,
1.171 djm 325: where
326: .Ar source_domain_list
1.174 djm 327: is a pattern-list of domains that may follow CNAMEs in canonicalization,
1.171 djm 328: and
329: .Ar target_domain_list
1.172 jmc 330: is a pattern-list of domains that they may resolve to.
1.171 djm 331: .Pp
332: For example,
1.240 jmc 333: .Qq *.a.example.com:*.b.example.com,*.c.example.com
1.171 djm 334: will allow hostnames matching
1.240 jmc 335: .Qq *.a.example.com
1.173 djm 336: to be canonicalized to names in the
1.240 jmc 337: .Qq *.b.example.com
1.171 djm 338: or
1.240 jmc 339: .Qq *.c.example.com
1.171 djm 340: domains.
1.283 jmc 341: .It Cm CASignatureAlgorithms
342: Specifies which algorithms are allowed for signing of certificates
343: by certificate authorities (CAs).
344: The default is:
345: .Bd -literal -offset indent
346: ecdsa-sha2-nistp256.ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
347: ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa
348: .Ed
349: .Pp
350: .Xr ssh 1
351: will not accept host certificates signed using algorithms other than those
352: specified.
1.221 djm 353: .It Cm CertificateFile
354: Specifies a file from which the user's certificate is read.
355: A corresponding private key must be provided separately in order
356: to use this certificate either
357: from an
358: .Cm IdentityFile
359: directive or
360: .Fl i
361: flag to
362: .Xr ssh 1 ,
363: via
364: .Xr ssh-agent 1 ,
365: or via a
366: .Cm PKCS11Provider .
367: .Pp
1.239 jmc 368: Arguments to
369: .Cm CertificateFile
370: may use the tilde syntax to refer to a user's home directory
371: or the tokens described in the
372: .Sx TOKENS
373: section.
1.221 djm 374: .Pp
375: It is possible to have multiple certificate files specified in
376: configuration files; these certificates will be tried in sequence.
377: Multiple
378: .Cm CertificateFile
379: directives will add to the list of certificates used for
380: authentication.
1.1 stevesk 381: .It Cm ChallengeResponseAuthentication
1.82 jmc 382: Specifies whether to use challenge-response authentication.
1.1 stevesk 383: The argument to this keyword must be
1.240 jmc 384: .Cm yes
385: (the default)
1.1 stevesk 386: or
1.240 jmc 387: .Cm no .
1.1 stevesk 388: .It Cm CheckHostIP
1.240 jmc 389: If set to
390: .Cm yes
391: (the default),
1.84 jmc 392: .Xr ssh 1
393: will additionally check the host IP address in the
1.1 stevesk 394: .Pa known_hosts
395: file.
1.240 jmc 396: This allows it to detect if a host key changed due to DNS spoofing
1.211 djm 397: and will add addresses of destination hosts to
398: .Pa ~/.ssh/known_hosts
399: in the process, regardless of the setting of
400: .Cm StrictHostKeyChecking .
1.107 grunk 401: If the option is set to
1.240 jmc 402: .Cm no ,
1.1 stevesk 403: the check will not be executed.
404: .It Cm Ciphers
1.245 djm 405: Specifies the ciphers allowed and their order of preference.
1.1 stevesk 406: Multiple ciphers must be comma-separated.
1.214 djm 407: If the specified value begins with a
408: .Sq +
409: character, then the specified ciphers will be appended to the default set
410: instead of replacing them.
1.241 djm 411: If the specified value begins with a
412: .Sq -
413: character, then the specified ciphers (including wildcards) will be removed
414: from the default set instead of replacing them.
1.214 djm 415: .Pp
1.180 djm 416: The supported ciphers are:
1.240 jmc 417: .Bd -literal -offset indent
1.186 naddy 418: 3des-cbc
419: aes128-cbc
420: aes192-cbc
421: aes256-cbc
422: aes128-ctr
423: aes192-ctr
424: aes256-ctr
425: aes128-gcm@openssh.com
426: aes256-gcm@openssh.com
427: chacha20-poly1305@openssh.com
1.240 jmc 428: .Ed
1.180 djm 429: .Pp
1.84 jmc 430: The default is:
1.186 naddy 431: .Bd -literal -offset indent
1.215 jmc 432: chacha20-poly1305@openssh.com,
1.186 naddy 433: aes128-ctr,aes192-ctr,aes256-ctr,
1.270 djm 434: aes128-gcm@openssh.com,aes256-gcm@openssh.com
1.1 stevesk 435: .Ed
1.180 djm 436: .Pp
1.240 jmc 437: The list of available ciphers may also be obtained using
438: .Qq ssh -Q cipher .
1.1 stevesk 439: .It Cm ClearAllForwardings
1.84 jmc 440: Specifies that all local, remote, and dynamic port forwardings
1.1 stevesk 441: specified in the configuration files or on the command line be
1.7 jmc 442: cleared.
443: This option is primarily useful when used from the
1.84 jmc 444: .Xr ssh 1
1.1 stevesk 445: command line to clear port forwardings set in
446: configuration files, and is automatically set by
447: .Xr scp 1
448: and
449: .Xr sftp 1 .
450: The argument must be
1.240 jmc 451: .Cm yes
1.1 stevesk 452: or
1.240 jmc 453: .Cm no
454: (the default).
1.1 stevesk 455: .It Cm Compression
456: Specifies whether to use compression.
457: The argument must be
1.240 jmc 458: .Cm yes
1.1 stevesk 459: or
1.240 jmc 460: .Cm no
461: (the default).
1.247 naddy 462: .It Cm ConnectionAttempts
463: Specifies the number of tries (one per second) to make before exiting.
464: The argument must be an integer.
465: This may be useful in scripts if the connection sometimes fails.
466: The default is 1.
1.9 djm 467: .It Cm ConnectTimeout
1.84 jmc 468: Specifies the timeout (in seconds) used when connecting to the
469: SSH server, instead of using the default system TCP timeout.
1.11 jmc 470: This value is used only when the target is down or really unreachable,
471: not when it refuses the connection.
1.36 djm 472: .It Cm ControlMaster
473: Enables the sharing of multiple sessions over a single network connection.
474: When set to
1.240 jmc 475: .Cm yes ,
1.84 jmc 476: .Xr ssh 1
1.36 djm 477: will listen for connections on a control socket specified using the
478: .Cm ControlPath
479: argument.
480: Additional sessions can connect to this socket using the same
481: .Cm ControlPath
482: with
483: .Cm ControlMaster
484: set to
1.240 jmc 485: .Cm no
1.38 jmc 486: (the default).
1.64 jmc 487: These sessions will try to reuse the master instance's network connection
1.63 djm 488: rather than initiating new ones, but will fall back to connecting normally
489: if the control socket does not exist, or is not listening.
490: .Pp
1.37 djm 491: Setting this to
1.240 jmc 492: .Cm ask
493: will cause
494: .Xr ssh 1
1.206 jmc 495: to listen for control connections, but require confirmation using
496: .Xr ssh-askpass 1 .
1.51 jakob 497: If the
498: .Cm ControlPath
1.84 jmc 499: cannot be opened,
1.240 jmc 500: .Xr ssh 1
501: will continue without connecting to a master instance.
1.58 djm 502: .Pp
503: X11 and
1.59 jmc 504: .Xr ssh-agent 1
1.58 djm 505: forwarding is supported over these multiplexed connections, however the
1.70 stevesk 506: display and agent forwarded will be the one belonging to the master
1.59 jmc 507: connection i.e. it is not possible to forward multiple displays or agents.
1.56 djm 508: .Pp
509: Two additional options allow for opportunistic multiplexing: try to use a
510: master connection but fall back to creating a new one if one does not already
511: exist.
512: These options are:
1.240 jmc 513: .Cm auto
1.56 djm 514: and
1.240 jmc 515: .Cm autoask .
1.56 djm 516: The latter requires confirmation like the
1.240 jmc 517: .Cm ask
1.56 djm 518: option.
1.36 djm 519: .It Cm ControlPath
1.55 djm 520: Specify the path to the control socket used for connection sharing as described
521: in the
1.36 djm 522: .Cm ControlMaster
1.57 djm 523: section above or the string
1.240 jmc 524: .Cm none
1.57 djm 525: to disable connection sharing.
1.239 jmc 526: Arguments to
527: .Cm ControlPath
528: may use the tilde syntax to refer to a user's home directory
529: or the tokens described in the
530: .Sx TOKENS
531: section.
1.56 djm 532: It is recommended that any
533: .Cm ControlPath
534: used for opportunistic connection sharing include
1.195 djm 535: at least %h, %p, and %r (or alternatively %C) and be placed in a directory
536: that is not writable by other users.
1.56 djm 537: This ensures that shared connections are uniquely identified.
1.137 djm 538: .It Cm ControlPersist
539: When used in conjunction with
540: .Cm ControlMaster ,
541: specifies that the master connection should remain open
542: in the background (waiting for future client connections)
543: after the initial client connection has been closed.
544: If set to
1.240 jmc 545: .Cm no ,
1.137 djm 546: then the master connection will not be placed into the background,
547: and will close as soon as the initial client connection is closed.
548: If set to
1.240 jmc 549: .Cm yes
550: or 0,
1.137 djm 551: then the master connection will remain in the background indefinitely
552: (until killed or closed via a mechanism such as the
1.240 jmc 553: .Qq ssh -O exit ) .
1.137 djm 554: If set to a time in seconds, or a time in any of the formats documented in
555: .Xr sshd_config 5 ,
556: then the backgrounded master connection will automatically terminate
557: after it has remained idle (with no client connections) for the
558: specified time.
1.38 jmc 559: .It Cm DynamicForward
1.74 jmc 560: Specifies that a TCP port on the local machine be forwarded
1.38 jmc 561: over the secure channel, and the application
562: protocol is then used to determine where to connect to from the
563: remote machine.
1.62 djm 564: .Pp
565: The argument must be
566: .Sm off
567: .Oo Ar bind_address : Oc Ar port .
568: .Sm on
1.138 djm 569: IPv6 addresses can be specified by enclosing addresses in square brackets.
1.62 djm 570: By default, the local port is bound in accordance with the
571: .Cm GatewayPorts
572: setting.
573: However, an explicit
574: .Ar bind_address
575: may be used to bind the connection to a specific address.
576: The
577: .Ar bind_address
578: of
1.240 jmc 579: .Cm localhost
1.62 djm 580: indicates that the listening port be bound for local use only, while an
581: empty address or
582: .Sq *
583: indicates that the port should be available from all interfaces.
584: .Pp
1.38 jmc 585: Currently the SOCKS4 and SOCKS5 protocols are supported, and
1.84 jmc 586: .Xr ssh 1
1.38 jmc 587: will act as a SOCKS server.
588: Multiple forwardings may be specified, and
589: additional forwardings can be given on the command line.
590: Only the superuser can forward privileged ports.
1.14 markus 591: .It Cm EnableSSHKeysign
592: Setting this option to
1.240 jmc 593: .Cm yes
1.14 markus 594: in the global client configuration file
595: .Pa /etc/ssh/ssh_config
596: enables the use of the helper program
597: .Xr ssh-keysign 8
598: during
599: .Cm HostbasedAuthentication .
600: The argument must be
1.240 jmc 601: .Cm yes
1.14 markus 602: or
1.240 jmc 603: .Cm no
604: (the default).
1.23 jmc 605: This option should be placed in the non-hostspecific section.
1.14 markus 606: See
607: .Xr ssh-keysign 8
608: for more information.
1.1 stevesk 609: .It Cm EscapeChar
610: Sets the escape character (default:
611: .Ql ~ ) .
612: The escape character can also
613: be set on the command line.
614: The argument should be a single character,
615: .Ql ^
616: followed by a letter, or
1.240 jmc 617: .Cm none
1.1 stevesk 618: to disable the escape
619: character entirely (making the connection transparent for binary
620: data).
1.96 markus 621: .It Cm ExitOnForwardFailure
622: Specifies whether
623: .Xr ssh 1
624: should terminate the connection if it cannot set up all requested
1.216 djm 625: dynamic, tunnel, local, and remote port forwardings, (e.g.\&
1.217 jmc 626: if either end is unable to bind and listen on a specified port).
1.216 djm 627: Note that
628: .Cm ExitOnForwardFailure
629: does not apply to connections made over port forwardings and will not,
630: for example, cause
631: .Xr ssh 1
632: to exit if TCP connections to the ultimate forwarding destination fail.
1.96 markus 633: The argument must be
1.240 jmc 634: .Cm yes
1.96 markus 635: or
1.240 jmc 636: .Cm no
637: (the default).
1.197 djm 638: .It Cm FingerprintHash
639: Specifies the hash algorithm used when displaying key fingerprints.
640: Valid options are:
1.240 jmc 641: .Cm md5
1.197 djm 642: and
1.240 jmc 643: .Cm sha256
644: (the default).
1.1 stevesk 645: .It Cm ForwardAgent
646: Specifies whether the connection to the authentication agent (if any)
647: will be forwarded to the remote machine.
648: The argument must be
1.240 jmc 649: .Cm yes
1.1 stevesk 650: or
1.240 jmc 651: .Cm no
652: (the default).
1.3 stevesk 653: .Pp
1.7 jmc 654: Agent forwarding should be enabled with caution.
655: Users with the ability to bypass file permissions on the remote host
656: (for the agent's Unix-domain socket)
657: can access the local agent through the forwarded connection.
658: An attacker cannot obtain key material from the agent,
1.3 stevesk 659: however they can perform operations on the keys that enable them to
660: authenticate using the identities loaded into the agent.
1.1 stevesk 661: .It Cm ForwardX11
662: Specifies whether X11 connections will be automatically redirected
663: over the secure channel and
664: .Ev DISPLAY
665: set.
666: The argument must be
1.240 jmc 667: .Cm yes
1.1 stevesk 668: or
1.240 jmc 669: .Cm no
670: (the default).
1.3 stevesk 671: .Pp
1.7 jmc 672: X11 forwarding should be enabled with caution.
673: Users with the ability to bypass file permissions on the remote host
1.22 markus 674: (for the user's X11 authorization database)
1.7 jmc 675: can access the local X11 display through the forwarded connection.
1.22 markus 676: An attacker may then be able to perform activities such as keystroke monitoring
677: if the
678: .Cm ForwardX11Trusted
679: option is also enabled.
1.134 djm 680: .It Cm ForwardX11Timeout
1.135 jmc 681: Specify a timeout for untrusted X11 forwarding
682: using the format described in the
1.240 jmc 683: .Sx TIME FORMATS
684: section of
1.134 djm 685: .Xr sshd_config 5 .
686: X11 connections received by
687: .Xr ssh 1
688: after this time will be refused.
689: The default is to disable untrusted X11 forwarding after twenty minutes has
690: elapsed.
1.22 markus 691: .It Cm ForwardX11Trusted
1.34 jmc 692: If this option is set to
1.240 jmc 693: .Cm yes ,
1.84 jmc 694: remote X11 clients will have full access to the original X11 display.
1.42 djm 695: .Pp
1.22 markus 696: If this option is set to
1.240 jmc 697: .Cm no
698: (the default),
1.84 jmc 699: remote X11 clients will be considered untrusted and prevented
1.22 markus 700: from stealing or tampering with data belonging to trusted X11
701: clients.
1.42 djm 702: Furthermore, the
703: .Xr xauth 1
704: token used for the session will be set to expire after 20 minutes.
705: Remote clients will be refused access after this time.
1.22 markus 706: .Pp
707: See the X11 SECURITY extension specification for full details on
708: the restrictions imposed on untrusted clients.
1.1 stevesk 709: .It Cm GatewayPorts
710: Specifies whether remote hosts are allowed to connect to local
711: forwarded ports.
712: By default,
1.84 jmc 713: .Xr ssh 1
1.7 jmc 714: binds local port forwardings to the loopback address.
715: This prevents other remote hosts from connecting to forwarded ports.
1.1 stevesk 716: .Cm GatewayPorts
1.84 jmc 717: can be used to specify that ssh
1.1 stevesk 718: should bind local port forwardings to the wildcard address,
719: thus allowing remote hosts to connect to forwarded ports.
720: The argument must be
1.240 jmc 721: .Cm yes
1.1 stevesk 722: or
1.240 jmc 723: .Cm no
724: (the default).
1.1 stevesk 725: .It Cm GlobalKnownHostsFile
1.151 djm 726: Specifies one or more files to use for the global
727: host key database, separated by whitespace.
728: The default is
729: .Pa /etc/ssh/ssh_known_hosts ,
730: .Pa /etc/ssh/ssh_known_hosts2 .
1.18 markus 731: .It Cm GSSAPIAuthentication
1.27 markus 732: Specifies whether user authentication based on GSSAPI is allowed.
1.20 jmc 733: The default is
1.240 jmc 734: .Cm no .
1.18 markus 735: .It Cm GSSAPIDelegateCredentials
736: Forward (delegate) credentials to the server.
737: The default is
1.240 jmc 738: .Cm no .
1.44 djm 739: .It Cm HashKnownHosts
740: Indicates that
1.84 jmc 741: .Xr ssh 1
1.44 djm 742: should hash host names and addresses when they are added to
1.50 djm 743: .Pa ~/.ssh/known_hosts .
1.44 djm 744: These hashed names may be used normally by
1.84 jmc 745: .Xr ssh 1
1.44 djm 746: and
1.84 jmc 747: .Xr sshd 8 ,
1.44 djm 748: but they do not reveal identifying information should the file's contents
749: be disclosed.
750: The default is
1.240 jmc 751: .Cm no .
1.97 jmc 752: Note that existing names and addresses in known hosts files
753: will not be converted automatically,
754: but may be manually hashed using
1.45 djm 755: .Xr ssh-keygen 1 .
1.1 stevesk 756: .It Cm HostbasedAuthentication
757: Specifies whether to try rhosts based authentication with public key
758: authentication.
759: The argument must be
1.240 jmc 760: .Cm yes
1.1 stevesk 761: or
1.240 jmc 762: .Cm no
763: (the default).
1.202 djm 764: .It Cm HostbasedKeyTypes
765: Specifies the key types that will be used for hostbased authentication
1.279 djm 766: as a comma-separated list of patterns.
1.214 djm 767: Alternately if the specified value begins with a
768: .Sq +
769: character, then the specified key types will be appended to the default set
770: instead of replacing them.
1.241 djm 771: If the specified value begins with a
772: .Sq -
773: character, then the specified key types (including wildcards) will be removed
774: from the default set instead of replacing them.
1.213 markus 775: The default for this option is:
776: .Bd -literal -offset 3n
777: ecdsa-sha2-nistp256-cert-v01@openssh.com,
778: ecdsa-sha2-nistp384-cert-v01@openssh.com,
779: ecdsa-sha2-nistp521-cert-v01@openssh.com,
780: ssh-ed25519-cert-v01@openssh.com,
1.278 djm 781: rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,
1.213 markus 782: ssh-rsa-cert-v01@openssh.com,
783: ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
1.278 djm 784: ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa
1.213 markus 785: .Ed
786: .Pp
1.202 djm 787: The
788: .Fl Q
789: option of
790: .Xr ssh 1
791: may be used to list supported key types.
1.1 stevesk 792: .It Cm HostKeyAlgorithms
1.226 jmc 793: Specifies the host key algorithms
1.1 stevesk 794: that the client wants to use in order of preference.
1.214 djm 795: Alternately if the specified value begins with a
796: .Sq +
797: character, then the specified key types will be appended to the default set
798: instead of replacing them.
1.241 djm 799: If the specified value begins with a
800: .Sq -
801: character, then the specified key types (including wildcards) will be removed
802: from the default set instead of replacing them.
1.1 stevesk 803: The default for this option is:
1.139 djm 804: .Bd -literal -offset 3n
805: ecdsa-sha2-nistp256-cert-v01@openssh.com,
806: ecdsa-sha2-nistp384-cert-v01@openssh.com,
807: ecdsa-sha2-nistp521-cert-v01@openssh.com,
1.183 naddy 808: ssh-ed25519-cert-v01@openssh.com,
1.278 djm 809: rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,
1.213 markus 810: ssh-rsa-cert-v01@openssh.com,
1.139 djm 811: ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
1.278 djm 812: ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa
1.139 djm 813: .Ed
1.145 djm 814: .Pp
815: If hostkeys are known for the destination host then this default is modified
816: to prefer their algorithms.
1.198 djm 817: .Pp
1.240 jmc 818: The list of available key types may also be obtained using
819: .Qq ssh -Q key .
1.1 stevesk 820: .It Cm HostKeyAlias
821: Specifies an alias that should be used instead of the
822: real host name when looking up or saving the host key
1.251 djm 823: in the host key database files and when validating host certificates.
1.84 jmc 824: This option is useful for tunneling SSH connections
1.1 stevesk 825: or for multiple servers running on a single host.
826: .It Cm HostName
827: Specifies the real host name to log into.
828: This can be used to specify nicknames or abbreviations for hosts.
1.239 jmc 829: Arguments to
830: .Cm HostName
831: accept the tokens described in the
832: .Sx TOKENS
833: section.
1.1 stevesk 834: Numeric IP addresses are also permitted (both on the command line and in
835: .Cm HostName
836: specifications).
1.239 jmc 837: The default is the name given on the command line.
1.29 markus 838: .It Cm IdentitiesOnly
839: Specifies that
1.84 jmc 840: .Xr ssh 1
1.221 djm 841: should only use the authentication identity and certificate files explicitly
842: configured in the
1.31 jmc 843: .Nm
1.221 djm 844: files
845: or passed on the
846: .Xr ssh 1
847: command-line,
1.84 jmc 848: even if
849: .Xr ssh-agent 1
1.159 djm 850: or a
851: .Cm PKCS11Provider
1.29 markus 852: offers more identities.
853: The argument to this keyword must be
1.240 jmc 854: .Cm yes
1.29 markus 855: or
1.240 jmc 856: .Cm no
857: (the default).
1.84 jmc 858: This option is intended for situations where ssh-agent
1.29 markus 859: offers many different identities.
1.231 markus 860: .It Cm IdentityAgent
861: Specifies the
862: .Ux Ns -domain
863: socket used to communicate with the authentication agent.
864: .Pp
865: This option overrides the
1.240 jmc 866: .Ev SSH_AUTH_SOCK
1.231 markus 867: environment variable and can be used to select a specific agent.
868: Setting the socket name to
1.240 jmc 869: .Cm none
1.231 markus 870: disables the use of an authentication agent.
1.232 markus 871: If the string
1.240 jmc 872: .Qq SSH_AUTH_SOCK
1.232 markus 873: is specified, the location of the socket will be read from the
874: .Ev SSH_AUTH_SOCK
875: environment variable.
1.231 markus 876: .Pp
1.239 jmc 877: Arguments to
878: .Cm IdentityAgent
879: may use the tilde syntax to refer to a user's home directory
880: or the tokens described in the
881: .Sx TOKENS
882: section.
1.67 jmc 883: .It Cm IdentityFile
1.192 sobrado 884: Specifies a file from which the user's DSA, ECDSA, Ed25519 or RSA authentication
1.139 djm 885: identity is read.
1.67 jmc 886: The default is
1.139 djm 887: .Pa ~/.ssh/id_dsa ,
1.183 naddy 888: .Pa ~/.ssh/id_ecdsa ,
889: .Pa ~/.ssh/id_ed25519
1.139 djm 890: and
1.245 djm 891: .Pa ~/.ssh/id_rsa .
1.67 jmc 892: Additionally, any identities represented by the authentication agent
1.165 djm 893: will be used for authentication unless
894: .Cm IdentitiesOnly
895: is set.
1.221 djm 896: If no certificates have been explicitly specified by
897: .Cm CertificateFile ,
1.129 djm 898: .Xr ssh 1
899: will try to load certificate information from the filename obtained by
900: appending
901: .Pa -cert.pub
902: to the path of a specified
903: .Cm IdentityFile .
1.90 djm 904: .Pp
1.239 jmc 905: Arguments to
906: .Cm IdentityFile
907: may use the tilde syntax to refer to a user's home directory
908: or the tokens described in the
909: .Sx TOKENS
910: section.
1.90 djm 911: .Pp
1.67 jmc 912: It is possible to have
913: multiple identity files specified in configuration files; all these
914: identities will be tried in sequence.
1.152 djm 915: Multiple
916: .Cm IdentityFile
917: directives will add to the list of identities tried (this behaviour
918: differs from that of other configuration directives).
1.165 djm 919: .Pp
920: .Cm IdentityFile
921: may be used in conjunction with
922: .Cm IdentitiesOnly
923: to select which identities in an agent are offered during authentication.
1.221 djm 924: .Cm IdentityFile
925: may also be used in conjunction with
926: .Cm CertificateFile
927: in order to provide any certificate also needed for authentication with
928: the identity.
1.164 jmc 929: .It Cm IgnoreUnknown
930: Specifies a pattern-list of unknown options to be ignored if they are
931: encountered in configuration parsing.
932: This may be used to suppress errors if
933: .Nm
934: contains options that are unrecognised by
935: .Xr ssh 1 .
936: It is recommended that
937: .Cm IgnoreUnknown
938: be listed early in the configuration file as it will not be applied
939: to unknown options that appear before it.
1.229 djm 940: .It Cm Include
941: Include the specified configuration file(s).
1.230 jmc 942: Multiple pathnames may be specified and each pathname may contain
1.281 kn 943: .Xr glob 7
1.229 djm 944: wildcards and, for user configurations, shell-like
1.240 jmc 945: .Sq ~
1.229 djm 946: references to user home directories.
947: Files without absolute paths are assumed to be in
948: .Pa ~/.ssh
1.230 jmc 949: if included in a user configuration file or
1.229 djm 950: .Pa /etc/ssh
951: if included from the system configuration file.
952: .Cm Include
953: directive may appear inside a
954: .Cm Match
955: or
956: .Cm Host
957: block
958: to perform conditional inclusion.
1.143 djm 959: .It Cm IPQoS
960: Specifies the IPv4 type-of-service or DSCP class for connections.
961: Accepted values are
1.240 jmc 962: .Cm af11 ,
963: .Cm af12 ,
964: .Cm af13 ,
965: .Cm af21 ,
966: .Cm af22 ,
967: .Cm af23 ,
968: .Cm af31 ,
969: .Cm af32 ,
970: .Cm af33 ,
971: .Cm af41 ,
972: .Cm af42 ,
973: .Cm af43 ,
974: .Cm cs0 ,
975: .Cm cs1 ,
976: .Cm cs2 ,
977: .Cm cs3 ,
978: .Cm cs4 ,
979: .Cm cs5 ,
980: .Cm cs6 ,
981: .Cm cs7 ,
982: .Cm ef ,
983: .Cm lowdelay ,
984: .Cm throughput ,
985: .Cm reliability ,
1.253 djm 986: a numeric value, or
987: .Cm none
988: to use the operating system default.
1.146 djm 989: This option may take one or two arguments, separated by whitespace.
1.143 djm 990: If one argument is specified, it is used as the packet class unconditionally.
991: If two values are specified, the first is automatically selected for
992: interactive sessions and the second for non-interactive sessions.
993: The default is
1.269 job 994: .Cm af21
1.272 jmc 995: (Low-Latency Data)
1.143 djm 996: for interactive sessions and
1.269 job 997: .Cm cs1
1.272 jmc 998: (Lower Effort)
1.143 djm 999: for non-interactive sessions.
1.103 djm 1000: .It Cm KbdInteractiveAuthentication
1001: Specifies whether to use keyboard-interactive authentication.
1002: The argument to this keyword must be
1.240 jmc 1003: .Cm yes
1004: (the default)
1.103 djm 1005: or
1.240 jmc 1006: .Cm no .
1.39 djm 1007: .It Cm KbdInteractiveDevices
1008: Specifies the list of methods to use in keyboard-interactive authentication.
1009: Multiple method names must be comma-separated.
1010: The default is to use the server specified list.
1.85 jmc 1011: The methods available vary depending on what the server supports.
1012: For an OpenSSH server,
1013: it may be zero or more of:
1.240 jmc 1014: .Cm bsdauth ,
1015: .Cm pam ,
1.85 jmc 1016: and
1.240 jmc 1017: .Cm skey .
1.140 djm 1018: .It Cm KexAlgorithms
1019: Specifies the available KEX (Key Exchange) algorithms.
1020: Multiple algorithms must be comma-separated.
1.214 djm 1021: Alternately if the specified value begins with a
1022: .Sq +
1023: character, then the specified methods will be appended to the default set
1024: instead of replacing them.
1.241 djm 1025: If the specified value begins with a
1026: .Sq -
1027: character, then the specified methods (including wildcards) will be removed
1028: from the default set instead of replacing them.
1.141 jmc 1029: The default is:
1030: .Bd -literal -offset indent
1.238 djm 1031: curve25519-sha256,curve25519-sha256@libssh.org,
1.141 jmc 1032: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
1033: diffie-hellman-group-exchange-sha256,
1.266 djm 1034: diffie-hellman-group16-sha512,
1035: diffie-hellman-group18-sha512,
1.209 dtucker 1036: diffie-hellman-group-exchange-sha1,
1.266 djm 1037: diffie-hellman-group14-sha256,
1.212 djm 1038: diffie-hellman-group14-sha1
1.141 jmc 1039: .Ed
1.198 djm 1040: .Pp
1.240 jmc 1041: The list of available key exchange algorithms may also be obtained using
1042: .Qq ssh -Q kex .
1.65 reyk 1043: .It Cm LocalCommand
1044: Specifies a command to execute on the local machine after successfully
1045: connecting to the server.
1046: The command string extends to the end of the line, and is executed with
1.105 jmc 1047: the user's shell.
1.239 jmc 1048: Arguments to
1049: .Cm LocalCommand
1050: accept the tokens described in the
1051: .Sx TOKENS
1052: section.
1.123 djm 1053: .Pp
1054: The command is run synchronously and does not have access to the
1055: session of the
1056: .Xr ssh 1
1057: that spawned it.
1058: It should not be used for interactive commands.
1059: .Pp
1.65 reyk 1060: This directive is ignored unless
1061: .Cm PermitLocalCommand
1062: has been enabled.
1.1 stevesk 1063: .It Cm LocalForward
1.74 jmc 1064: Specifies that a TCP port on the local machine be forwarded over
1.1 stevesk 1065: the secure channel to the specified host and port from the remote machine.
1.49 jmc 1066: The first argument must be
1.43 djm 1067: .Sm off
1.49 jmc 1068: .Oo Ar bind_address : Oc Ar port
1.43 djm 1069: .Sm on
1.49 jmc 1070: and the second argument must be
1071: .Ar host : Ns Ar hostport .
1.138 djm 1072: IPv6 addresses can be specified by enclosing addresses in square brackets.
1.46 jmc 1073: Multiple forwardings may be specified, and additional forwardings can be
1.43 djm 1074: given on the command line.
1.1 stevesk 1075: Only the superuser can forward privileged ports.
1.43 djm 1076: By default, the local port is bound in accordance with the
1077: .Cm GatewayPorts
1078: setting.
1079: However, an explicit
1080: .Ar bind_address
1081: may be used to bind the connection to a specific address.
1082: The
1083: .Ar bind_address
1084: of
1.240 jmc 1085: .Cm localhost
1.46 jmc 1086: indicates that the listening port be bound for local use only, while an
1087: empty address or
1088: .Sq *
1.43 djm 1089: indicates that the port should be available from all interfaces.
1.1 stevesk 1090: .It Cm LogLevel
1091: Gives the verbosity level that is used when logging messages from
1.84 jmc 1092: .Xr ssh 1 .
1.1 stevesk 1093: The possible values are:
1.84 jmc 1094: QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3.
1.7 jmc 1095: The default is INFO.
1096: DEBUG and DEBUG1 are equivalent.
1097: DEBUG2 and DEBUG3 each specify higher levels of verbose output.
1.1 stevesk 1098: .It Cm MACs
1099: Specifies the MAC (message authentication code) algorithms
1100: in order of preference.
1.226 jmc 1101: The MAC algorithm is used for data integrity protection.
1.1 stevesk 1102: Multiple algorithms must be comma-separated.
1.214 djm 1103: If the specified value begins with a
1104: .Sq +
1105: character, then the specified algorithms will be appended to the default set
1106: instead of replacing them.
1.241 djm 1107: If the specified value begins with a
1108: .Sq -
1109: character, then the specified algorithms (including wildcards) will be removed
1110: from the default set instead of replacing them.
1.214 djm 1111: .Pp
1.160 markus 1112: The algorithms that contain
1.240 jmc 1113: .Qq -etm
1.160 markus 1114: calculate the MAC after encryption (encrypt-then-mac).
1115: These are considered safer and their use recommended.
1.214 djm 1116: .Pp
1.84 jmc 1117: The default is:
1.101 jmc 1118: .Bd -literal -offset indent
1.160 markus 1119: umac-64-etm@openssh.com,umac-128-etm@openssh.com,
1120: hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
1.224 djm 1121: hmac-sha1-etm@openssh.com,
1.186 naddy 1122: umac-64@openssh.com,umac-128@openssh.com,
1.224 djm 1123: hmac-sha2-256,hmac-sha2-512,hmac-sha1
1.101 jmc 1124: .Ed
1.198 djm 1125: .Pp
1.240 jmc 1126: The list of available MAC algorithms may also be obtained using
1127: .Qq ssh -Q mac .
1.1 stevesk 1128: .It Cm NoHostAuthenticationForLocalhost
1.264 djm 1129: Disable host authentication for localhost (loopback addresses).
1.1 stevesk 1130: The argument to this keyword must be
1.240 jmc 1131: .Cm yes
1.1 stevesk 1132: or
1.242 jmc 1133: .Cm no
1.240 jmc 1134: (the default).
1.1 stevesk 1135: .It Cm NumberOfPasswordPrompts
1136: Specifies the number of password prompts before giving up.
1137: The argument to this keyword must be an integer.
1.84 jmc 1138: The default is 3.
1.1 stevesk 1139: .It Cm PasswordAuthentication
1140: Specifies whether to use password authentication.
1141: The argument to this keyword must be
1.240 jmc 1142: .Cm yes
1143: (the default)
1.1 stevesk 1144: or
1.240 jmc 1145: .Cm no .
1.65 reyk 1146: .It Cm PermitLocalCommand
1147: Allow local command execution via the
1148: .Ic LocalCommand
1149: option or using the
1.66 jmc 1150: .Ic !\& Ns Ar command
1.65 reyk 1151: escape sequence in
1152: .Xr ssh 1 .
1153: The argument must be
1.240 jmc 1154: .Cm yes
1.65 reyk 1155: or
1.240 jmc 1156: .Cm no
1157: (the default).
1.127 markus 1158: .It Cm PKCS11Provider
1159: Specifies which PKCS#11 provider to use.
1.144 jmc 1160: The argument to this keyword is the PKCS#11 shared library
1.127 markus 1161: .Xr ssh 1
1.128 markus 1162: should use to communicate with a PKCS#11 token providing the user's
1.127 markus 1163: private RSA key.
1.67 jmc 1164: .It Cm Port
1165: Specifies the port number to connect on the remote host.
1.84 jmc 1166: The default is 22.
1.1 stevesk 1167: .It Cm PreferredAuthentications
1.226 jmc 1168: Specifies the order in which the client should try authentication methods.
1.48 jmc 1169: This allows a client to prefer one method (e.g.\&
1.1 stevesk 1170: .Cm keyboard-interactive )
1.48 jmc 1171: over another method (e.g.\&
1.131 jmc 1172: .Cm password ) .
1173: The default is:
1174: .Bd -literal -offset indent
1175: gssapi-with-mic,hostbased,publickey,
1176: keyboard-interactive,password
1177: .Ed
1.1 stevesk 1178: .It Cm ProxyCommand
1179: Specifies the command to use to connect to the server.
1180: The command
1.190 djm 1181: string extends to the end of the line, and is executed
1182: using the user's shell
1183: .Ql exec
1184: directive to avoid a lingering shell process.
1185: .Pp
1.239 jmc 1186: Arguments to
1187: .Cm ProxyCommand
1188: accept the tokens described in the
1189: .Sx TOKENS
1190: section.
1.1 stevesk 1191: The command can be basically anything,
1192: and should read from its standard input and write to its standard output.
1193: It should eventually connect an
1194: .Xr sshd 8
1195: server running on some machine, or execute
1196: .Ic sshd -i
1197: somewhere.
1198: Host key management will be done using the
1199: HostName of the host being connected (defaulting to the name typed by
1200: the user).
1.7 jmc 1201: Setting the command to
1.240 jmc 1202: .Cm none
1.6 markus 1203: disables this option entirely.
1.1 stevesk 1204: Note that
1205: .Cm CheckHostIP
1206: is not available for connects with a proxy command.
1.52 djm 1207: .Pp
1208: This directive is useful in conjunction with
1209: .Xr nc 1
1210: and its proxy support.
1.53 jmc 1211: For example, the following directive would connect via an HTTP proxy at
1.52 djm 1212: 192.0.2.0:
1213: .Bd -literal -offset 3n
1214: ProxyCommand /usr/bin/nc -X connect -x 192.0.2.0:8080 %h %p
1215: .Ed
1.233 djm 1216: .It Cm ProxyJump
1.260 millert 1217: Specifies one or more jump proxies as either
1.233 djm 1218: .Xo
1219: .Sm off
1.234 jmc 1220: .Op Ar user No @
1.233 djm 1221: .Ar host
1.234 jmc 1222: .Op : Ns Ar port
1.233 djm 1223: .Sm on
1.260 millert 1224: or an ssh URI
1.233 djm 1225: .Xc .
1.235 djm 1226: Multiple proxies may be separated by comma characters and will be visited
1.236 djm 1227: sequentially.
1.233 djm 1228: Setting this option will cause
1229: .Xr ssh 1
1230: to connect to the target host by first making a
1231: .Xr ssh 1
1232: connection to the specified
1233: .Cm ProxyJump
1234: host and then establishing a
1.234 jmc 1235: TCP forwarding to the ultimate target from there.
1.233 djm 1236: .Pp
1237: Note that this option will compete with the
1238: .Cm ProxyCommand
1239: option - whichever is specified first will prevent later instances of the
1240: other from taking effect.
1.167 djm 1241: .It Cm ProxyUseFdpass
1.168 jmc 1242: Specifies that
1.167 djm 1243: .Cm ProxyCommand
1244: will pass a connected file descriptor back to
1.168 jmc 1245: .Xr ssh 1
1.167 djm 1246: instead of continuing to execute and pass data.
1247: The default is
1.240 jmc 1248: .Cm no .
1.213 markus 1249: .It Cm PubkeyAcceptedKeyTypes
1250: Specifies the key types that will be used for public key authentication
1.279 djm 1251: as a comma-separated list of patterns.
1.214 djm 1252: Alternately if the specified value begins with a
1253: .Sq +
1254: character, then the key types after it will be appended to the default
1255: instead of replacing it.
1.241 djm 1256: If the specified value begins with a
1257: .Sq -
1258: character, then the specified key types (including wildcards) will be removed
1259: from the default set instead of replacing them.
1.213 markus 1260: The default for this option is:
1261: .Bd -literal -offset 3n
1262: ecdsa-sha2-nistp256-cert-v01@openssh.com,
1263: ecdsa-sha2-nistp384-cert-v01@openssh.com,
1264: ecdsa-sha2-nistp521-cert-v01@openssh.com,
1265: ssh-ed25519-cert-v01@openssh.com,
1.278 djm 1266: rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,
1.213 markus 1267: ssh-rsa-cert-v01@openssh.com,
1268: ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
1.278 djm 1269: ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa
1.213 markus 1270: .Ed
1271: .Pp
1.240 jmc 1272: The list of available key types may also be obtained using
1273: .Qq ssh -Q key .
1.1 stevesk 1274: .It Cm PubkeyAuthentication
1275: Specifies whether to try public key authentication.
1276: The argument to this keyword must be
1.240 jmc 1277: .Cm yes
1278: (the default)
1.1 stevesk 1279: or
1.240 jmc 1280: .Cm no .
1.75 dtucker 1281: .It Cm RekeyLimit
1282: Specifies the maximum amount of data that may be transmitted before the
1.162 dtucker 1283: session key is renegotiated, optionally followed a maximum amount of
1284: time that may pass before the session key is renegotiated.
1285: The first argument is specified in bytes and may have a suffix of
1.76 jmc 1286: .Sq K ,
1287: .Sq M ,
1.75 dtucker 1288: or
1.76 jmc 1289: .Sq G
1.75 dtucker 1290: to indicate Kilobytes, Megabytes, or Gigabytes, respectively.
1291: The default is between
1.84 jmc 1292: .Sq 1G
1.75 dtucker 1293: and
1.84 jmc 1294: .Sq 4G ,
1.75 dtucker 1295: depending on the cipher.
1.162 dtucker 1296: The optional second value is specified in seconds and may use any of the
1297: units documented in the
1.240 jmc 1298: .Sx TIME FORMATS
1299: section of
1.162 dtucker 1300: .Xr sshd_config 5 .
1301: The default value for
1302: .Cm RekeyLimit
1303: is
1.240 jmc 1304: .Cm default none ,
1.162 dtucker 1305: which means that rekeying is performed after the cipher's default amount
1306: of data has been sent or received and no time based rekeying is done.
1.249 bluhm 1307: .It Cm RemoteCommand
1308: Specifies a command to execute on the remote machine after successfully
1309: connecting to the server.
1310: The command string extends to the end of the line, and is executed with
1311: the user's shell.
1.250 jmc 1312: Arguments to
1313: .Cm RemoteCommand
1314: accept the tokens described in the
1315: .Sx TOKENS
1316: section.
1.1 stevesk 1317: .It Cm RemoteForward
1.74 jmc 1318: Specifies that a TCP port on the remote machine be forwarded over
1.256 markus 1319: the secure channel.
1.273 djm 1320: The remote port may either be forwarded to a specified host and port
1.256 markus 1321: from the local machine, or may act as a SOCKS 4/5 proxy that allows a remote
1322: client to connect to arbitrary destinations from the local machine.
1.49 jmc 1323: The first argument must be
1.43 djm 1324: .Sm off
1.49 jmc 1325: .Oo Ar bind_address : Oc Ar port
1.43 djm 1326: .Sm on
1.256 markus 1327: If forwarding to a specific destination then the second argument must be
1328: .Ar host : Ns Ar hostport ,
1329: otherwise if no destination argument is specified then the remote forwarding
1330: will be established as a SOCKS proxy.
1331: .Pp
1.138 djm 1332: IPv6 addresses can be specified by enclosing addresses in square brackets.
1.1 stevesk 1333: Multiple forwardings may be specified, and additional
1334: forwardings can be given on the command line.
1.113 stevesk 1335: Privileged ports can be forwarded only when
1336: logging in as root on the remote machine.
1.118 jmc 1337: .Pp
1.117 djm 1338: If the
1339: .Ar port
1.240 jmc 1340: argument is 0,
1.117 djm 1341: the listen port will be dynamically allocated on the server and reported
1342: to the client at run time.
1.43 djm 1343: .Pp
1344: If the
1345: .Ar bind_address
1346: is not specified, the default is to only bind to loopback addresses.
1347: If the
1348: .Ar bind_address
1349: is
1350: .Ql *
1351: or an empty string, then the forwarding is requested to listen on all
1352: interfaces.
1353: Specifying a remote
1354: .Ar bind_address
1.46 jmc 1355: will only succeed if the server's
1356: .Cm GatewayPorts
1.43 djm 1357: option is enabled (see
1.46 jmc 1358: .Xr sshd_config 5 ) .
1.149 djm 1359: .It Cm RequestTTY
1360: Specifies whether to request a pseudo-tty for the session.
1361: The argument may be one of:
1.240 jmc 1362: .Cm no
1.149 djm 1363: (never request a TTY),
1.240 jmc 1364: .Cm yes
1.149 djm 1365: (always request a TTY when standard input is a TTY),
1.240 jmc 1366: .Cm force
1.149 djm 1367: (always request a TTY) or
1.240 jmc 1368: .Cm auto
1.149 djm 1369: (request a TTY when opening a login session).
1370: This option mirrors the
1371: .Fl t
1372: and
1373: .Fl T
1374: flags for
1375: .Xr ssh 1 .
1.196 djm 1376: .It Cm RevokedHostKeys
1377: Specifies revoked host public keys.
1378: Keys listed in this file will be refused for host authentication.
1379: Note that if this file does not exist or is not readable,
1380: then host authentication will be refused for all hosts.
1381: Keys may be specified as a text file, listing one public key per line, or as
1382: an OpenSSH Key Revocation List (KRL) as generated by
1383: .Xr ssh-keygen 1 .
1384: For more information on KRLs, see the KEY REVOCATION LISTS section in
1385: .Xr ssh-keygen 1 .
1.32 djm 1386: .It Cm SendEnv
1387: Specifies what variables from the local
1388: .Xr environ 7
1389: should be sent to the server.
1.84 jmc 1390: The server must also support it, and the server must be configured to
1.33 djm 1391: accept these environment variables.
1.207 dtucker 1392: Note that the
1393: .Ev TERM
1.208 jmc 1394: environment variable is always sent whenever a
1.207 dtucker 1395: pseudo-terminal is requested as it is required by the protocol.
1.32 djm 1396: Refer to
1397: .Cm AcceptEnv
1398: in
1399: .Xr sshd_config 5
1400: for how to configure the server.
1.80 jmc 1401: Variables are specified by name, which may contain wildcard characters.
1.33 djm 1402: Multiple environment variables may be separated by whitespace or spread
1.32 djm 1403: across multiple
1404: .Cm SendEnv
1405: directives.
1.81 jmc 1406: .Pp
1407: See
1408: .Sx PATTERNS
1409: for more information on patterns.
1.271 djm 1410: .Pp
1.272 jmc 1411: It is possible to clear previously set
1.271 djm 1412: .Cm SendEnv
1413: variable names by prefixing patterns with
1414: .Pa - .
1415: The default is not to send any environment variables.
1.28 markus 1416: .It Cm ServerAliveCountMax
1.73 jmc 1417: Sets the number of server alive messages (see below) which may be
1.28 markus 1418: sent without
1.84 jmc 1419: .Xr ssh 1
1.28 markus 1420: receiving any messages back from the server.
1421: If this threshold is reached while server alive messages are being sent,
1.84 jmc 1422: ssh will disconnect from the server, terminating the session.
1.28 markus 1423: It is important to note that the use of server alive messages is very
1424: different from
1425: .Cm TCPKeepAlive
1426: (below).
1427: The server alive messages are sent through the encrypted channel
1428: and therefore will not be spoofable.
1429: The TCP keepalive option enabled by
1430: .Cm TCPKeepAlive
1431: is spoofable.
1432: The server alive mechanism is valuable when the client or
1433: server depend on knowing when a connection has become inactive.
1434: .Pp
1435: The default value is 3.
1436: If, for example,
1437: .Cm ServerAliveInterval
1.84 jmc 1438: (see below) is set to 15 and
1.28 markus 1439: .Cm ServerAliveCountMax
1.84 jmc 1440: is left at the default, if the server becomes unresponsive,
1441: ssh will disconnect after approximately 45 seconds.
1.67 jmc 1442: .It Cm ServerAliveInterval
1443: Sets a timeout interval in seconds after which if no data has been received
1444: from the server,
1.84 jmc 1445: .Xr ssh 1
1.67 jmc 1446: will send a message through the encrypted
1447: channel to request a response from the server.
1448: The default
1449: is 0, indicating that these messages will not be sent to the server.
1.277 jmc 1450: .It Cm SetEnv
1451: Directly specify one or more environment variables and their contents to
1452: be sent to the server.
1453: Similarly to
1454: .Cm SendEnv ,
1455: the server must be prepared to accept the environment variable.
1.191 millert 1456: .It Cm StreamLocalBindMask
1457: Sets the octal file creation mode mask
1458: .Pq umask
1459: used when creating a Unix-domain socket file for local or remote
1460: port forwarding.
1461: This option is only used for port forwarding to a Unix-domain socket file.
1462: .Pp
1463: The default value is 0177, which creates a Unix-domain socket file that is
1464: readable and writable only by the owner.
1465: Note that not all operating systems honor the file mode on Unix-domain
1466: socket files.
1467: .It Cm StreamLocalBindUnlink
1468: Specifies whether to remove an existing Unix-domain socket file for local
1469: or remote port forwarding before creating a new one.
1470: If the socket file already exists and
1471: .Cm StreamLocalBindUnlink
1472: is not enabled,
1473: .Nm ssh
1474: will be unable to forward the port to the Unix-domain socket file.
1475: This option is only used for port forwarding to a Unix-domain socket file.
1476: .Pp
1477: The argument must be
1.240 jmc 1478: .Cm yes
1.191 millert 1479: or
1.240 jmc 1480: .Cm no
1481: (the default).
1.1 stevesk 1482: .It Cm StrictHostKeyChecking
1483: If this flag is set to
1.240 jmc 1484: .Cm yes ,
1.84 jmc 1485: .Xr ssh 1
1.1 stevesk 1486: will never automatically add host keys to the
1.50 djm 1487: .Pa ~/.ssh/known_hosts
1.1 stevesk 1488: file, and refuses to connect to hosts whose host key has changed.
1.263 dtucker 1489: This provides maximum protection against man-in-the-middle (MITM) attacks,
1.84 jmc 1490: though it can be annoying when the
1.1 stevesk 1491: .Pa /etc/ssh/ssh_known_hosts
1.84 jmc 1492: file is poorly maintained or when connections to new hosts are
1.1 stevesk 1493: frequently made.
1494: This option forces the user to manually
1495: add all new hosts.
1.255 jmc 1496: .Pp
1.1 stevesk 1497: If this flag is set to
1.254 djm 1498: .Dq accept-new
1.255 jmc 1499: then ssh will automatically add new host keys to the user
1.254 djm 1500: known hosts files, but will not permit connections to hosts with
1501: changed host keys.
1502: If this flag is set to
1503: .Dq no
1504: or
1505: .Dq off ,
1.255 jmc 1506: ssh will automatically add new host keys to the user known hosts files
1507: and allow connections to hosts with changed hostkeys to proceed,
1508: subject to some restrictions.
1.1 stevesk 1509: If this flag is set to
1.240 jmc 1510: .Cm ask
1511: (the default),
1.1 stevesk 1512: new host keys
1513: will be added to the user known host files only after the user
1514: has confirmed that is what they really want to do, and
1.84 jmc 1515: ssh will refuse to connect to hosts whose host key has changed.
1.1 stevesk 1516: The host keys of
1517: known hosts will be verified automatically in all cases.
1.244 jmc 1518: .It Cm SyslogFacility
1519: Gives the facility code that is used when logging messages from
1520: .Xr ssh 1 .
1521: The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2,
1522: LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
1523: The default is USER.
1.26 markus 1524: .It Cm TCPKeepAlive
1525: Specifies whether the system should send TCP keepalive messages to the
1526: other side.
1527: If they are sent, death of the connection or crash of one
1528: of the machines will be properly noticed.
1529: However, this means that
1530: connections will die if the route is down temporarily, and some people
1531: find it annoying.
1532: .Pp
1533: The default is
1.240 jmc 1534: .Cm yes
1.26 markus 1535: (to send TCP keepalive messages), and the client will notice
1536: if the network goes down or the remote host dies.
1537: This is important in scripts, and many users want it too.
1538: .Pp
1539: To disable TCP keepalive messages, the value should be set to
1.240 jmc 1540: .Cm no .
1.265 djm 1541: See also
1542: .Cm ServerAliveInterval
1543: for protocol-level keepalives.
1.65 reyk 1544: .It Cm Tunnel
1.95 stevesk 1545: Request
1.65 reyk 1546: .Xr tun 4
1.69 jmc 1547: device forwarding between the client and the server.
1.65 reyk 1548: The argument must be
1.240 jmc 1549: .Cm yes ,
1550: .Cm point-to-point
1.95 stevesk 1551: (layer 3),
1.240 jmc 1552: .Cm ethernet
1.95 stevesk 1553: (layer 2),
1.65 reyk 1554: or
1.240 jmc 1555: .Cm no
1556: (the default).
1.95 stevesk 1557: Specifying
1.240 jmc 1558: .Cm yes
1.95 stevesk 1559: requests the default tunnel mode, which is
1.240 jmc 1560: .Cm point-to-point .
1.65 reyk 1561: .It Cm TunnelDevice
1.95 stevesk 1562: Specifies the
1.65 reyk 1563: .Xr tun 4
1.95 stevesk 1564: devices to open on the client
1565: .Pq Ar local_tun
1566: and the server
1567: .Pq Ar remote_tun .
1568: .Pp
1569: The argument must be
1570: .Sm off
1571: .Ar local_tun Op : Ar remote_tun .
1572: .Sm on
1573: The devices may be specified by numerical ID or the keyword
1.240 jmc 1574: .Cm any ,
1.95 stevesk 1575: which uses the next available tunnel device.
1576: If
1577: .Ar remote_tun
1578: is not specified, it defaults to
1.240 jmc 1579: .Cm any .
1.95 stevesk 1580: The default is
1.240 jmc 1581: .Cm any:any .
1.201 djm 1582: .It Cm UpdateHostKeys
1.200 djm 1583: Specifies whether
1584: .Xr ssh 1
1585: should accept notifications of additional hostkeys from the server sent
1586: after authentication has completed and add them to
1587: .Cm UserKnownHostsFile .
1588: The argument must be
1.240 jmc 1589: .Cm yes ,
1590: .Cm no
1.204 djm 1591: (the default) or
1.240 jmc 1592: .Cm ask .
1.200 djm 1593: Enabling this option allows learning alternate hostkeys for a server
1.201 djm 1594: and supports graceful key rotation by allowing a server to send replacement
1595: public keys before old ones are removed.
1.200 djm 1596: Additional hostkeys are only accepted if the key used to authenticate the
1.220 sobrado 1597: host was already trusted or explicitly accepted by the user.
1.204 djm 1598: If
1599: .Cm UpdateHostKeys
1600: is set to
1.240 jmc 1601: .Cm ask ,
1.204 djm 1602: then the user is asked to confirm the modifications to the known_hosts file.
1.205 djm 1603: Confirmation is currently incompatible with
1604: .Cm ControlPersist ,
1605: and will be disabled if it is enabled.
1.200 djm 1606: .Pp
1607: Presently, only
1608: .Xr sshd 8
1609: from OpenSSH 6.8 and greater support the
1.240 jmc 1610: .Qq hostkeys@openssh.com
1.200 djm 1611: protocol extension used to inform the client of all the server's hostkeys.
1.1 stevesk 1612: .It Cm User
1613: Specifies the user to log in as.
1614: This can be useful when a different user name is used on different machines.
1615: This saves the trouble of
1616: having to remember to give the user name on the command line.
1617: .It Cm UserKnownHostsFile
1.151 djm 1618: Specifies one or more files to use for the user
1619: host key database, separated by whitespace.
1620: The default is
1621: .Pa ~/.ssh/known_hosts ,
1622: .Pa ~/.ssh/known_hosts2 .
1.8 jakob 1623: .It Cm VerifyHostKeyDNS
1624: Specifies whether to verify the remote key using DNS and SSHFP resource
1625: records.
1.24 jakob 1626: If this option is set to
1.240 jmc 1627: .Cm yes ,
1.25 jmc 1628: the client will implicitly trust keys that match a secure fingerprint
1.24 jakob 1629: from DNS.
1630: Insecure fingerprints will be handled as if this option was set to
1.240 jmc 1631: .Cm ask .
1.24 jakob 1632: If this option is set to
1.240 jmc 1633: .Cm ask ,
1.24 jakob 1634: information on fingerprint match will be displayed, but the user will still
1635: need to confirm new host keys according to the
1636: .Cm StrictHostKeyChecking
1637: option.
1.8 jakob 1638: The default is
1.240 jmc 1639: .Cm no .
1.84 jmc 1640: .Pp
1.240 jmc 1641: See also
1642: .Sx VERIFYING HOST KEYS
1643: in
1.84 jmc 1644: .Xr ssh 1 .
1.111 grunk 1645: .It Cm VisualHostKey
1646: If this flag is set to
1.240 jmc 1647: .Cm yes ,
1.111 grunk 1648: an ASCII art representation of the remote host key fingerprint is
1.197 djm 1649: printed in addition to the fingerprint string at login and
1.114 stevesk 1650: for unknown host keys.
1.111 grunk 1651: If this flag is set to
1.240 jmc 1652: .Cm no
1653: (the default),
1.114 stevesk 1654: no fingerprint strings are printed at login and
1.197 djm 1655: only the fingerprint string will be printed for unknown host keys.
1.1 stevesk 1656: .It Cm XAuthLocation
1.5 stevesk 1657: Specifies the full pathname of the
1.1 stevesk 1658: .Xr xauth 1
1659: program.
1660: The default is
1661: .Pa /usr/X11R6/bin/xauth .
1662: .El
1.86 jmc 1663: .Sh PATTERNS
1664: A
1665: .Em pattern
1666: consists of zero or more non-whitespace characters,
1667: .Sq *
1668: (a wildcard that matches zero or more characters),
1669: or
1670: .Sq ?\&
1671: (a wildcard that matches exactly one character).
1672: For example, to specify a set of declarations for any host in the
1.240 jmc 1673: .Qq .co.uk
1.86 jmc 1674: set of domains,
1675: the following pattern could be used:
1676: .Pp
1677: .Dl Host *.co.uk
1678: .Pp
1679: The following pattern
1680: would match any host in the 192.168.0.[0-9] network range:
1681: .Pp
1682: .Dl Host 192.168.0.?
1683: .Pp
1684: A
1685: .Em pattern-list
1686: is a comma-separated list of patterns.
1687: Patterns within pattern-lists may be negated
1688: by preceding them with an exclamation mark
1689: .Pq Sq !\& .
1690: For example,
1.174 djm 1691: to allow a key to be used from anywhere within an organization
1.86 jmc 1692: except from the
1.240 jmc 1693: .Qq dialup
1.86 jmc 1694: pool,
1695: the following entry (in authorized_keys) could be used:
1696: .Pp
1697: .Dl from=\&"!*.dialup.example.com,*.example.com\&"
1.258 djm 1698: .Pp
1699: Note that a negated match will never produce a positive result by itself.
1700: For example, attempting to match
1701: .Qq host3
1702: against the following pattern-list will fail:
1703: .Pp
1704: .Dl from=\&"!host1,!host2\&"
1705: .Pp
1706: The solution here is to include a term that will yield a positive match,
1707: such as a wildcard:
1708: .Pp
1709: .Dl from=\&"!host1,!host2,*\&"
1.239 jmc 1710: .Sh TOKENS
1711: Arguments to some keywords can make use of tokens,
1712: which are expanded at runtime:
1713: .Pp
1714: .Bl -tag -width XXXX -offset indent -compact
1715: .It %%
1716: A literal
1717: .Sq % .
1718: .It \&%C
1.257 jmc 1719: Hash of %l%h%p%r.
1.239 jmc 1720: .It %d
1721: Local user's home directory.
1722: .It %h
1723: The remote hostname.
1724: .It %i
1725: The local user ID.
1726: .It %L
1727: The local hostname.
1728: .It %l
1729: The local hostname, including the domain name.
1730: .It %n
1731: The original remote hostname, as given on the command line.
1732: .It %p
1733: The remote port.
1734: .It %r
1735: The remote username.
1.261 djm 1736: .It \&%T
1737: The local
1738: .Xr tun 4
1739: or
1740: .Xr tap 4
1741: network interface assigned if
1.262 jmc 1742: tunnel forwarding was requested, or
1743: .Qq NONE
1.261 djm 1744: otherwise.
1.239 jmc 1745: .It %u
1746: The local username.
1747: .El
1748: .Pp
1749: .Cm Match exec
1.274 djm 1750: accepts the tokens %%, %h, %i, %L, %l, %n, %p, %r, and %u.
1.239 jmc 1751: .Pp
1752: .Cm CertificateFile
1.275 jmc 1753: accepts the tokens %%, %d, %h, %i, %l, %r, and %u.
1.239 jmc 1754: .Pp
1755: .Cm ControlPath
1756: accepts the tokens %%, %C, %h, %i, %L, %l, %n, %p, %r, and %u.
1757: .Pp
1758: .Cm HostName
1759: accepts the tokens %% and %h.
1760: .Pp
1761: .Cm IdentityAgent
1762: and
1763: .Cm IdentityFile
1.275 jmc 1764: accept the tokens %%, %d, %h, %i, %l, %r, and %u.
1.239 jmc 1765: .Pp
1766: .Cm LocalCommand
1.275 jmc 1767: accepts the tokens %%, %C, %d, %h, %i, %l, %n, %p, %r, %T, and %u.
1.239 jmc 1768: .Pp
1769: .Cm ProxyCommand
1770: accepts the tokens %%, %h, %p, and %r.
1.250 jmc 1771: .Pp
1772: .Cm RemoteCommand
1.274 djm 1773: accepts the tokens %%, %C, %d, %h, %i, %l, %n, %p, %r, and %u.
1.1 stevesk 1774: .Sh FILES
1775: .Bl -tag -width Ds
1.50 djm 1776: .It Pa ~/.ssh/config
1.1 stevesk 1777: This is the per-user configuration file.
1778: The format of this file is described above.
1.84 jmc 1779: This file is used by the SSH client.
1.30 djm 1780: Because of the potential for abuse, this file must have strict permissions:
1781: read/write for the user, and not accessible by others.
1.1 stevesk 1782: .It Pa /etc/ssh/ssh_config
1783: Systemwide configuration file.
1784: This file provides defaults for those
1785: values that are not specified in the user's configuration file, and
1786: for those users who do not have a configuration file.
1787: This file must be world-readable.
1788: .El
1.13 jmc 1789: .Sh SEE ALSO
1790: .Xr ssh 1
1.1 stevesk 1791: .Sh AUTHORS
1.240 jmc 1792: .An -nosplit
1.1 stevesk 1793: OpenSSH is a derivative of the original and free
1.240 jmc 1794: ssh 1.2.12 release by
1795: .An Tatu Ylonen .
1796: .An Aaron Campbell , Bob Beck , Markus Friedl ,
1797: .An Niels Provos , Theo de Raadt
1798: and
1799: .An Dug Song
1.1 stevesk 1800: removed many bugs, re-added newer features and
1801: created OpenSSH.
1.240 jmc 1802: .An Markus Friedl
1803: contributed the support for SSH protocol versions 1.5 and 2.0.