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