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