xref: /openbsd-src/usr.bin/ssh/ssh_config.5 (revision f6aab3d83b51b91c24247ad2c2573574de475a82)
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.391 2023/10/12 02:18:18 djm Exp $
37.Dd $Mdocdate: October 12 2023 $
38.Dt SSH_CONFIG 5
39.Os
40.Sh NAME
41.Nm ssh_config
42.Nd OpenSSH client configuration file
43.Sh DESCRIPTION
44.Xr ssh 1
45obtains configuration data from the following sources in
46the following order:
47.Pp
48.Bl -enum -offset indent -compact
49.It
50command-line options
51.It
52user's configuration file
53.Pq Pa ~/.ssh/config
54.It
55system-wide configuration file
56.Pq Pa /etc/ssh/ssh_config
57.El
58.Pp
59Unless noted otherwise, for each parameter, the first obtained value
60will be used.
61The configuration files contain sections separated by
62.Cm Host
63specifications, and that section is only applied for hosts that
64match one of the patterns given in the specification.
65The matched host name is usually the one given on the command line
66(see the
67.Cm CanonicalizeHostname
68option for exceptions).
69.Pp
70Since the first obtained value for each parameter is used, more
71host-specific declarations should be given near the beginning of the
72file, and general defaults at the end.
73.Pp
74The file contains keyword-argument pairs, one per line.
75Lines starting with
76.Ql #
77and empty lines are interpreted as comments.
78Arguments may optionally be enclosed in double quotes
79.Pq \&"
80in order to represent arguments containing spaces.
81Configuration options may be separated by whitespace or
82optional whitespace and exactly one
83.Ql = ;
84the latter format is useful to avoid the need to quote whitespace
85when specifying configuration options using the
86.Nm ssh ,
87.Nm scp ,
88and
89.Nm sftp
90.Fl o
91option.
92.Pp
93The possible
94keywords and their meanings are as follows (note that
95keywords are case-insensitive and arguments are case-sensitive):
96.Bl -tag -width Ds
97.It Cm Host
98Restricts the following declarations (up to the next
99.Cm Host
100or
101.Cm Match
102keyword) to be only for those hosts that match one of the patterns
103given after the keyword.
104If more than one pattern is provided, they should be separated by whitespace.
105A single
106.Ql *
107as a pattern can be used to provide global
108defaults for all hosts.
109The host is usually the
110.Ar hostname
111argument given on the command line
112(see the
113.Cm CanonicalizeHostname
114keyword for exceptions).
115.Pp
116A pattern entry may be negated by prefixing it with an exclamation mark
117.Pq Sq !\& .
118If a negated entry is matched, then the
119.Cm Host
120entry is ignored, regardless of whether any other patterns on the line
121match.
122Negated matches are therefore useful to provide exceptions for wildcard
123matches.
124.Pp
125See
126.Sx PATTERNS
127for more information on patterns.
128.It Cm Match
129Restricts the following declarations (up to the next
130.Cm Host
131or
132.Cm Match
133keyword) to be used only when the conditions following the
134.Cm Match
135keyword are satisfied.
136Match conditions are specified using one or more criteria
137or the single token
138.Cm all
139which always matches.
140The available criteria keywords are:
141.Cm canonical ,
142.Cm final ,
143.Cm exec ,
144.Cm localnetwork ,
145.Cm host ,
146.Cm originalhost ,
147.Cm Tag ,
148.Cm user ,
149and
150.Cm localuser .
151The
152.Cm all
153criteria must appear alone or immediately after
154.Cm canonical
155or
156.Cm final .
157Other criteria may be combined arbitrarily.
158All criteria but
159.Cm all ,
160.Cm canonical ,
161and
162.Cm final
163require an argument.
164Criteria may be negated by prepending an exclamation mark
165.Pq Sq !\& .
166.Pp
167The
168.Cm canonical
169keyword matches only when the configuration file is being re-parsed
170after hostname canonicalization (see the
171.Cm CanonicalizeHostname
172option).
173This may be useful to specify conditions that work with canonical host
174names only.
175.Pp
176The
177.Cm final
178keyword requests that the configuration be re-parsed (regardless of whether
179.Cm CanonicalizeHostname
180is enabled), and matches only during this final pass.
181If
182.Cm CanonicalizeHostname
183is enabled, then
184.Cm canonical
185and
186.Cm final
187match during the same pass.
188.Pp
189The
190.Cm exec
191keyword executes the specified command under the user's shell.
192If the command returns a zero exit status then the condition is considered true.
193Commands containing whitespace characters must be quoted.
194Arguments to
195.Cm exec
196accept the tokens described in the
197.Sx TOKENS
198section.
199.Pp
200The
201.Cm localnetwork
202keyword matches the addresses of active local network interfaces against the
203supplied list of networks in CIDR format.
204This may be convenient for varying the effective configuration on devices that
205roam between networks.
206Note that network address is not a trustworthy criteria in many
207situations (e.g. when the network is automatically configured using DHCP)
208and so caution should be applied if using it to control security-sensitive
209configuration.
210.Pp
211The other keywords' criteria must be single entries or comma-separated
212lists and may use the wildcard and negation operators described in the
213.Sx PATTERNS
214section.
215The criteria for the
216.Cm host
217keyword are matched against the target hostname, after any substitution
218by the
219.Cm Hostname
220or
221.Cm CanonicalizeHostname
222options.
223The
224.Cm originalhost
225keyword matches against the hostname as it was specified on the command-line.
226The
227.Cm tagged
228keyword matches a tag name specified by a prior
229.Cm Tag
230directive or on the
231.Xr ssh 1
232command-line using the
233.Fl P
234flag.
235The
236.Cm user
237keyword matches against the target username on the remote host.
238The
239.Cm localuser
240keyword matches against the name of the local user running
241.Xr ssh 1
242(this keyword may be useful in system-wide
243.Nm
244files).
245.It Cm AddKeysToAgent
246Specifies whether keys should be automatically added to a running
247.Xr ssh-agent 1 .
248If this option is set to
249.Cm yes
250and a key is loaded from a file, the key and its passphrase are added to
251the agent with the default lifetime, as if by
252.Xr ssh-add 1 .
253If this option is set to
254.Cm ask ,
255.Xr ssh 1
256will require confirmation using the
257.Ev SSH_ASKPASS
258program before adding a key (see
259.Xr ssh-add 1
260for details).
261If this option is set to
262.Cm confirm ,
263each use of the key must be confirmed, as if the
264.Fl c
265option was specified to
266.Xr ssh-add 1 .
267If this option is set to
268.Cm no ,
269no keys are added to the agent.
270Alternately, this option may be specified as a time interval
271using the format described in the
272.Sx TIME FORMATS
273section of
274.Xr sshd_config 5
275to specify the key's lifetime in
276.Xr ssh-agent 1 ,
277after which it will automatically be removed.
278The argument must be
279.Cm no
280(the default),
281.Cm yes ,
282.Cm confirm
283(optionally followed by a time interval),
284.Cm ask
285or a time interval.
286.It Cm AddressFamily
287Specifies which address family to use when connecting.
288Valid arguments are
289.Cm any
290(the default),
291.Cm inet
292(use IPv4 only), or
293.Cm inet6
294(use IPv6 only).
295.It Cm BatchMode
296If set to
297.Cm yes ,
298user interaction such as password prompts and host key confirmation requests
299will be disabled.
300This option is useful in scripts and other batch jobs where no user
301is present to interact with
302.Xr ssh 1 .
303The argument must be
304.Cm yes
305or
306.Cm no
307(the default).
308.It Cm BindAddress
309Use the specified address on the local machine as the source address of
310the connection.
311Only useful on systems with more than one address.
312.It Cm BindInterface
313Use the address of the specified interface on the local machine as the
314source address of the connection.
315.It Cm CanonicalDomains
316When
317.Cm CanonicalizeHostname
318is enabled, this option specifies the list of domain suffixes in which to
319search for the specified destination host.
320.It Cm CanonicalizeFallbackLocal
321Specifies whether to fail with an error when hostname canonicalization fails.
322The default,
323.Cm yes ,
324will attempt to look up the unqualified hostname using the system resolver's
325search rules.
326A value of
327.Cm no
328will cause
329.Xr ssh 1
330to fail instantly if
331.Cm CanonicalizeHostname
332is enabled and the target hostname cannot be found in any of the domains
333specified by
334.Cm CanonicalDomains .
335.It Cm CanonicalizeHostname
336Controls whether explicit hostname canonicalization is performed.
337The default,
338.Cm no ,
339is not to perform any name rewriting and let the system resolver handle all
340hostname lookups.
341If set to
342.Cm yes
343then, for connections that do not use a
344.Cm ProxyCommand
345or
346.Cm ProxyJump ,
347.Xr ssh 1
348will attempt to canonicalize the hostname specified on the command line
349using the
350.Cm CanonicalDomains
351suffixes and
352.Cm CanonicalizePermittedCNAMEs
353rules.
354If
355.Cm CanonicalizeHostname
356is set to
357.Cm always ,
358then canonicalization is applied to proxied connections too.
359.Pp
360If this option is enabled, then the configuration files are processed
361again using the new target name to pick up any new configuration in matching
362.Cm Host
363and
364.Cm Match
365stanzas.
366A value of
367.Cm none
368disables the use of a
369.Cm ProxyJump
370host.
371.It Cm CanonicalizeMaxDots
372Specifies the maximum number of dot characters in a hostname before
373canonicalization is disabled.
374The default, 1,
375allows a single dot (i.e. hostname.subdomain).
376.It Cm CanonicalizePermittedCNAMEs
377Specifies rules to determine whether CNAMEs should be followed when
378canonicalizing hostnames.
379The rules consist of one or more arguments of
380.Ar source_domain_list : Ns Ar target_domain_list ,
381where
382.Ar source_domain_list
383is a pattern-list of domains that may follow CNAMEs in canonicalization,
384and
385.Ar target_domain_list
386is a pattern-list of domains that they may resolve to.
387.Pp
388For example,
389.Qq *.a.example.com:*.b.example.com,*.c.example.com
390will allow hostnames matching
391.Qq *.a.example.com
392to be canonicalized to names in the
393.Qq *.b.example.com
394or
395.Qq *.c.example.com
396domains.
397.Pp
398A single argument of
399.Qq none
400causes no CNAMEs to be considered for canonicalization.
401This is the default behaviour.
402.It Cm CASignatureAlgorithms
403Specifies which algorithms are allowed for signing of certificates
404by certificate authorities (CAs).
405The default is:
406.Bd -literal -offset indent
407ssh-ed25519,ecdsa-sha2-nistp256,
408ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
409sk-ssh-ed25519@openssh.com,
410sk-ecdsa-sha2-nistp256@openssh.com,
411rsa-sha2-512,rsa-sha2-256
412.Ed
413.Pp
414If the specified list begins with a
415.Sq +
416character, then the specified algorithms will be appended to the default set
417instead of replacing them.
418If the specified list begins with a
419.Sq -
420character, then the specified algorithms (including wildcards) will be removed
421from the default set instead of replacing them.
422.Pp
423.Xr ssh 1
424will not accept host certificates signed using algorithms other than those
425specified.
426.It Cm CertificateFile
427Specifies a file from which the user's certificate is read.
428A corresponding private key must be provided separately in order
429to use this certificate either
430from an
431.Cm IdentityFile
432directive or
433.Fl i
434flag to
435.Xr ssh 1 ,
436via
437.Xr ssh-agent 1 ,
438or via a
439.Cm PKCS11Provider
440or
441.Cm SecurityKeyProvider .
442.Pp
443Arguments to
444.Cm CertificateFile
445may use the tilde syntax to refer to a user's home directory,
446the tokens described in the
447.Sx TOKENS
448section and environment variables as described in the
449.Sx ENVIRONMENT VARIABLES
450section.
451.Pp
452It is possible to have multiple certificate files specified in
453configuration files; these certificates will be tried in sequence.
454Multiple
455.Cm CertificateFile
456directives will add to the list of certificates used for
457authentication.
458.It Cm ChannelTimeout
459Specifies whether and how quickly
460.Xr ssh 1
461should close inactive channels.
462Timeouts are specified as one or more
463.Dq type=interval
464pairs separated by whitespace, where the
465.Dq type
466must be a channel type name (as described in the table below), optionally
467containing wildcard characters.
468.Pp
469The timeout value
470.Dq interval
471is specified in seconds or may use any of the units documented in the
472.Sx TIME FORMATS
473section.
474For example,
475.Dq session=5m
476would cause the interactive session to terminate after five minutes of
477inactivity.
478Specifying a zero value disables the inactivity timeout.
479.Pp
480The available channel types include:
481.Bl -tag -width Ds
482.It Cm agent-connection
483Open connections to
484.Xr ssh-agent 1 .
485.It Cm direct-tcpip , Cm direct-streamlocal@openssh.com
486Open TCP or Unix socket (respectively) connections that have
487been established from a
488.Xr ssh 1
489local forwarding, i.e.\&
490.Cm LocalForward
491or
492.Cm DynamicForward .
493.It Cm forwarded-tcpip , Cm forwarded-streamlocal@openssh.com
494Open TCP or Unix socket (respectively) connections that have been
495established to a
496.Xr sshd 8
497listening on behalf of a
498.Xr ssh 1
499remote forwarding, i.e.\&
500.Cm RemoteForward .
501.It Cm session
502The interactive main session, including shell session, command execution,
503.Xr scp 1 ,
504.Xr sftp 1 ,
505etc.
506.It Cm tun-connection
507Open
508.Cm TunnelForward
509connections.
510.It Cm x11-connection
511Open X11 forwarding sessions.
512.El
513.Pp
514Note that in all the above cases, terminating an inactive session does not
515guarantee to remove all resources associated with the session, e.g. shell
516processes or X11 clients relating to the session may continue to execute.
517.Pp
518Moreover, terminating an inactive channel or session does not necessarily
519close the SSH connection, nor does it prevent a client from
520requesting another channel of the same type.
521In particular, expiring an inactive forwarding session does not prevent
522another identical forwarding from being subsequently created.
523.Pp
524The default is not to expire channels of any type for inactivity.
525.It Cm CheckHostIP
526If set to
527.Cm yes ,
528.Xr ssh 1
529will additionally check the host IP address in the
530.Pa known_hosts
531file.
532This allows it to detect if a host key changed due to DNS spoofing
533and will add addresses of destination hosts to
534.Pa ~/.ssh/known_hosts
535in the process, regardless of the setting of
536.Cm StrictHostKeyChecking .
537If the option is set to
538.Cm no
539(the default),
540the check will not be executed.
541.It Cm Ciphers
542Specifies the ciphers allowed and their order of preference.
543Multiple ciphers must be comma-separated.
544If the specified list begins with a
545.Sq +
546character, then the specified ciphers will be appended to the default set
547instead of replacing them.
548If the specified list begins with a
549.Sq -
550character, then the specified ciphers (including wildcards) will be removed
551from the default set instead of replacing them.
552If the specified list begins with a
553.Sq ^
554character, then the specified ciphers will be placed at the head of the
555default set.
556.Pp
557The supported ciphers are:
558.Bd -literal -offset indent
5593des-cbc
560aes128-cbc
561aes192-cbc
562aes256-cbc
563aes128-ctr
564aes192-ctr
565aes256-ctr
566aes128-gcm@openssh.com
567aes256-gcm@openssh.com
568chacha20-poly1305@openssh.com
569.Ed
570.Pp
571The default is:
572.Bd -literal -offset indent
573chacha20-poly1305@openssh.com,
574aes128-ctr,aes192-ctr,aes256-ctr,
575aes128-gcm@openssh.com,aes256-gcm@openssh.com
576.Ed
577.Pp
578The list of available ciphers may also be obtained using
579.Qq ssh -Q cipher .
580.It Cm ClearAllForwardings
581Specifies that all local, remote, and dynamic port forwardings
582specified in the configuration files or on the command line be
583cleared.
584This option is primarily useful when used from the
585.Xr ssh 1
586command line to clear port forwardings set in
587configuration files, and is automatically set by
588.Xr scp 1
589and
590.Xr sftp 1 .
591The argument must be
592.Cm yes
593or
594.Cm no
595(the default).
596.It Cm Compression
597Specifies whether to use compression.
598The argument must be
599.Cm yes
600or
601.Cm no
602(the default).
603.It Cm ConnectionAttempts
604Specifies the number of tries (one per second) to make before exiting.
605The argument must be an integer.
606This may be useful in scripts if the connection sometimes fails.
607The default is 1.
608.It Cm ConnectTimeout
609Specifies the timeout (in seconds) used when connecting to the
610SSH server, instead of using the default system TCP timeout.
611This timeout is applied both to establishing the connection and to performing
612the initial SSH protocol handshake and key exchange.
613.It Cm ControlMaster
614Enables the sharing of multiple sessions over a single network connection.
615When set to
616.Cm yes ,
617.Xr ssh 1
618will listen for connections on a control socket specified using the
619.Cm ControlPath
620argument.
621Additional sessions can connect to this socket using the same
622.Cm ControlPath
623with
624.Cm ControlMaster
625set to
626.Cm no
627(the default).
628These sessions will try to reuse the master instance's network connection
629rather than initiating new ones, but will fall back to connecting normally
630if the control socket does not exist, or is not listening.
631.Pp
632Setting this to
633.Cm ask
634will cause
635.Xr ssh 1
636to listen for control connections, but require confirmation using
637.Xr ssh-askpass 1 .
638If the
639.Cm ControlPath
640cannot be opened,
641.Xr ssh 1
642will continue without connecting to a master instance.
643.Pp
644X11 and
645.Xr ssh-agent 1
646forwarding is supported over these multiplexed connections, however the
647display and agent forwarded will be the one belonging to the master
648connection i.e. it is not possible to forward multiple displays or agents.
649.Pp
650Two additional options allow for opportunistic multiplexing: try to use a
651master connection but fall back to creating a new one if one does not already
652exist.
653These options are:
654.Cm auto
655and
656.Cm autoask .
657The latter requires confirmation like the
658.Cm ask
659option.
660.It Cm ControlPath
661Specify the path to the control socket used for connection sharing as described
662in the
663.Cm ControlMaster
664section above or the string
665.Cm none
666to disable connection sharing.
667Arguments to
668.Cm ControlPath
669may use the tilde syntax to refer to a user's home directory,
670the tokens described in the
671.Sx TOKENS
672section and environment variables as described in the
673.Sx ENVIRONMENT VARIABLES
674section.
675It is recommended that any
676.Cm ControlPath
677used for opportunistic connection sharing include
678at least %h, %p, and %r (or alternatively %C) and be placed in a directory
679that is not writable by other users.
680This ensures that shared connections are uniquely identified.
681.It Cm ControlPersist
682When used in conjunction with
683.Cm ControlMaster ,
684specifies that the master connection should remain open
685in the background (waiting for future client connections)
686after the initial client connection has been closed.
687If set to
688.Cm no
689(the default),
690then the master connection will not be placed into the background,
691and will close as soon as the initial client connection is closed.
692If set to
693.Cm yes
694or 0,
695then the master connection will remain in the background indefinitely
696(until killed or closed via a mechanism such as the
697.Qq ssh -O exit ) .
698If set to a time in seconds, or a time in any of the formats documented in
699.Xr sshd_config 5 ,
700then the backgrounded master connection will automatically terminate
701after it has remained idle (with no client connections) for the
702specified time.
703.It Cm DynamicForward
704Specifies that a TCP port on the local machine be forwarded
705over the secure channel, and the application
706protocol is then used to determine where to connect to from the
707remote machine.
708.Pp
709The argument must be
710.Sm off
711.Oo Ar bind_address : Oc Ar port .
712.Sm on
713IPv6 addresses can be specified by enclosing addresses in square brackets.
714By default, the local port is bound in accordance with the
715.Cm GatewayPorts
716setting.
717However, an explicit
718.Ar bind_address
719may be used to bind the connection to a specific address.
720The
721.Ar bind_address
722of
723.Cm localhost
724indicates that the listening port be bound for local use only, while an
725empty address or
726.Sq *
727indicates that the port should be available from all interfaces.
728.Pp
729Currently the SOCKS4 and SOCKS5 protocols are supported, and
730.Xr ssh 1
731will act as a SOCKS server.
732Multiple forwardings may be specified, and
733additional forwardings can be given on the command line.
734Only the superuser can forward privileged ports.
735.It Cm EnableEscapeCommandline
736Enables the command line option in the
737.Cm EscapeChar
738menu for interactive sessions (default
739.Ql ~C ) .
740By default, the command line is disabled.
741.It Cm EnableSSHKeysign
742Setting this option to
743.Cm yes
744in the global client configuration file
745.Pa /etc/ssh/ssh_config
746enables the use of the helper program
747.Xr ssh-keysign 8
748during
749.Cm HostbasedAuthentication .
750The argument must be
751.Cm yes
752or
753.Cm no
754(the default).
755This option should be placed in the non-hostspecific section.
756See
757.Xr ssh-keysign 8
758for more information.
759.It Cm EscapeChar
760Sets the escape character (default:
761.Ql ~ ) .
762The escape character can also
763be set on the command line.
764The argument should be a single character,
765.Ql ^
766followed by a letter, or
767.Cm none
768to disable the escape
769character entirely (making the connection transparent for binary
770data).
771.It Cm ExitOnForwardFailure
772Specifies whether
773.Xr ssh 1
774should terminate the connection if it cannot set up all requested
775dynamic, tunnel, local, and remote port forwardings, (e.g.\&
776if either end is unable to bind and listen on a specified port).
777Note that
778.Cm ExitOnForwardFailure
779does not apply to connections made over port forwardings and will not,
780for example, cause
781.Xr ssh 1
782to exit if TCP connections to the ultimate forwarding destination fail.
783The argument must be
784.Cm yes
785or
786.Cm no
787(the default).
788.It Cm FingerprintHash
789Specifies the hash algorithm used when displaying key fingerprints.
790Valid options are:
791.Cm md5
792and
793.Cm sha256
794(the default).
795.It Cm ForkAfterAuthentication
796Requests
797.Nm ssh
798to go to background just before command execution.
799This is useful if
800.Nm ssh
801is going to ask for passwords or passphrases, but the user
802wants it in the background.
803This implies the
804.Cm StdinNull
805configuration option being set to
806.Dq yes .
807The recommended way to start X11 programs at a remote site is with
808something like
809.Ic ssh -f host xterm ,
810which is the same as
811.Ic ssh host xterm
812if the
813.Cm ForkAfterAuthentication
814configuration option is set to
815.Dq yes .
816.Pp
817If the
818.Cm ExitOnForwardFailure
819configuration option is set to
820.Dq yes ,
821then a client started with the
822.Cm ForkAfterAuthentication
823configuration option being set to
824.Dq yes
825will wait for all remote port forwards to be successfully established
826before placing itself in the background.
827The argument to this keyword must be
828.Cm yes
829(same as the
830.Fl f
831option) or
832.Cm no
833(the default).
834.It Cm ForwardAgent
835Specifies whether the connection to the authentication agent (if any)
836will be forwarded to the remote machine.
837The argument may be
838.Cm yes ,
839.Cm no
840(the default),
841an explicit path to an agent socket or the name of an environment variable
842(beginning with
843.Sq $ )
844in which to find the path.
845.Pp
846Agent forwarding should be enabled with caution.
847Users with the ability to bypass file permissions on the remote host
848(for the agent's Unix-domain socket)
849can access the local agent through the forwarded connection.
850An attacker cannot obtain key material from the agent,
851however they can perform operations on the keys that enable them to
852authenticate using the identities loaded into the agent.
853.It Cm ForwardX11
854Specifies whether X11 connections will be automatically redirected
855over the secure channel and
856.Ev DISPLAY
857set.
858The argument must be
859.Cm yes
860or
861.Cm no
862(the default).
863.Pp
864X11 forwarding should be enabled with caution.
865Users with the ability to bypass file permissions on the remote host
866(for the user's X11 authorization database)
867can access the local X11 display through the forwarded connection.
868An attacker may then be able to perform activities such as keystroke monitoring
869if the
870.Cm ForwardX11Trusted
871option is also enabled.
872.It Cm ForwardX11Timeout
873Specify a timeout for untrusted X11 forwarding
874using the format described in the
875.Sx TIME FORMATS
876section of
877.Xr sshd_config 5 .
878X11 connections received by
879.Xr ssh 1
880after this time will be refused.
881Setting
882.Cm ForwardX11Timeout
883to zero will disable the timeout and permit X11 forwarding for the life
884of the connection.
885The default is to disable untrusted X11 forwarding after twenty minutes has
886elapsed.
887.It Cm ForwardX11Trusted
888If this option is set to
889.Cm yes ,
890remote X11 clients will have full access to the original X11 display.
891.Pp
892If this option is set to
893.Cm no
894(the default),
895remote X11 clients will be considered untrusted and prevented
896from stealing or tampering with data belonging to trusted X11
897clients.
898Furthermore, the
899.Xr xauth 1
900token used for the session will be set to expire after 20 minutes.
901Remote clients will be refused access after this time.
902.Pp
903See the X11 SECURITY extension specification for full details on
904the restrictions imposed on untrusted clients.
905.It Cm GatewayPorts
906Specifies whether remote hosts are allowed to connect to local
907forwarded ports.
908By default,
909.Xr ssh 1
910binds local port forwardings to the loopback address.
911This prevents other remote hosts from connecting to forwarded ports.
912.Cm GatewayPorts
913can be used to specify that ssh
914should bind local port forwardings to the wildcard address,
915thus allowing remote hosts to connect to forwarded ports.
916The argument must be
917.Cm yes
918or
919.Cm no
920(the default).
921.It Cm GlobalKnownHostsFile
922Specifies one or more files to use for the global
923host key database, separated by whitespace.
924The default is
925.Pa /etc/ssh/ssh_known_hosts ,
926.Pa /etc/ssh/ssh_known_hosts2 .
927.It Cm GSSAPIAuthentication
928Specifies whether user authentication based on GSSAPI is allowed.
929The default is
930.Cm no .
931.It Cm GSSAPIDelegateCredentials
932Forward (delegate) credentials to the server.
933The default is
934.Cm no .
935.It Cm HashKnownHosts
936Indicates that
937.Xr ssh 1
938should hash host names and addresses when they are added to
939.Pa ~/.ssh/known_hosts .
940These hashed names may be used normally by
941.Xr ssh 1
942and
943.Xr sshd 8 ,
944but they do not visually reveal identifying information if the
945file's contents are disclosed.
946The default is
947.Cm no .
948Note that existing names and addresses in known hosts files
949will not be converted automatically,
950but may be manually hashed using
951.Xr ssh-keygen 1 .
952.It Cm HostbasedAcceptedAlgorithms
953Specifies the signature algorithms that will be used for hostbased
954authentication as a comma-separated list of patterns.
955Alternately if the specified list begins with a
956.Sq +
957character, then the specified signature algorithms will be appended
958to the default set instead of replacing them.
959If the specified list begins with a
960.Sq -
961character, then the specified signature algorithms (including wildcards)
962will be removed from the default set instead of replacing them.
963If the specified list begins with a
964.Sq ^
965character, then the specified signature algorithms will be placed
966at the head of the default set.
967The default for this option is:
968.Bd -literal -offset 3n
969ssh-ed25519-cert-v01@openssh.com,
970ecdsa-sha2-nistp256-cert-v01@openssh.com,
971ecdsa-sha2-nistp384-cert-v01@openssh.com,
972ecdsa-sha2-nistp521-cert-v01@openssh.com,
973sk-ssh-ed25519-cert-v01@openssh.com,
974sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,
975rsa-sha2-512-cert-v01@openssh.com,
976rsa-sha2-256-cert-v01@openssh.com,
977ssh-ed25519,
978ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
979sk-ssh-ed25519@openssh.com,
980sk-ecdsa-sha2-nistp256@openssh.com,
981rsa-sha2-512,rsa-sha2-256
982.Ed
983.Pp
984The
985.Fl Q
986option of
987.Xr ssh 1
988may be used to list supported signature algorithms.
989This was formerly named HostbasedKeyTypes.
990.It Cm HostbasedAuthentication
991Specifies whether to try rhosts based authentication with public key
992authentication.
993The argument must be
994.Cm yes
995or
996.Cm no
997(the default).
998.It Cm HostKeyAlgorithms
999Specifies the host key signature algorithms
1000that the client wants to use in order of preference.
1001Alternately if the specified list begins with a
1002.Sq +
1003character, then the specified signature algorithms will be appended to
1004the default set instead of replacing them.
1005If the specified list begins with a
1006.Sq -
1007character, then the specified signature algorithms (including wildcards)
1008will be removed from the default set instead of replacing them.
1009If the specified list begins with a
1010.Sq ^
1011character, then the specified signature algorithms will be placed
1012at the head of the default set.
1013The default for this option is:
1014.Bd -literal -offset 3n
1015ssh-ed25519-cert-v01@openssh.com,
1016ecdsa-sha2-nistp256-cert-v01@openssh.com,
1017ecdsa-sha2-nistp384-cert-v01@openssh.com,
1018ecdsa-sha2-nistp521-cert-v01@openssh.com,
1019sk-ssh-ed25519-cert-v01@openssh.com,
1020sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,
1021rsa-sha2-512-cert-v01@openssh.com,
1022rsa-sha2-256-cert-v01@openssh.com,
1023ssh-ed25519,
1024ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
1025sk-ecdsa-sha2-nistp256@openssh.com,
1026sk-ssh-ed25519@openssh.com,
1027rsa-sha2-512,rsa-sha2-256
1028.Ed
1029.Pp
1030If hostkeys are known for the destination host then this default is modified
1031to prefer their algorithms.
1032.Pp
1033The list of available signature algorithms may also be obtained using
1034.Qq ssh -Q HostKeyAlgorithms .
1035.It Cm HostKeyAlias
1036Specifies an alias that should be used instead of the
1037real host name when looking up or saving the host key
1038in the host key database files and when validating host certificates.
1039This option is useful for tunneling SSH connections
1040or for multiple servers running on a single host.
1041.It Cm Hostname
1042Specifies the real host name to log into.
1043This can be used to specify nicknames or abbreviations for hosts.
1044Arguments to
1045.Cm Hostname
1046accept the tokens described in the
1047.Sx TOKENS
1048section.
1049Numeric IP addresses are also permitted (both on the command line and in
1050.Cm Hostname
1051specifications).
1052The default is the name given on the command line.
1053.It Cm IdentitiesOnly
1054Specifies that
1055.Xr ssh 1
1056should only use the configured authentication identity and certificate files
1057(either the default files, or those explicitly configured in the
1058.Nm
1059files
1060or passed on the
1061.Xr ssh 1
1062command-line),
1063even if
1064.Xr ssh-agent 1
1065or a
1066.Cm PKCS11Provider
1067or
1068.Cm SecurityKeyProvider
1069offers more identities.
1070The argument to this keyword must be
1071.Cm yes
1072or
1073.Cm no
1074(the default).
1075This option is intended for situations where ssh-agent
1076offers many different identities.
1077.It Cm IdentityAgent
1078Specifies the
1079.Ux Ns -domain
1080socket used to communicate with the authentication agent.
1081.Pp
1082This option overrides the
1083.Ev SSH_AUTH_SOCK
1084environment variable and can be used to select a specific agent.
1085Setting the socket name to
1086.Cm none
1087disables the use of an authentication agent.
1088If the string
1089.Qq SSH_AUTH_SOCK
1090is specified, the location of the socket will be read from the
1091.Ev SSH_AUTH_SOCK
1092environment variable.
1093Otherwise if the specified value begins with a
1094.Sq $
1095character, then it will be treated as an environment variable containing
1096the location of the socket.
1097.Pp
1098Arguments to
1099.Cm IdentityAgent
1100may use the tilde syntax to refer to a user's home directory,
1101the tokens described in the
1102.Sx TOKENS
1103section and environment variables as described in the
1104.Sx ENVIRONMENT VARIABLES
1105section.
1106.It Cm IdentityFile
1107Specifies a file from which the user's DSA, ECDSA, authenticator-hosted ECDSA,
1108Ed25519, authenticator-hosted Ed25519 or RSA authentication identity is read.
1109You can also specify a public key file to use the corresponding
1110private key that is loaded in
1111.Xr ssh-agent 1
1112when the private key file is not present locally.
1113The default is
1114.Pa ~/.ssh/id_rsa ,
1115.Pa ~/.ssh/id_ecdsa ,
1116.Pa ~/.ssh/id_ecdsa_sk ,
1117.Pa ~/.ssh/id_ed25519 ,
1118.Pa ~/.ssh/id_ed25519_sk
1119and
1120.Pa ~/.ssh/id_dsa .
1121Additionally, any identities represented by the authentication agent
1122will be used for authentication unless
1123.Cm IdentitiesOnly
1124is set.
1125If no certificates have been explicitly specified by
1126.Cm CertificateFile ,
1127.Xr ssh 1
1128will try to load certificate information from the filename obtained by
1129appending
1130.Pa -cert.pub
1131to the path of a specified
1132.Cm IdentityFile .
1133.Pp
1134Arguments to
1135.Cm IdentityFile
1136may use the tilde syntax to refer to a user's home directory
1137or the tokens described in the
1138.Sx TOKENS
1139section.
1140Alternately an argument of
1141.Cm none
1142may be used to indicate no identity files should be loaded.
1143.Pp
1144It is possible to have
1145multiple identity files specified in configuration files; all these
1146identities will be tried in sequence.
1147Multiple
1148.Cm IdentityFile
1149directives will add to the list of identities tried (this behaviour
1150differs from that of other configuration directives).
1151.Pp
1152.Cm IdentityFile
1153may be used in conjunction with
1154.Cm IdentitiesOnly
1155to select which identities in an agent are offered during authentication.
1156.Cm IdentityFile
1157may also be used in conjunction with
1158.Cm CertificateFile
1159in order to provide any certificate also needed for authentication with
1160the identity.
1161.It Cm IgnoreUnknown
1162Specifies a pattern-list of unknown options to be ignored if they are
1163encountered in configuration parsing.
1164This may be used to suppress errors if
1165.Nm
1166contains options that are unrecognised by
1167.Xr ssh 1 .
1168It is recommended that
1169.Cm IgnoreUnknown
1170be listed early in the configuration file as it will not be applied
1171to unknown options that appear before it.
1172.It Cm Include
1173Include the specified configuration file(s).
1174Multiple pathnames may be specified and each pathname may contain
1175.Xr glob 7
1176wildcards and, for user configurations, shell-like
1177.Sq ~
1178references to user home directories.
1179Wildcards will be expanded and processed in lexical order.
1180Files without absolute paths are assumed to be in
1181.Pa ~/.ssh
1182if included in a user configuration file or
1183.Pa /etc/ssh
1184if included from the system configuration file.
1185.Cm Include
1186directive may appear inside a
1187.Cm Match
1188or
1189.Cm Host
1190block
1191to perform conditional inclusion.
1192.It Cm IPQoS
1193Specifies the IPv4 type-of-service or DSCP class for connections.
1194Accepted values are
1195.Cm af11 ,
1196.Cm af12 ,
1197.Cm af13 ,
1198.Cm af21 ,
1199.Cm af22 ,
1200.Cm af23 ,
1201.Cm af31 ,
1202.Cm af32 ,
1203.Cm af33 ,
1204.Cm af41 ,
1205.Cm af42 ,
1206.Cm af43 ,
1207.Cm cs0 ,
1208.Cm cs1 ,
1209.Cm cs2 ,
1210.Cm cs3 ,
1211.Cm cs4 ,
1212.Cm cs5 ,
1213.Cm cs6 ,
1214.Cm cs7 ,
1215.Cm ef ,
1216.Cm le ,
1217.Cm lowdelay ,
1218.Cm throughput ,
1219.Cm reliability ,
1220a numeric value, or
1221.Cm none
1222to use the operating system default.
1223This option may take one or two arguments, separated by whitespace.
1224If one argument is specified, it is used as the packet class unconditionally.
1225If two values are specified, the first is automatically selected for
1226interactive sessions and the second for non-interactive sessions.
1227The default is
1228.Cm af21
1229(Low-Latency Data)
1230for interactive sessions and
1231.Cm cs1
1232(Lower Effort)
1233for non-interactive sessions.
1234.It Cm KbdInteractiveAuthentication
1235Specifies whether to use keyboard-interactive authentication.
1236The argument to this keyword must be
1237.Cm yes
1238(the default)
1239or
1240.Cm no .
1241.Cm ChallengeResponseAuthentication
1242is a deprecated alias for this.
1243.It Cm KbdInteractiveDevices
1244Specifies the list of methods to use in keyboard-interactive authentication.
1245Multiple method names must be comma-separated.
1246The default is to use the server specified list.
1247The methods available vary depending on what the server supports.
1248For an OpenSSH server,
1249it may be zero or more of:
1250.Cm bsdauth ,
1251.Cm pam ,
1252and
1253.Cm skey .
1254.It Cm KexAlgorithms
1255Specifies the available KEX (Key Exchange) algorithms.
1256Multiple algorithms must be comma-separated.
1257If the specified list begins with a
1258.Sq +
1259character, then the specified algorithms will be appended to the default set
1260instead of replacing them.
1261If the specified list begins with a
1262.Sq -
1263character, then the specified algorithms (including wildcards) will be removed
1264from the default set instead of replacing them.
1265If the specified list begins with a
1266.Sq ^
1267character, then the specified algorithms will be placed at the head of the
1268default set.
1269The default is:
1270.Bd -literal -offset indent
1271sntrup761x25519-sha512@openssh.com,
1272curve25519-sha256,curve25519-sha256@libssh.org,
1273ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
1274diffie-hellman-group-exchange-sha256,
1275diffie-hellman-group16-sha512,
1276diffie-hellman-group18-sha512,
1277diffie-hellman-group14-sha256
1278.Ed
1279.Pp
1280The list of available key exchange algorithms may also be obtained using
1281.Qq ssh -Q kex .
1282.It Cm KnownHostsCommand
1283Specifies a command to use to obtain a list of host keys, in addition to
1284those listed in
1285.Cm UserKnownHostsFile
1286and
1287.Cm GlobalKnownHostsFile .
1288This command is executed after the files have been read.
1289It may write host key lines to standard output in identical format to the
1290usual files (described in the
1291.Sx VERIFYING HOST KEYS
1292section in
1293.Xr ssh 1 ) .
1294Arguments to
1295.Cm KnownHostsCommand
1296accept the tokens described in the
1297.Sx TOKENS
1298section.
1299The command may be invoked multiple times per connection: once when preparing
1300the preference list of host key algorithms to use, again to obtain the
1301host key for the requested host name and, if
1302.Cm CheckHostIP
1303is enabled, one more time to obtain the host key matching the server's
1304address.
1305If the command exits abnormally or returns a non-zero exit status then the
1306connection is terminated.
1307.It Cm LocalCommand
1308Specifies a command to execute on the local machine after successfully
1309connecting to the server.
1310The command string extends to the end of the line, and is executed with
1311the user's shell.
1312Arguments to
1313.Cm LocalCommand
1314accept the tokens described in the
1315.Sx TOKENS
1316section.
1317.Pp
1318The command is run synchronously and does not have access to the
1319session of the
1320.Xr ssh 1
1321that spawned it.
1322It should not be used for interactive commands.
1323.Pp
1324This directive is ignored unless
1325.Cm PermitLocalCommand
1326has been enabled.
1327.It Cm LocalForward
1328Specifies that a TCP port on the local machine be forwarded over
1329the secure channel to the specified host and port from the remote machine.
1330The first argument specifies the listener and may be
1331.Sm off
1332.Oo Ar bind_address : Oc Ar port
1333.Sm on
1334or a Unix domain socket path.
1335The second argument is the destination and may be
1336.Ar host : Ns Ar hostport
1337or a Unix domain socket path if the remote host supports it.
1338.Pp
1339IPv6 addresses can be specified by enclosing addresses in square brackets.
1340Multiple forwardings may be specified, and additional forwardings can be
1341given on the command line.
1342Only the superuser can forward privileged ports.
1343By default, the local port is bound in accordance with the
1344.Cm GatewayPorts
1345setting.
1346However, an explicit
1347.Ar bind_address
1348may be used to bind the connection to a specific address.
1349The
1350.Ar bind_address
1351of
1352.Cm localhost
1353indicates that the listening port be bound for local use only, while an
1354empty address or
1355.Sq *
1356indicates that the port should be available from all interfaces.
1357Unix domain socket paths may use the tokens described in the
1358.Sx TOKENS
1359section and environment variables as described in the
1360.Sx ENVIRONMENT VARIABLES
1361section.
1362.It Cm LogLevel
1363Gives the verbosity level that is used when logging messages from
1364.Xr ssh 1 .
1365The possible values are:
1366QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3.
1367The default is INFO.
1368DEBUG and DEBUG1 are equivalent.
1369DEBUG2 and DEBUG3 each specify higher levels of verbose output.
1370.It Cm LogVerbose
1371Specify one or more overrides to LogLevel.
1372An override consists of a pattern lists that matches the source file, function
1373and line number to force detailed logging for.
1374For example, an override pattern of:
1375.Bd -literal -offset indent
1376kex.c:*:1000,*:kex_exchange_identification():*,packet.c:*
1377.Ed
1378.Pp
1379would enable detailed logging for line 1000 of
1380.Pa kex.c ,
1381everything in the
1382.Fn kex_exchange_identification
1383function, and all code in the
1384.Pa packet.c
1385file.
1386This option is intended for debugging and no overrides are enabled by default.
1387.It Cm MACs
1388Specifies the MAC (message authentication code) algorithms
1389in order of preference.
1390The MAC algorithm is used for data integrity protection.
1391Multiple algorithms must be comma-separated.
1392If the specified list begins with a
1393.Sq +
1394character, then the specified algorithms will be appended to the default set
1395instead of replacing them.
1396If the specified list begins with a
1397.Sq -
1398character, then the specified algorithms (including wildcards) will be removed
1399from the default set instead of replacing them.
1400If the specified list begins with a
1401.Sq ^
1402character, then the specified algorithms will be placed at the head of the
1403default set.
1404.Pp
1405The algorithms that contain
1406.Qq -etm
1407calculate the MAC after encryption (encrypt-then-mac).
1408These are considered safer and their use recommended.
1409.Pp
1410The default is:
1411.Bd -literal -offset indent
1412umac-64-etm@openssh.com,umac-128-etm@openssh.com,
1413hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
1414hmac-sha1-etm@openssh.com,
1415umac-64@openssh.com,umac-128@openssh.com,
1416hmac-sha2-256,hmac-sha2-512,hmac-sha1
1417.Ed
1418.Pp
1419The list of available MAC algorithms may also be obtained using
1420.Qq ssh -Q mac .
1421.It Cm NoHostAuthenticationForLocalhost
1422Disable host authentication for localhost (loopback addresses).
1423The argument to this keyword must be
1424.Cm yes
1425or
1426.Cm no
1427(the default).
1428.It Cm NumberOfPasswordPrompts
1429Specifies the number of password prompts before giving up.
1430The argument to this keyword must be an integer.
1431The default is 3.
1432.It Cm ObscureKeystrokeTiming
1433Specifies whether
1434.Xr ssh 1
1435should try to obscure inter-keystroke timings from passive observers of
1436network traffic.
1437If enabled, then for interactive sessions,
1438.Xr ssh 1
1439will send keystrokes at fixed intervals of a few tens of milliseconds
1440and will send fake keystroke packets for some time after typing ceases.
1441The argument to this keyword must be
1442.Cm yes ,
1443.Cm no
1444or an interval specifier of the form
1445.Cm interval:milliseconds
1446(e.g.\&
1447.Cm interval:80
1448for 80 milliseconds).
1449The default is to obscure keystrokes using a 20ms packet interval.
1450Note that smaller intervals will result in higher fake keystroke packet rates.
1451.It Cm PasswordAuthentication
1452Specifies whether to use password authentication.
1453The argument to this keyword must be
1454.Cm yes
1455(the default)
1456or
1457.Cm no .
1458.It Cm PermitLocalCommand
1459Allow local command execution via the
1460.Ic LocalCommand
1461option or using the
1462.Ic !\& Ns Ar command
1463escape sequence in
1464.Xr ssh 1 .
1465The argument must be
1466.Cm yes
1467or
1468.Cm no
1469(the default).
1470.It Cm PermitRemoteOpen
1471Specifies the destinations to which remote TCP port forwarding is permitted when
1472.Cm RemoteForward
1473is used as a SOCKS proxy.
1474The forwarding specification must be one of the following forms:
1475.Pp
1476.Bl -item -offset indent -compact
1477.It
1478.Cm PermitRemoteOpen
1479.Sm off
1480.Ar host : port
1481.Sm on
1482.It
1483.Cm PermitRemoteOpen
1484.Sm off
1485.Ar IPv4_addr : port
1486.Sm on
1487.It
1488.Cm PermitRemoteOpen
1489.Sm off
1490.Ar \&[ IPv6_addr \&] : port
1491.Sm on
1492.El
1493.Pp
1494Multiple forwards may be specified by separating them with whitespace.
1495An argument of
1496.Cm any
1497can be used to remove all restrictions and permit any forwarding requests.
1498An argument of
1499.Cm none
1500can be used to prohibit all forwarding requests.
1501The wildcard
1502.Sq *
1503can be used for host or port to allow all hosts or ports respectively.
1504Otherwise, no pattern matching or address lookups are performed on supplied
1505names.
1506.It Cm PKCS11Provider
1507Specifies which PKCS#11 provider to use or
1508.Cm none
1509to indicate that no provider should be used (the default).
1510The argument to this keyword is a path to the PKCS#11 shared library
1511.Xr ssh 1
1512should use to communicate with a PKCS#11 token providing keys for user
1513authentication.
1514.It Cm Port
1515Specifies the port number to connect on the remote host.
1516The default is 22.
1517.It Cm PreferredAuthentications
1518Specifies the order in which the client should try authentication methods.
1519This allows a client to prefer one method (e.g.\&
1520.Cm keyboard-interactive )
1521over another method (e.g.\&
1522.Cm password ) .
1523The default is:
1524.Bd -literal -offset indent
1525gssapi-with-mic,hostbased,publickey,
1526keyboard-interactive,password
1527.Ed
1528.It Cm ProxyCommand
1529Specifies the command to use to connect to the server.
1530The command
1531string extends to the end of the line, and is executed
1532using the user's shell
1533.Ql exec
1534directive to avoid a lingering shell process.
1535.Pp
1536Arguments to
1537.Cm ProxyCommand
1538accept the tokens described in the
1539.Sx TOKENS
1540section.
1541The command can be basically anything,
1542and should read from its standard input and write to its standard output.
1543It should eventually connect an
1544.Xr sshd 8
1545server running on some machine, or execute
1546.Ic sshd -i
1547somewhere.
1548Host key management will be done using the
1549.Cm Hostname
1550of the host being connected (defaulting to the name typed by the user).
1551Setting the command to
1552.Cm none
1553disables this option entirely.
1554Note that
1555.Cm CheckHostIP
1556is not available for connects with a proxy command.
1557.Pp
1558This directive is useful in conjunction with
1559.Xr nc 1
1560and its proxy support.
1561For example, the following directive would connect via an HTTP proxy at
1562192.0.2.0:
1563.Bd -literal -offset 3n
1564ProxyCommand /usr/bin/nc -X connect -x 192.0.2.0:8080 %h %p
1565.Ed
1566.It Cm ProxyJump
1567Specifies one or more jump proxies as either
1568.Xo
1569.Sm off
1570.Op Ar user No @
1571.Ar host
1572.Op : Ns Ar port
1573.Sm on
1574or an ssh URI
1575.Xc .
1576Multiple proxies may be separated by comma characters and will be visited
1577sequentially.
1578Setting this option will cause
1579.Xr ssh 1
1580to connect to the target host by first making a
1581.Xr ssh 1
1582connection to the specified
1583.Cm ProxyJump
1584host and then establishing a
1585TCP forwarding to the ultimate target from there.
1586Setting the host to
1587.Cm none
1588disables this option entirely.
1589.Pp
1590Note that this option will compete with the
1591.Cm ProxyCommand
1592option - whichever is specified first will prevent later instances of the
1593other from taking effect.
1594.Pp
1595Note also that the configuration for the destination host (either supplied
1596via the command-line or the configuration file) is not generally applied
1597to jump hosts.
1598.Pa ~/.ssh/config
1599should be used if specific configuration is required for jump hosts.
1600.It Cm ProxyUseFdpass
1601Specifies that
1602.Cm ProxyCommand
1603will pass a connected file descriptor back to
1604.Xr ssh 1
1605instead of continuing to execute and pass data.
1606The default is
1607.Cm no .
1608.It Cm PubkeyAcceptedAlgorithms
1609Specifies the signature algorithms that will be used for public key
1610authentication as a comma-separated list of patterns.
1611If the specified list begins with a
1612.Sq +
1613character, then the algorithms after it will be appended to the default
1614instead of replacing it.
1615If the specified list begins with a
1616.Sq -
1617character, then the specified algorithms (including wildcards) will be removed
1618from the default set instead of replacing them.
1619If the specified list begins with a
1620.Sq ^
1621character, then the specified algorithms will be placed at the head of the
1622default set.
1623The default for this option is:
1624.Bd -literal -offset 3n
1625ssh-ed25519-cert-v01@openssh.com,
1626ecdsa-sha2-nistp256-cert-v01@openssh.com,
1627ecdsa-sha2-nistp384-cert-v01@openssh.com,
1628ecdsa-sha2-nistp521-cert-v01@openssh.com,
1629sk-ssh-ed25519-cert-v01@openssh.com,
1630sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,
1631rsa-sha2-512-cert-v01@openssh.com,
1632rsa-sha2-256-cert-v01@openssh.com,
1633ssh-ed25519,
1634ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
1635sk-ssh-ed25519@openssh.com,
1636sk-ecdsa-sha2-nistp256@openssh.com,
1637rsa-sha2-512,rsa-sha2-256
1638.Ed
1639.Pp
1640The list of available signature algorithms may also be obtained using
1641.Qq ssh -Q PubkeyAcceptedAlgorithms .
1642.It Cm PubkeyAuthentication
1643Specifies whether to try public key authentication.
1644The argument to this keyword must be
1645.Cm yes
1646(the default),
1647.Cm no ,
1648.Cm unbound
1649or
1650.Cm host-bound .
1651The final two options enable public key authentication while respectively
1652disabling or enabling the OpenSSH host-bound authentication protocol
1653extension required for restricted
1654.Xr ssh-agent 1
1655forwarding.
1656.It Cm RekeyLimit
1657Specifies the maximum amount of data that may be transmitted or received
1658before the session key is renegotiated, optionally followed by a maximum
1659amount of time that may pass before the session key is renegotiated.
1660The first argument is specified in bytes and may have a suffix of
1661.Sq K ,
1662.Sq M ,
1663or
1664.Sq G
1665to indicate Kilobytes, Megabytes, or Gigabytes, respectively.
1666The default is between
1667.Sq 1G
1668and
1669.Sq 4G ,
1670depending on the cipher.
1671The optional second value is specified in seconds and may use any of the
1672units documented in the TIME FORMATS section of
1673.Xr sshd_config 5 .
1674The default value for
1675.Cm RekeyLimit
1676is
1677.Cm default none ,
1678which means that rekeying is performed after the cipher's default amount
1679of data has been sent or received and no time based rekeying is done.
1680.It Cm RemoteCommand
1681Specifies a command to execute on the remote machine after successfully
1682connecting to the server.
1683The command string extends to the end of the line, and is executed with
1684the user's shell.
1685Arguments to
1686.Cm RemoteCommand
1687accept the tokens described in the
1688.Sx TOKENS
1689section.
1690.It Cm RemoteForward
1691Specifies that a TCP port on the remote machine be forwarded over
1692the secure channel.
1693The remote port may either be forwarded to a specified host and port
1694from the local machine, or may act as a SOCKS 4/5 proxy that allows a remote
1695client to connect to arbitrary destinations from the local machine.
1696The first argument is the listening specification and may be
1697.Sm off
1698.Oo Ar bind_address : Oc Ar port
1699.Sm on
1700or, if the remote host supports it, a Unix domain socket path.
1701If forwarding to a specific destination then the second argument must be
1702.Ar host : Ns Ar hostport
1703or a Unix domain socket path,
1704otherwise if no destination argument is specified then the remote forwarding
1705will be established as a SOCKS proxy.
1706When acting as a SOCKS proxy, the destination of the connection can be
1707restricted by
1708.Cm PermitRemoteOpen .
1709.Pp
1710IPv6 addresses can be specified by enclosing addresses in square brackets.
1711Multiple forwardings may be specified, and additional
1712forwardings can be given on the command line.
1713Privileged ports can be forwarded only when
1714logging in as root on the remote machine.
1715Unix domain socket paths may use the tokens described in the
1716.Sx TOKENS
1717section and environment variables as described in the
1718.Sx ENVIRONMENT VARIABLES
1719section.
1720.Pp
1721If the
1722.Ar port
1723argument is 0,
1724the listen port will be dynamically allocated on the server and reported
1725to the client at run time.
1726.Pp
1727If the
1728.Ar bind_address
1729is not specified, the default is to only bind to loopback addresses.
1730If the
1731.Ar bind_address
1732is
1733.Ql *
1734or an empty string, then the forwarding is requested to listen on all
1735interfaces.
1736Specifying a remote
1737.Ar bind_address
1738will only succeed if the server's
1739.Cm GatewayPorts
1740option is enabled (see
1741.Xr sshd_config 5 ) .
1742.It Cm RequestTTY
1743Specifies whether to request a pseudo-tty for the session.
1744The argument may be one of:
1745.Cm no
1746(never request a TTY),
1747.Cm yes
1748(always request a TTY when standard input is a TTY),
1749.Cm force
1750(always request a TTY) or
1751.Cm auto
1752(request a TTY when opening a login session).
1753This option mirrors the
1754.Fl t
1755and
1756.Fl T
1757flags for
1758.Xr ssh 1 .
1759.It Cm RequiredRSASize
1760Specifies the minimum RSA key size (in bits) that
1761.Xr ssh 1
1762will accept.
1763User authentication keys smaller than this limit will be ignored.
1764Servers that present host keys smaller than this limit will cause the
1765connection to be terminated.
1766The default is
1767.Cm 1024
1768bits.
1769Note that this limit may only be raised from the default.
1770.It Cm RevokedHostKeys
1771Specifies revoked host public keys.
1772Keys listed in this file will be refused for host authentication.
1773Note that if this file does not exist or is not readable,
1774then host authentication will be refused for all hosts.
1775Keys may be specified as a text file, listing one public key per line, or as
1776an OpenSSH Key Revocation List (KRL) as generated by
1777.Xr ssh-keygen 1 .
1778For more information on KRLs, see the KEY REVOCATION LISTS section in
1779.Xr ssh-keygen 1 .
1780Arguments to
1781.Cm RevokedHostKeys
1782may use the tilde syntax to refer to a user's home directory,
1783the tokens described in the
1784.Sx TOKENS
1785section and environment variables as described in the
1786.Sx ENVIRONMENT VARIABLES
1787section.
1788.It Cm SecurityKeyProvider
1789Specifies a path to a library that will be used when loading any
1790FIDO authenticator-hosted keys, overriding the default of using
1791the built-in USB HID support.
1792.Pp
1793If the specified value begins with a
1794.Sq $
1795character, then it will be treated as an environment variable containing
1796the path to the library.
1797.It Cm SendEnv
1798Specifies what variables from the local
1799.Xr environ 7
1800should be sent to the server.
1801The server must also support it, and the server must be configured to
1802accept these environment variables.
1803Note that the
1804.Ev TERM
1805environment variable is always sent whenever a
1806pseudo-terminal is requested as it is required by the protocol.
1807Refer to
1808.Cm AcceptEnv
1809in
1810.Xr sshd_config 5
1811for how to configure the server.
1812Variables are specified by name, which may contain wildcard characters.
1813Multiple environment variables may be separated by whitespace or spread
1814across multiple
1815.Cm SendEnv
1816directives.
1817.Pp
1818See
1819.Sx PATTERNS
1820for more information on patterns.
1821.Pp
1822It is possible to clear previously set
1823.Cm SendEnv
1824variable names by prefixing patterns with
1825.Pa - .
1826The default is not to send any environment variables.
1827.It Cm ServerAliveCountMax
1828Sets the number of server alive messages (see below) which may be
1829sent without
1830.Xr ssh 1
1831receiving any messages back from the server.
1832If this threshold is reached while server alive messages are being sent,
1833ssh will disconnect from the server, terminating the session.
1834It is important to note that the use of server alive messages is very
1835different from
1836.Cm TCPKeepAlive
1837(below).
1838The server alive messages are sent through the encrypted channel
1839and therefore will not be spoofable.
1840The TCP keepalive option enabled by
1841.Cm TCPKeepAlive
1842is spoofable.
1843The server alive mechanism is valuable when the client or
1844server depend on knowing when a connection has become unresponsive.
1845.Pp
1846The default value is 3.
1847If, for example,
1848.Cm ServerAliveInterval
1849(see below) is set to 15 and
1850.Cm ServerAliveCountMax
1851is left at the default, if the server becomes unresponsive,
1852ssh will disconnect after approximately 45 seconds.
1853.It Cm ServerAliveInterval
1854Sets a timeout interval in seconds after which if no data has been received
1855from the server,
1856.Xr ssh 1
1857will send a message through the encrypted
1858channel to request a response from the server.
1859The default
1860is 0, indicating that these messages will not be sent to the server.
1861.It Cm SessionType
1862May be used to either request invocation of a subsystem on the remote system,
1863or to prevent the execution of a remote command at all.
1864The latter is useful for just forwarding ports.
1865The argument to this keyword must be
1866.Cm none
1867(same as the
1868.Fl N
1869option),
1870.Cm subsystem
1871(same as the
1872.Fl s
1873option) or
1874.Cm default
1875(shell or command execution).
1876.It Cm SetEnv
1877Directly specify one or more environment variables and their contents to
1878be sent to the server.
1879Similarly to
1880.Cm SendEnv ,
1881with the exception of the
1882.Ev TERM
1883variable, the server must be prepared to accept the environment variable.
1884.It Cm StdinNull
1885Redirects stdin from
1886.Pa /dev/null
1887(actually, prevents reading from stdin).
1888Either this or the equivalent
1889.Fl n
1890option must be used when
1891.Nm ssh
1892is run in the background.
1893The argument to this keyword must be
1894.Cm yes
1895(same as the
1896.Fl n
1897option) or
1898.Cm no
1899(the default).
1900.It Cm StreamLocalBindMask
1901Sets the octal file creation mode mask
1902.Pq umask
1903used when creating a Unix-domain socket file for local or remote
1904port forwarding.
1905This option is only used for port forwarding to a Unix-domain socket file.
1906.Pp
1907The default value is 0177, which creates a Unix-domain socket file that is
1908readable and writable only by the owner.
1909Note that not all operating systems honor the file mode on Unix-domain
1910socket files.
1911.It Cm StreamLocalBindUnlink
1912Specifies whether to remove an existing Unix-domain socket file for local
1913or remote port forwarding before creating a new one.
1914If the socket file already exists and
1915.Cm StreamLocalBindUnlink
1916is not enabled,
1917.Nm ssh
1918will be unable to forward the port to the Unix-domain socket file.
1919This option is only used for port forwarding to a Unix-domain socket file.
1920.Pp
1921The argument must be
1922.Cm yes
1923or
1924.Cm no
1925(the default).
1926.It Cm StrictHostKeyChecking
1927If this flag is set to
1928.Cm yes ,
1929.Xr ssh 1
1930will never automatically add host keys to the
1931.Pa ~/.ssh/known_hosts
1932file, and refuses to connect to hosts whose host key has changed.
1933This provides maximum protection against man-in-the-middle (MITM) attacks,
1934though it can be annoying when the
1935.Pa /etc/ssh/ssh_known_hosts
1936file is poorly maintained or when connections to new hosts are
1937frequently made.
1938This option forces the user to manually
1939add all new hosts.
1940.Pp
1941If this flag is set to
1942.Cm accept-new
1943then ssh will automatically add new host keys to the user's
1944.Pa known_hosts
1945file, but will not permit connections to hosts with
1946changed host keys.
1947If this flag is set to
1948.Cm no
1949or
1950.Cm off ,
1951ssh will automatically add new host keys to the user known hosts files
1952and allow connections to hosts with changed hostkeys to proceed,
1953subject to some restrictions.
1954If this flag is set to
1955.Cm ask
1956(the default),
1957new host keys
1958will be added to the user known host files only after the user
1959has confirmed that is what they really want to do, and
1960ssh will refuse to connect to hosts whose host key has changed.
1961The host keys of
1962known hosts will be verified automatically in all cases.
1963.It Cm SyslogFacility
1964Gives the facility code that is used when logging messages from
1965.Xr ssh 1 .
1966The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2,
1967LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
1968The default is USER.
1969.It Cm TCPKeepAlive
1970Specifies whether the system should send TCP keepalive messages to the
1971other side.
1972If they are sent, death of the connection or crash of one
1973of the machines will be properly noticed.
1974However, this means that
1975connections will die if the route is down temporarily, and some people
1976find it annoying.
1977.Pp
1978The default is
1979.Cm yes
1980(to send TCP keepalive messages), and the client will notice
1981if the network goes down or the remote host dies.
1982This is important in scripts, and many users want it too.
1983.Pp
1984To disable TCP keepalive messages, the value should be set to
1985.Cm no .
1986See also
1987.Cm ServerAliveInterval
1988for protocol-level keepalives.
1989.It Cm Tag
1990Specify a configuration tag name that may be later used by a
1991.Cm Match
1992directive to select a block of configuration.
1993.It Cm Tunnel
1994Request
1995.Xr tun 4
1996device forwarding between the client and the server.
1997The argument must be
1998.Cm yes ,
1999.Cm point-to-point
2000(layer 3),
2001.Cm ethernet
2002(layer 2),
2003or
2004.Cm no
2005(the default).
2006Specifying
2007.Cm yes
2008requests the default tunnel mode, which is
2009.Cm point-to-point .
2010.It Cm TunnelDevice
2011Specifies the
2012.Xr tun 4
2013devices to open on the client
2014.Pq Ar local_tun
2015and the server
2016.Pq Ar remote_tun .
2017.Pp
2018The argument must be
2019.Sm off
2020.Ar local_tun Op : Ar remote_tun .
2021.Sm on
2022The devices may be specified by numerical ID or the keyword
2023.Cm any ,
2024which uses the next available tunnel device.
2025If
2026.Ar remote_tun
2027is not specified, it defaults to
2028.Cm any .
2029The default is
2030.Cm any:any .
2031.It Cm UpdateHostKeys
2032Specifies whether
2033.Xr ssh 1
2034should accept notifications of additional hostkeys from the server sent
2035after authentication has completed and add them to
2036.Cm UserKnownHostsFile .
2037The argument must be
2038.Cm yes ,
2039.Cm no
2040or
2041.Cm ask .
2042This option allows learning alternate hostkeys for a server
2043and supports graceful key rotation by allowing a server to send replacement
2044public keys before old ones are removed.
2045.Pp
2046Additional hostkeys are only accepted if the key used to authenticate the
2047host was already trusted or explicitly accepted by the user, the host was
2048authenticated via
2049.Cm UserKnownHostsFile
2050(i.e. not
2051.Cm GlobalKnownHostsFile )
2052and the host was authenticated using a plain key and not a certificate.
2053.Pp
2054.Cm UpdateHostKeys
2055is enabled by default if the user has not overridden the default
2056.Cm UserKnownHostsFile
2057setting and has not enabled
2058.Cm VerifyHostKeyDNS ,
2059otherwise
2060.Cm UpdateHostKeys
2061will be set to
2062.Cm no .
2063.Pp
2064If
2065.Cm UpdateHostKeys
2066is set to
2067.Cm ask ,
2068then the user is asked to confirm the modifications to the known_hosts file.
2069Confirmation is currently incompatible with
2070.Cm ControlPersist ,
2071and will be disabled if it is enabled.
2072.Pp
2073Presently, only
2074.Xr sshd 8
2075from OpenSSH 6.8 and greater support the
2076.Qq hostkeys@openssh.com
2077protocol extension used to inform the client of all the server's hostkeys.
2078.It Cm User
2079Specifies the user to log in as.
2080This can be useful when a different user name is used on different machines.
2081This saves the trouble of
2082having to remember to give the user name on the command line.
2083.It Cm UserKnownHostsFile
2084Specifies one or more files to use for the user
2085host key database, separated by whitespace.
2086Each filename may use tilde notation to refer to the user's home directory,
2087the tokens described in the
2088.Sx TOKENS
2089section and environment variables as described in the
2090.Sx ENVIRONMENT VARIABLES
2091section.
2092A value of
2093.Cm none
2094causes
2095.Xr ssh 1
2096to ignore any user-specific known hosts files.
2097The default is
2098.Pa ~/.ssh/known_hosts ,
2099.Pa ~/.ssh/known_hosts2 .
2100.It Cm VerifyHostKeyDNS
2101Specifies whether to verify the remote key using DNS and SSHFP resource
2102records.
2103If this option is set to
2104.Cm yes ,
2105the client will implicitly trust keys that match a secure fingerprint
2106from DNS.
2107Insecure fingerprints will be handled as if this option was set to
2108.Cm ask .
2109If this option is set to
2110.Cm ask ,
2111information on fingerprint match will be displayed, but the user will still
2112need to confirm new host keys according to the
2113.Cm StrictHostKeyChecking
2114option.
2115The default is
2116.Cm no .
2117.Pp
2118See also
2119.Sx VERIFYING HOST KEYS
2120in
2121.Xr ssh 1 .
2122.It Cm VisualHostKey
2123If this flag is set to
2124.Cm yes ,
2125an ASCII art representation of the remote host key fingerprint is
2126printed in addition to the fingerprint string at login and
2127for unknown host keys.
2128If this flag is set to
2129.Cm no
2130(the default),
2131no fingerprint strings are printed at login and
2132only the fingerprint string will be printed for unknown host keys.
2133.It Cm XAuthLocation
2134Specifies the full pathname of the
2135.Xr xauth 1
2136program.
2137The default is
2138.Pa /usr/X11R6/bin/xauth .
2139.El
2140.Sh PATTERNS
2141A
2142.Em pattern
2143consists of zero or more non-whitespace characters,
2144.Sq *
2145(a wildcard that matches zero or more characters),
2146or
2147.Sq ?\&
2148(a wildcard that matches exactly one character).
2149For example, to specify a set of declarations for any host in the
2150.Qq .co.uk
2151set of domains,
2152the following pattern could be used:
2153.Pp
2154.Dl Host *.co.uk
2155.Pp
2156The following pattern
2157would match any host in the 192.168.0.[0-9] network range:
2158.Pp
2159.Dl Host 192.168.0.?
2160.Pp
2161A
2162.Em pattern-list
2163is a comma-separated list of patterns.
2164Patterns within pattern-lists may be negated
2165by preceding them with an exclamation mark
2166.Pq Sq !\& .
2167For example,
2168to allow a key to be used from anywhere within an organization
2169except from the
2170.Qq dialup
2171pool,
2172the following entry (in authorized_keys) could be used:
2173.Pp
2174.Dl from=\&"!*.dialup.example.com,*.example.com\&"
2175.Pp
2176Note that a negated match will never produce a positive result by itself.
2177For example, attempting to match
2178.Qq host3
2179against the following pattern-list will fail:
2180.Pp
2181.Dl from=\&"!host1,!host2\&"
2182.Pp
2183The solution here is to include a term that will yield a positive match,
2184such as a wildcard:
2185.Pp
2186.Dl from=\&"!host1,!host2,*\&"
2187.Sh TOKENS
2188Arguments to some keywords can make use of tokens,
2189which are expanded at runtime:
2190.Pp
2191.Bl -tag -width XXXX -offset indent -compact
2192.It %%
2193A literal
2194.Sq % .
2195.It \&%C
2196Hash of %l%h%p%r%j.
2197.It %d
2198Local user's home directory.
2199.It %f
2200The fingerprint of the server's host key.
2201.It %H
2202The
2203.Pa known_hosts
2204hostname or address that is being searched for.
2205.It %h
2206The remote hostname.
2207.It \%%I
2208A string describing the reason for a
2209.Cm KnownHostsCommand
2210execution: either
2211.Cm ADDRESS
2212when looking up a host by address (only when
2213.Cm CheckHostIP
2214is enabled),
2215.Cm HOSTNAME
2216when searching by hostname, or
2217.Cm ORDER
2218when preparing the host key algorithm preference list to use for the
2219destination host.
2220.It %i
2221The local user ID.
2222.It %j
2223The contents of the ProxyJump option, or the empty string if this
2224option is unset.
2225.It %K
2226The base64 encoded host key.
2227.It %k
2228The host key alias if specified, otherwise the original remote hostname given
2229on the command line.
2230.It %L
2231The local hostname.
2232.It %l
2233The local hostname, including the domain name.
2234.It %n
2235The original remote hostname, as given on the command line.
2236.It %p
2237The remote port.
2238.It %r
2239The remote username.
2240.It \&%T
2241The local
2242.Xr tun 4
2243or
2244.Xr tap 4
2245network interface assigned if
2246tunnel forwarding was requested, or
2247.Qq NONE
2248otherwise.
2249.It %t
2250The type of the server host key, e.g.
2251.Cm ssh-ed25519 .
2252.It %u
2253The local username.
2254.El
2255.Pp
2256.Cm CertificateFile ,
2257.Cm ControlPath ,
2258.Cm IdentityAgent ,
2259.Cm IdentityFile ,
2260.Cm KnownHostsCommand ,
2261.Cm LocalForward ,
2262.Cm Match exec ,
2263.Cm RemoteCommand ,
2264.Cm RemoteForward ,
2265.Cm RevokedHostKeys ,
2266and
2267.Cm UserKnownHostsFile
2268accept the tokens %%, %C, %d, %h, %i, %j, %k, %L, %l, %n, %p, %r, and %u.
2269.Pp
2270.Cm KnownHostsCommand
2271additionally accepts the tokens %f, %H, %I, %K and %t.
2272.Pp
2273.Cm Hostname
2274accepts the tokens %% and %h.
2275.Pp
2276.Cm LocalCommand
2277accepts all tokens.
2278.Pp
2279.Cm ProxyCommand
2280and
2281.Cm ProxyJump
2282accept the tokens %%, %h, %n, %p, and %r.
2283.Pp
2284Note that some of these directives build commands for execution via the shell.
2285Because
2286.Xr ssh 1
2287performs no filtering or escaping of characters that have special meaning in
2288shell commands (e.g. quotes), it is the user's responsibility to ensure that
2289the arguments passed to
2290.Xr ssh 1
2291do not contain such characters and that tokens are appropriately quoted
2292when used.
2293.Sh ENVIRONMENT VARIABLES
2294Arguments to some keywords can be expanded at runtime from environment
2295variables on the client by enclosing them in
2296.Ic ${} ,
2297for example
2298.Ic ${HOME}/.ssh
2299would refer to the user's .ssh directory.
2300If a specified environment variable does not exist then an error will be
2301returned and the setting for that keyword will be ignored.
2302.Pp
2303The keywords
2304.Cm CertificateFile ,
2305.Cm ControlPath ,
2306.Cm IdentityAgent ,
2307.Cm IdentityFile ,
2308.Cm KnownHostsCommand ,
2309and
2310.Cm UserKnownHostsFile
2311support environment variables.
2312The keywords
2313.Cm LocalForward
2314and
2315.Cm RemoteForward
2316support environment variables only for Unix domain socket paths.
2317.Sh FILES
2318.Bl -tag -width Ds
2319.It Pa ~/.ssh/config
2320This is the per-user configuration file.
2321The format of this file is described above.
2322This file is used by the SSH client.
2323Because of the potential for abuse, this file must have strict permissions:
2324read/write for the user, and not writable by others.
2325.It Pa /etc/ssh/ssh_config
2326Systemwide configuration file.
2327This file provides defaults for those
2328values that are not specified in the user's configuration file, and
2329for those users who do not have a configuration file.
2330This file must be world-readable.
2331.El
2332.Sh SEE ALSO
2333.Xr ssh 1
2334.Sh AUTHORS
2335.An -nosplit
2336OpenSSH is a derivative of the original and free
2337ssh 1.2.12 release by
2338.An Tatu Ylonen .
2339.An Aaron Campbell , Bob Beck , Markus Friedl ,
2340.An Niels Provos , Theo de Raadt
2341and
2342.An Dug Song
2343removed many bugs, re-added newer features and
2344created OpenSSH.
2345.An Markus Friedl
2346contributed the support for SSH protocol versions 1.5 and 2.0.
2347