1SSH_CONFIG(5) BSD File Formats Manual SSH_CONFIG(5)
2
4 ssh_config — OpenSSH client configuration file
5
7 ssh(1) obtains configuration data from the following sources in the fol‐
8 lowing order:
9
10 1. command-line options
11 2. user's configuration file (~/.ssh/config)
12 3. GSSAPI configuration file ($HOME/.ssh/config.gssapi)
13 4. Kerberos configuration file ($HOME/.ssh/config.krb)
14 5. system-wide configuration file (/etc/gsissh/ssh_config)
15
16 For each parameter, the first obtained value will be used. The configu‐
17 ration files contain sections separated by Host specifications, and that
18 section is only applied for hosts that match one of the patterns given in
19 the specification. The matched host name is usually the one given on the
20 command line (see the CanonicalizeHostname option for exceptions).
21
22 Since the first obtained value for each parameter is used, more host-spe‐
23 cific declarations should be given near the beginning of the file, and
24 general defaults at the end.
25
26 The file contains keyword-argument pairs, one per line. Lines starting
27 with ‘#’ and empty lines are interpreted as comments. Arguments may op‐
28 tionally be enclosed in double quotes (") in order to represent arguments
29 containing spaces. Configuration options may be separated by whitespace
30 or optional whitespace and exactly one ‘=’; the latter format is useful
31 to avoid the need to quote whitespace when specifying configuration op‐
32 tions using the ssh, scp, and sftp -o option.
33
34 The possible keywords and their meanings are as follows (note that key‐
35 words are case-insensitive and arguments are case-sensitive):
36
37 Host Restricts the following declarations (up to the next Host or
38 Match keyword) to be only for those hosts that match one of the
39 patterns given after the keyword. If more than one pattern is
40 provided, they should be separated by whitespace. A single ‘*’
41 as a pattern can be used to provide global defaults for all
42 hosts. The host is usually the hostname argument given on the
43 command line (see the CanonicalizeHostname keyword for excep‐
44 tions).
45
46 A pattern entry may be negated by prefixing it with an exclama‐
47 tion mark (‘!’). If a negated entry is matched, then the Host
48 entry is ignored, regardless of whether any other patterns on the
49 line match. Negated matches are therefore useful to provide ex‐
50 ceptions for wildcard matches.
51
52 See PATTERNS for more information on patterns.
53
54 Match Restricts the following declarations (up to the next Host or
55 Match keyword) to be used only when the conditions following the
56 Match keyword are satisfied. Match conditions are specified us‐
57 ing one or more criteria or the single token all which always
58 matches. The available criteria keywords are: canonical, final,
59 exec, host, originalhost, user, and localuser. The all criteria
60 must appear alone or immediately after canonical or final. Other
61 criteria may be combined arbitrarily. All criteria but all,
62 canonical, and final require an argument. Criteria may be
63 negated by prepending an exclamation mark (‘!’).
64
65 The canonical keyword matches only when the configuration file is
66 being re-parsed after hostname canonicalization (see the
67 CanonicalizeHostname option). This may be useful to specify con‐
68 ditions that work with canonical host names only.
69
70 The final keyword requests that the configuration be re-parsed
71 (regardless of whether CanonicalizeHostname is enabled), and
72 matches only during this final pass. If CanonicalizeHostname is
73 enabled, then canonical and final match during the same pass.
74
75 The exec keyword executes the specified command under the user's
76 shell. If the command returns a zero exit status then the condi‐
77 tion is considered true. Commands containing whitespace charac‐
78 ters must be quoted. Arguments to exec accept the tokens de‐
79 scribed in the TOKENS section.
80
81 The other keywords' criteria must be single entries or comma-sep‐
82 arated lists and may use the wildcard and negation operators de‐
83 scribed in the PATTERNS section. The criteria for the host key‐
84 word are matched against the target hostname, after any substitu‐
85 tion by the Hostname or CanonicalizeHostname options. The
86 originalhost keyword matches against the hostname as it was spec‐
87 ified on the command-line. The user keyword matches against the
88 target username on the remote host. The localuser keyword
89 matches against the name of the local user running ssh(1) (this
90 keyword may be useful in system-wide ssh_config files).
91
92 AddKeysToAgent
93 Specifies whether keys should be automatically added to a running
94 ssh-agent(1). If this option is set to yes and a key is loaded
95 from a file, the key and its passphrase are added to the agent
96 with the default lifetime, as if by ssh-add(1). If this option
97 is set to ask, ssh(1) will require confirmation using the
98 SSH_ASKPASS program before adding a key (see ssh-add(1) for de‐
99 tails). If this option is set to confirm, each use of the key
100 must be confirmed, as if the -c option was specified to
101 ssh-add(1). If this option is set to no, no keys are added to
102 the agent. Alternately, this option may be specified as a time
103 interval using the format described in the TIME FORMATS section
104 of sshd_config(5) to specify the key's lifetime in ssh-agent(1),
105 after which it will automatically be removed. The argument must
106 be no (the default), yes, confirm (optionally followed by a time
107 interval), ask or a time interval.
108
109 AddressFamily
110 Specifies which address family to use when connecting. Valid ar‐
111 guments are any (the default), inet (use IPv4 only), or inet6
112 (use IPv6 only).
113
114 BatchMode
115 If set to yes, user interaction such as password prompts and host
116 key confirmation requests will be disabled. This option is use‐
117 ful in scripts and other batch jobs where no user is present to
118 interact with ssh(1). The argument must be yes or no (the de‐
119 fault).
120
121 BindAddress
122 Use the specified address on the local machine as the source ad‐
123 dress of the connection. Only useful on systems with more than
124 one address.
125
126 BindInterface
127 Use the address of the specified interface on the local machine
128 as the source address of the connection.
129
130 CanonicalDomains
131 When CanonicalizeHostname is enabled, this option specifies the
132 list of domain suffixes in which to search for the specified des‐
133 tination host.
134
135 CanonicalizeFallbackLocal
136 Specifies whether to fail with an error when hostname canonical‐
137 ization fails. The default, yes, will attempt to look up the un‐
138 qualified hostname using the system resolver's search rules. A
139 value of no will cause ssh(1) to fail instantly if
140 CanonicalizeHostname is enabled and the target hostname cannot be
141 found in any of the domains specified by CanonicalDomains.
142
143 CanonicalizeHostname
144 Controls whether explicit hostname canonicalization is performed.
145 The default, no, is not to perform any name rewriting and let the
146 system resolver handle all hostname lookups. If set to yes then,
147 for connections that do not use a ProxyCommand or ProxyJump,
148 ssh(1) will attempt to canonicalize the hostname specified on the
149 command line using the CanonicalDomains suffixes and
150 CanonicalizePermittedCNAMEs rules. If CanonicalizeHostname is
151 set to always, then canonicalization is applied to proxied con‐
152 nections too.
153
154 If this option is enabled, then the configuration files are pro‐
155 cessed again using the new target name to pick up any new config‐
156 uration in matching Host and Match stanzas. A value of none dis‐
157 ables the use of a ProxyJump host.
158
159 CanonicalizeMaxDots
160 Specifies the maximum number of dot characters in a hostname be‐
161 fore canonicalization is disabled. The default, 1, allows a sin‐
162 gle dot (i.e. hostname.subdomain).
163
164 CanonicalizePermittedCNAMEs
165 Specifies rules to determine whether CNAMEs should be followed
166 when canonicalizing hostnames. The rules consist of one or more
167 arguments of source_domain_list:target_domain_list, where
168 source_domain_list is a pattern-list of domains that may follow
169 CNAMEs in canonicalization, and target_domain_list is a pattern-
170 list of domains that they may resolve to.
171
172 For example, "*.a.example.com:*.b.example.com,*.c.example.com"
173 will allow hostnames matching "*.a.example.com" to be canonical‐
174 ized to names in the "*.b.example.com" or "*.c.example.com" do‐
175 mains.
176
177 A single argument of "none" causes no CNAMEs to be considered for
178 canonicalization. This is the default behaviour.
179
180 CASignatureAlgorithms
181 The default is handled system-wide by crypto-policies(7). Infor‐
182 mation about defaults, how to modify the defaults and how to cus‐
183 tomize existing policies with sub-policies are present in manual
184 page update-crypto-policies(8).
185
186 Specifies which algorithms are allowed for signing of certifi‐
187 cates by certificate authorities (CAs). If the specified list
188 begins with a ‘+’ character, then the specified algorithms will
189 be appended to the default set instead of replacing them. If the
190 specified list begins with a ‘-’ character, then the specified
191 algorithms (including wildcards) will be removed from the default
192 set instead of replacing them.
193
194 ssh(1) will not accept host certificates signed using algorithms
195 other than those specified.
196
197 CertificateFile
198 Specifies a file from which the user's certificate is read. A
199 corresponding private key must be provided separately in order to
200 use this certificate either from an IdentityFile directive or -i
201 flag to ssh(1), via ssh-agent(1), or via a PKCS11Provider or
202 SecurityKeyProvider.
203
204 Arguments to CertificateFile may use the tilde syntax to refer to
205 a user's home directory, the tokens described in the TOKENS sec‐
206 tion and environment variables as described in the ENVIRONMENT
207 VARIABLES section.
208
209 It is possible to have multiple certificate files specified in
210 configuration files; these certificates will be tried in se‐
211 quence. Multiple CertificateFile directives will add to the list
212 of certificates used for authentication.
213
214 CheckHostIP
215 If set to yes [22mssh(1) will additionally check the host IP address
216 in the known_hosts file. This allows it to detect if a host key
217 changed due to DNS spoofing and will add addresses of destination
218 hosts to ~/.ssh/known_hosts in the process, regardless of the
219 setting of StrictHostKeyChecking. If the option is set to no
220 (the default), the check will not be executed.
221
222 Ciphers
223 The default is handled system-wide by crypto-policies(7). Infor‐
224 mation about defaults, how to modify the defaults and how to cus‐
225 tomize existing policies with sub-policies are present in manual
226 page update-crypto-policies(8).
227
228 Specifies the ciphers allowed and their order of preference.
229 Multiple ciphers must be comma-separated. If the specified list
230 begins with a ‘+’ character, then the specified ciphers will be
231 appended to the built-in openssh default set instead of replacing
232 them. If the specified list begins with a ‘-’ character, then
233 the specified ciphers (including wildcards) will be removed from
234 the built-in openssh default set instead of replacing them. If
235 the specified list begins with a ‘^’ character, then the speci‐
236 fied ciphers will be placed at the head of the built-in openssh
237 default set.
238
239 The supported ciphers are:
240
241 3des-cbc
242 aes128-cbc
243 aes192-cbc
244 aes256-cbc
245 aes128-ctr
246 aes192-ctr
247 aes256-ctr
248 aes128-gcm@openssh.com
249 aes256-gcm@openssh.com
250 chacha20-poly1305@openssh.com
251
252 The list of available ciphers may also be obtained using "ssh -Q
253 cipher".
254
255 ClearAllForwardings
256 Specifies that all local, remote, and dynamic port forwardings
257 specified in the configuration files or on the command line be
258 cleared. This option is primarily useful when used from the
259 ssh(1) command line to clear port forwardings set in configura‐
260 tion files, and is automatically set by scp(1) and sftp(1). The
261 argument must be yes or no (the default).
262
263 Compression
264 Specifies whether to use compression. The argument must be yes
265 or no (the default).
266
267 ConnectionAttempts
268 Specifies the number of tries (one per second) to make before ex‐
269 iting. The argument must be an integer. This may be useful in
270 scripts if the connection sometimes fails. The default is 1.
271
272 ConnectTimeout
273 Specifies the timeout (in seconds) used when connecting to the
274 SSH server, instead of using the default system TCP timeout.
275 This timeout is applied both to establishing the connection and
276 to performing the initial SSH protocol handshake and key ex‐
277 change.
278
279 ControlMaster
280 Enables the sharing of multiple sessions over a single network
281 connection. When set to yes, ssh(1) will listen for connections
282 on a control socket specified using the ControlPath argument.
283 Additional sessions can connect to this socket using the same
284 ControlPath with ControlMaster set to no (the default). These
285 sessions will try to reuse the master instance's network connec‐
286 tion rather than initiating new ones, but will fall back to con‐
287 necting normally if the control socket does not exist, or is not
288 listening.
289
290 Setting this to ask will cause ssh(1) to listen for control con‐
291 nections, but require confirmation using ssh-askpass(1). If the
292 ControlPath cannot be opened, ssh(1) will continue without con‐
293 necting to a master instance.
294
295 X11 and ssh-agent(1) forwarding is supported over these multi‐
296 plexed connections, however the display and agent forwarded will
297 be the one belonging to the master connection i.e. it is not pos‐
298 sible to forward multiple displays or agents.
299
300 Two additional options allow for opportunistic multiplexing: try
301 to use a master connection but fall back to creating a new one if
302 one does not already exist. These options are: auto and autoask.
303 The latter requires confirmation like the ask option.
304
305 ControlPath
306 Specify the path to the control socket used for connection shar‐
307 ing as described in the ControlMaster section above or the string
308 none to disable connection sharing. Arguments to ControlPath may
309 use the tilde syntax to refer to a user's home directory, the to‐
310 kens described in the TOKENS section and environment variables as
311 described in the ENVIRONMENT VARIABLES section. It is recom‐
312 mended that any ControlPath used for opportunistic connection
313 sharing include at least %h, %p, and %r (or alternatively %C) and
314 be placed in a directory that is not writable by other users.
315 This ensures that shared connections are uniquely identified.
316
317 ControlPersist
318 When used in conjunction with ControlMaster, specifies that the
319 master connection should remain open in the background (waiting
320 for future client connections) after the initial client connec‐
321 tion has been closed. If set to no (the default), then the mas‐
322 ter connection will not be placed into the background, and will
323 close as soon as the initial client connection is closed. If set
324 to yes or 0, then the master connection will remain in the back‐
325 ground indefinitely (until killed or closed via a mechanism such
326 as the "ssh -O exit"). If set to a time in seconds, or a time in
327 any of the formats documented in sshd_config(5), then the back‐
328 grounded master connection will automatically terminate after it
329 has remained idle (with no client connections) for the specified
330 time.
331
332 DynamicForward
333 Specifies that a TCP port on the local machine be forwarded over
334 the secure channel, and the application protocol is then used to
335 determine where to connect to from the remote machine.
336
337 The argument must be [bind_address:]port. IPv6 addresses can be
338 specified by enclosing addresses in square brackets. By default,
339 the local port is bound in accordance with the GatewayPorts set‐
340 ting. However, an explicit bind_address may be used to bind the
341 connection to a specific address. The bind_address of localhost
342 indicates that the listening port be bound for local use only,
343 while an empty address or ‘*’ indicates that the port should be
344 available from all interfaces.
345
346 Currently the SOCKS4 and SOCKS5 protocols are supported, and
347 ssh(1) will act as a SOCKS server. Multiple forwardings may be
348 specified, and additional forwardings can be given on the command
349 line. Only the superuser can forward privileged ports.
350
351 EnableSSHKeysign
352 Setting this option to yes in the global client configuration
353 file /etc/gsissh/ssh_config enables the use of the helper program
354 ssh-keysign(8) during HostbasedAuthentication. The argument must
355 be yes or no (the default). This option should be placed in the
356 non-hostspecific section. See ssh-keysign(8) for more informa‐
357 tion.
358
359 EscapeChar
360 Sets the escape character (default: ‘~’). The escape character
361 can also be set on the command line. The argument should be a
362 single character, ‘^’ followed by a letter, or none to disable
363 the escape character entirely (making the connection transparent
364 for binary data).
365
366 ExitOnForwardFailure
367 Specifies whether ssh(1) should terminate the connection if it
368 cannot set up all requested dynamic, tunnel, local, and remote
369 port forwardings, (e.g. if either end is unable to bind and lis‐
370 ten on a specified port). Note that ExitOnForwardFailure does
371 not apply to connections made over port forwardings and will not,
372 for example, cause ssh(1) to exit if TCP connections to the ulti‐
373 mate forwarding destination fail. The argument must be yes or no
374 (the default).
375
376 FingerprintHash
377 Specifies the hash algorithm used when displaying key finger‐
378 prints. Valid options are: md5 and sha256 (the default).
379
380 ForkAfterAuthentication
381 Requests ssh to go to background just before command execution.
382 This is useful if ssh is going to ask for passwords or
383 passphrases, but the user wants it in the background. This im‐
384 plies the StdinNull configuration option being set to “yes”. The
385 recommended way to start X11 programs at a remote site is with
386 something like ssh -f host xterm, which is the same as ssh host
387 xterm if the ForkAfterAuthentication configuration option is set
388 to “yes”.
389
390 If the ExitOnForwardFailure configuration option is set to “yes”,
391 then a client started with the ForkAfterAuthentication configura‐
392 tion option being set to “yes” will wait for all remote port for‐
393 wards to be successfully established before placing itself in the
394 background. The argument to this keyword must be yes (same as
395 the -f option) or no (the default).
396
397 ForwardAgent
398 Specifies whether the connection to the authentication agent (if
399 any) will be forwarded to the remote machine. The argument may
400 be yes, no (the default), an explicit path to an agent socket or
401 the name of an environment variable (beginning with ‘$’) in which
402 to find the path.
403
404 Agent forwarding should be enabled with caution. Users with the
405 ability to bypass file permissions on the remote host (for the
406 agent's Unix-domain socket) can access the local agent through
407 the forwarded connection. An attacker cannot obtain key material
408 from the agent, however they can perform operations on the keys
409 that enable them to authenticate using the identities loaded into
410 the agent.
411
412 ForwardX11
413 Specifies whether X11 connections will be automatically redi‐
414 rected over the secure channel and DISPLAY set. The argument
415 must be yes or no (the default).
416
417 X11 forwarding should be enabled with caution. Users with the
418 ability to bypass file permissions on the remote host (for the
419 user's X11 authorization database) can access the local X11 dis‐
420 play through the forwarded connection. An attacker may then be
421 able to perform activities such as keystroke monitoring if the
422 ForwardX11Trusted option is also enabled.
423
424 ForwardX11Timeout
425 Specify a timeout for untrusted X11 forwarding using the format
426 described in the TIME FORMATS section of sshd_config(5). X11
427 connections received by ssh(1) after this time will be refused.
428 Setting ForwardX11Timeout to zero will disable the timeout and
429 permit X11 forwarding for the life of the connection. The de‐
430 fault is to disable untrusted X11 forwarding after twenty minutes
431 has elapsed.
432
433 ForwardX11Trusted
434 If this option is set to yes, remote X11 clients will have full
435 access to the original X11 display.
436
437 If this option is set to no (the default), remote X11 clients
438 will be considered untrusted and prevented from stealing or tam‐
439 pering with data belonging to trusted X11 clients. Furthermore,
440 the xauth(1) token used for the session will be set to expire af‐
441 ter 20 minutes. Remote clients will be refused access after this
442 time.
443
444 See the X11 SECURITY extension specification for full details on
445 the restrictions imposed on untrusted clients.
446
447 GatewayPorts
448 Specifies whether remote hosts are allowed to connect to local
449 forwarded ports. By default, ssh(1) binds local port forwardings
450 to the loopback address. This prevents other remote hosts from
451 connecting to forwarded ports. GatewayPorts can be used to spec‐
452 ify that ssh should bind local port forwardings to the wildcard
453 address, thus allowing remote hosts to connect to forwarded
454 ports. The argument must be yes or no (the default).
455
456 GlobalKnownHostsFile
457 Specifies one or more files to use for the global host key data‐
458 base, separated by whitespace. The default is
459 /etc/gsissh/ssh_known_hosts, /etc/gsissh/ssh_known_hosts2.
460
461 GSSAPIAuthentication
462 Specifies whether user authentication based on GSSAPI is allowed.
463 The default is yes.
464
465 GSSAPIClientIdentity
466 If set, specifies the GSSAPI client identity that ssh should use
467 when connecting to the server. The default is unset, which means
468 that the default identity will be used.
469
470 GSSAPIDelegateCredentials
471 Forward (delegate) credentials to the server. The default is
472 yes.
473
474 GSSAPIKeyExchange
475 Specifies whether key exchange based on GSSAPI may be used. When
476 using GSSAPI key exchange the server need not have a host key.
477 The default is “yes”.
478
479 GSSAPIRenewalForcesRekey
480 If set to “yes” then renewal of the client's GSSAPI credentials
481 will force the rekeying of the ssh connection. With a compatible
482 server, this will delegate the renewed credentials to a session
483 on the server.
484
485 Checks are made to ensure that credentials are only propagated
486 when the new credentials match the old ones on the originating
487 client and where the receiving server still has the old set in
488 its cache.
489
490 The default is “no”.
491
492 For this to work GSSAPIKeyExchange needs to be enabled in the
493 server and also used by the client.
494
495 GSSAPIServerIdentity
496 If set, specifies the GSSAPI server identity that ssh should ex‐
497 pect when connecting to the server. The default is unset, which
498 means that the expected GSSAPI server identity will be determined
499 from the target hostname.
500
501 GSSAPITrustDns
502 Set to “yes” to indicate that the DNS is trusted to securely
503 canonicalize the name of the host being connected to. If “no”,
504 the hostname entered on the command line will be passed untouched
505 to the GSSAPI library. The default is “no”.
506
507 GSSAPIKexAlgorithms
508 The default is handled system-wide by crypto-policies(7). Infor‐
509 mation about defaults, how to modify the defaults and how to cus‐
510 tomize existing policies with sub-policies are present in manual
511 page update-crypto-policies(8).
512
513 The list of key exchange algorithms that are offered for GSSAPI
514 key exchange. Possible values are
515
516 gss-gex-sha1-,
517 gss-group1-sha1-,
518 gss-group14-sha1-,
519 gss-group14-sha256-,
520 gss-group16-sha512-,
521 gss-nistp256-sha256-,
522 gss-curve25519-sha256-
523
524 This option only applies to connections using GSSAPI.
525
526 HashKnownHosts
527 Indicates that ssh(1) should hash host names and addresses when
528 they are added to ~/.ssh/known_hosts. These hashed names may be
529 used normally by ssh(1) and sshd(8), but they do not visually re‐
530 veal identifying information if the file's contents are dis‐
531 closed. The default is no. Note that existing names and ad‐
532 dresses in known hosts files will not be converted automatically,
533 but may be manually hashed using ssh-keygen(1).
534
535 HostbasedAcceptedAlgorithms
536 Specifies the signature algorithms that will be used for host‐
537 based authentication as a comma-separated list of patterns. Al‐
538 ternately if the specified list begins with a ‘+’ character, then
539 the specified signature algorithms will be appended to the de‐
540 fault set instead of replacing them. If the specified list be‐
541 gins with a ‘-’ character, then the specified signature algo‐
542 rithms (including wildcards) will be removed from the default set
543 instead of replacing them. If the specified list begins with a
544 ‘^’ character, then the specified signature algorithms will be
545 placed at the head of the default set. The default for this op‐
546 tion is:
547
548 ssh-ed25519-cert-v01@openssh.com,
549 ecdsa-sha2-nistp256-cert-v01@openssh.com,
550 ecdsa-sha2-nistp384-cert-v01@openssh.com,
551 ecdsa-sha2-nistp521-cert-v01@openssh.com,
552 sk-ssh-ed25519-cert-v01@openssh.com,
553 sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,
554 rsa-sha2-512-cert-v01@openssh.com,
555 rsa-sha2-256-cert-v01@openssh.com,
556 ssh-ed25519,
557 ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
558 sk-ssh-ed25519@openssh.com,
559 sk-ecdsa-sha2-nistp256@openssh.com,
560 rsa-sha2-512,rsa-sha2-256
561
562 The -Q option of ssh(1) may be used to list supported signature
563 algorithms. This was formerly named HostbasedKeyTypes.
564
565 HostbasedAuthentication
566 Specifies whether to try rhosts based authentication with public
567 key authentication. The argument must be yes or no (the de‐
568 fault).
569
570 HostKeyAlgorithms
571 Specifies the host key signature algorithms that the client wants
572 to use in order of preference. Alternately if the specified list
573 begins with a ‘+’ character, then the specified signature algo‐
574 rithms will be appended to the default set instead of replacing
575 them. If the specified list begins with a ‘-’ character, then
576 the specified signature algorithms (including wildcards) will be
577 removed from the default set instead of replacing them. If the
578 specified list begins with a ‘^’ character, then the specified
579 signature algorithms will be placed at the head of the default
580 set. The default for this option is:
581
582 ssh-ed25519-cert-v01@openssh.com,
583 ecdsa-sha2-nistp256-cert-v01@openssh.com,
584 ecdsa-sha2-nistp384-cert-v01@openssh.com,
585 ecdsa-sha2-nistp521-cert-v01@openssh.com,
586 sk-ssh-ed25519-cert-v01@openssh.com,
587 sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,
588 rsa-sha2-512-cert-v01@openssh.com,
589 rsa-sha2-256-cert-v01@openssh.com,
590 ssh-ed25519,
591 ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
592 sk-ecdsa-sha2-nistp256@openssh.com,
593 sk-ssh-ed25519@openssh.com,
594 rsa-sha2-512,rsa-sha2-256
595
596 If hostkeys are known for the destination host then this default
597 is modified to prefer their algorithms.
598
599 The list of available signature algorithms may also be obtained
600 using "ssh -Q HostKeyAlgorithms".
601
602 HostKeyAlias
603 Specifies an alias that should be used instead of the real host
604 name when looking up or saving the host key in the host key data‐
605 base files and when validating host certificates. This option is
606 useful for tunneling SSH connections or for multiple servers run‐
607 ning on a single host.
608
609 Hostname
610 Specifies the real host name to log into. This can be used to
611 specify nicknames or abbreviations for hosts. Arguments to
612 Hostname accept the tokens described in the TOKENS section. Nu‐
613 meric IP addresses are also permitted (both on the command line
614 and in Hostname specifications). The default is the name given
615 on the command line.
616
617 IdentitiesOnly
618 Specifies that ssh(1) should only use the configured authentica‐
619 tion identity and certificate files (either the default files, or
620 those explicitly configured in the ssh_config files or passed on
621 the ssh(1) command-line), even if ssh-agent(1) or a
622 PKCS11Provider or SecurityKeyProvider offers more identities.
623 The argument to this keyword must be yes or no (the default).
624 This option is intended for situations where ssh-agent offers
625 many different identities.
626
627 IdentityAgent
628 Specifies the UNIX-domain socket used to communicate with the au‐
629 thentication agent.
630
631 This option overrides the SSH_AUTH_SOCK environment variable and
632 can be used to select a specific agent. Setting the socket name
633 to none disables the use of an authentication agent. If the
634 string "SSH_AUTH_SOCK" is specified, the location of the socket
635 will be read from the SSH_AUTH_SOCK environment variable. Other‐
636 wise if the specified value begins with a ‘$’ character, then it
637 will be treated as an environment variable containing the loca‐
638 tion of the socket.
639
640 Arguments to IdentityAgent may use the tilde syntax to refer to a
641 user's home directory, the tokens described in the TOKENS section
642 and environment variables as described in the ENVIRONMENT
643 VARIABLES section.
644
645 IdentityFile
646 Specifies a file from which the user's DSA, ECDSA, authenticator-
647 hosted ECDSA, Ed25519, authenticator-hosted Ed25519 or RSA au‐
648 thentication identity is read. The default is ~/.ssh/id_dsa,
649 ~/.ssh/id_ecdsa, ~/.ssh/id_ecdsa_sk, ~/.ssh/id_ed25519,
650 ~/.ssh/id_ed25519_sk and ~/.ssh/id_rsa. Additionally, any iden‐
651 tities represented by the authentication agent will be used for
652 authentication unless IdentitiesOnly is set. If no certificates
653 have been explicitly specified by CertificateFile, ssh(1) will
654 try to load certificate information from the filename obtained by
655 appending -cert.pub to the path of a specified IdentityFile.
656
657 Arguments to IdentityFile may use the tilde syntax to refer to a
658 user's home directory or the tokens described in the TOKENS sec‐
659 tion.
660
661 It is possible to have multiple identity files specified in con‐
662 figuration files; all these identities will be tried in sequence.
663 Multiple IdentityFile directives will add to the list of identi‐
664 ties tried (this behaviour differs from that of other configura‐
665 tion directives).
666
667 IdentityFile may be used in conjunction with IdentitiesOnly to
668 select which identities in an agent are offered during authenti‐
669 cation. IdentityFile may also be used in conjunction with
670 CertificateFile in order to provide any certificate also needed
671 for authentication with the identity.
672
673 The authentication identity can be also specified in a form of
674 PKCS#11 URI starting with a string pkcs11:. There is supported a
675 subset of the PKCS#11 URI as defined in RFC 7512 (implemented
676 path arguments id, manufacturer, object, token and query argu‐
677 ments module-path and pin-value ). The URI can not be in quotes.
678
679 IgnoreUnknown
680 Specifies a pattern-list of unknown options to be ignored if they
681 are encountered in configuration parsing. This may be used to
682 suppress errors if ssh_config contains options that are unrecog‐
683 nised by ssh(1). It is recommended that IgnoreUnknown be listed
684 early in the configuration file as it will not be applied to un‐
685 known options that appear before it.
686
687 Include
688 Include the specified configuration file(s). Multiple pathnames
689 may be specified and each pathname may contain glob(7) wildcards
690 and, for user configurations, shell-like ‘~’ references to user
691 home directories. Wildcards will be expanded and processed in
692 lexical order. Files without absolute paths are assumed to be in
693 ~/.ssh if included in a user configuration file or /etc/ssh if
694 included from the system configuration file. Include directive
695 may appear inside a Match or Host block to perform conditional
696 inclusion.
697
698 IPQoS Specifies the IPv4 type-of-service or DSCP class for connections.
699 Accepted values are af11, af12, af13, af21, af22, af23, af31,
700 af32, af33, af41, af42, af43, cs0, cs1, cs2, cs3, cs4, cs5, cs6,
701 cs7, ef, le, lowdelay, throughput, reliability, a numeric value,
702 or none to use the operating system default. This option may
703 take one or two arguments, separated by whitespace. If one argu‐
704 ment is specified, it is used as the packet class uncondition‐
705 ally. If two values are specified, the first is automatically
706 selected for interactive sessions and the second for non-interac‐
707 tive sessions. The default is af21 (Low-Latency Data) for inter‐
708 active sessions and cs1 (Lower Effort) for non-interactive ses‐
709 sions.
710
711 KbdInteractiveAuthentication
712 Specifies whether to use keyboard-interactive authentication.
713 The argument to this keyword must be yes (the default) or no.
714 ChallengeResponseAuthentication is a deprecated alias for this.
715
716 KbdInteractiveDevices
717 Specifies the list of methods to use in keyboard-interactive au‐
718 thentication. Multiple method names must be comma-separated.
719 The default is to use the server specified list. The methods
720 available vary depending on what the server supports. For an
721 OpenSSH server, it may be zero or more of: bsdauth and pam.
722
723 KexAlgorithms
724 The default is handled system-wide by crypto-policies(7). Infor‐
725 mation about defaults, how to modify the defaults and how to cus‐
726 tomize existing policies with sub-policies are present in manual
727 page update-crypto-policies(8).
728
729 Specifies the available KEX (Key Exchange) algorithms. Multiple
730 algorithms must be comma-separated. If the specified list begins
731 with a ‘+’ character, then the specified methods will be appended
732 to the built-in openssh default set instead of replacing them.
733 If the specified list begins with a ‘-’ character, then the spec‐
734 ified algorithms (including wildcards) will be removed from the
735 built-in openssh default set instead of replacing them. If the
736 specified list begins with a ‘^’ character, then the specified
737 algorithms will be placed at the head of the built-in openssh de‐
738 fault set.
739
740 The list of available key exchange algorithms may also be ob‐
741 tained using "ssh -Q kex".
742
743 KnownHostsCommand
744 Specifies a command to use to obtain a list of host keys, in ad‐
745 dition to those listed in UserKnownHostsFile and
746 GlobalKnownHostsFile. This command is executed after the files
747 have been read. It may write host key lines to standard output
748 in identical format to the usual files (described in the
749 VERIFYING HOST KEYS section in ssh(1)). Arguments to
750 KnownHostsCommand accept the tokens described in the TOKENS sec‐
751 tion. The command may be invoked multiple times per connection:
752 once when preparing the preference list of host key algorithms to
753 use, again to obtain the host key for the requested host name
754 and, if CheckHostIP is enabled, one more time to obtain the host
755 key matching the server's address. If the command exits abnor‐
756 mally or returns a non-zero exit status then the connection is
757 terminated.
758
759 LocalCommand
760 Specifies a command to execute on the local machine after suc‐
761 cessfully connecting to the server. The command string extends
762 to the end of the line, and is executed with the user's shell.
763 Arguments to LocalCommand accept the tokens described in the
764 TOKENS section.
765
766 The command is run synchronously and does not have access to the
767 session of the ssh(1) that spawned it. It should not be used for
768 interactive commands.
769
770 This directive is ignored unless PermitLocalCommand has been en‐
771 abled.
772
773 LocalForward
774 Specifies that a TCP port on the local machine be forwarded over
775 the secure channel to the specified host and port from the remote
776 machine. The first argument specifies the listener and may be
777 [bind_address:]port or a Unix domain socket path. The second ar‐
778 gument is the destination and may be host:hostport or a Unix do‐
779 main socket path if the remote host supports it.
780
781 IPv6 addresses can be specified by enclosing addresses in square
782 brackets. Multiple forwardings may be specified, and additional
783 forwardings can be given on the command line. Only the superuser
784 can forward privileged ports. By default, the local port is
785 bound in accordance with the GatewayPorts setting. However, an
786 explicit bind_address may be used to bind the connection to a
787 specific address. The bind_address of localhost indicates that
788 the listening port be bound for local use only, while an empty
789 address or ‘*’ indicates that the port should be available from
790 all interfaces. Unix domain socket paths may use the tokens de‐
791 scribed in the TOKENS section and environment variables as de‐
792 scribed in the ENVIRONMENT VARIABLES section.
793
794 LogLevel
795 Gives the verbosity level that is used when logging messages from
796 ssh(1). The possible values are: QUIET, FATAL, ERROR, INFO, VER‐
797 BOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3. The default is INFO.
798 DEBUG and DEBUG1 are equivalent. DEBUG2 and DEBUG3 each specify
799 higher levels of verbose output.
800
801 LogVerbose
802 Specify one or more overrides to LogLevel. An override consists
803 of a pattern lists that matches the source file, function and
804 line number to force detailed logging for. For example, an over‐
805 ride pattern of:
806
807 kex.c:*:1000,*:kex_exchange_identification():*,packet.c:*
808
809 would enable detailed logging for line 1000 of kex.c, everything
810 in the kex_exchange_identification() function, and all code in
811 the packet.c file. This option is intended for debugging and no
812 overrides are enabled by default.
813
814 MACs The default is handled system-wide by crypto-policies(7). Infor‐
815 mation about defaults, how to modify the defaults and how to cus‐
816 tomize existing policies with sub-policies are present in manual
817 page update-crypto-policies(8).
818
819 Specifies the MAC (message authentication code) algorithms in or‐
820 der of preference. The MAC algorithm is used for data integrity
821 protection. Multiple algorithms must be comma-separated. If the
822 specified list begins with a ‘+’ character, then the specified
823 algorithms will be appended to the built-in openssh default set
824 instead of replacing them. If the specified list begins with a
825 ‘-’ character, then the specified algorithms (including wild‐
826 cards) will be removed from the built-in openssh default set in‐
827 stead of replacing them. If the specified list begins with a ‘^’
828 character, then the specified algorithms will be placed at the
829 head of the built-in openssh default set.
830
831 The algorithms that contain "-etm" calculate the MAC after en‐
832 cryption (encrypt-then-mac). These are considered safer and
833 their use recommended.
834
835 The list of available MAC algorithms may also be obtained using
836 "ssh -Q mac".
837
838 NoHostAuthenticationForLocalhost
839 Disable host authentication for localhost (loopback addresses).
840 The argument to this keyword must be yes or no (the default).
841
842 NumberOfPasswordPrompts
843 Specifies the number of password prompts before giving up. The
844 argument to this keyword must be an integer. The default is 3.
845
846 PasswordAuthentication
847 Specifies whether to use password authentication. The argument
848 to this keyword must be yes (the default) or no.
849
850 PermitLocalCommand
851 Allow local command execution via the LocalCommand option or us‐
852 ing the !command escape sequence in ssh(1). The argument must be
853 yes or no (the default).
854
855 PermitRemoteOpen
856 Specifies the destinations to which remote TCP port forwarding is
857 permitted when RemoteForward is used as a SOCKS proxy. The for‐
858 warding specification must be one of the following forms:
859
860 PermitRemoteOpen host:port
861 PermitRemoteOpen IPv4_addr:port
862 PermitRemoteOpen [IPv6_addr]:port
863
864 Multiple forwards may be specified by separating them with white‐
865 space. An argument of any can be used to remove all restrictions
866 and permit any forwarding requests. An argument of none can be
867 used to prohibit all forwarding requests. The wildcard ‘*’ can
868 be used for host or port to allow all hosts or ports respec‐
869 tively. Otherwise, no pattern matching or address lookups are
870 performed on supplied names.
871
872 PKCS11Provider
873 Specifies which PKCS#11 provider to use or none to indicate that
874 no provider should be used (the default). The argument to this
875 keyword is a path to the PKCS#11 shared library ssh(1) should use
876 to communicate with a PKCS#11 token providing keys for user au‐
877 thentication.
878
879 Port Specifies the port number to connect on the remote host. The de‐
880 fault is 22.
881
882 PreferredAuthentications
883 Specifies the order in which the client should try authentication
884 methods. This allows a client to prefer one method (e.g.
885 keyboard-interactive) over another method (e.g. password). The
886 default is:
887
888 gssapi-keyex,gssapi-with-mic,hostbased,publickey,
889 keyboard-interactive,password
890
891 ProxyCommand
892 Specifies the command to use to connect to the server. The com‐
893 mand string extends to the end of the line, and is executed using
894 the user's shell ‘exec’ directive to avoid a lingering shell
895 process.
896
897 Arguments to ProxyCommand accept the tokens described in the
898 TOKENS section. The command can be basically anything, and
899 should read from its standard input and write to its standard
900 output. It should eventually connect an sshd(8) server running
901 on some machine, or execute sshd -i somewhere. Host key manage‐
902 ment will be done using the Hostname of the host being connected
903 (defaulting to the name typed by the user). Setting the command
904 to none disables this option entirely. Note that CheckHostIP is
905 not available for connects with a proxy command.
906
907 This directive is useful in conjunction with nc(1) and its proxy
908 support. For example, the following directive would connect via
909 an HTTP proxy at 192.0.2.0:
910
911 ProxyCommand /usr/bin/nc -X connect -x 192.0.2.0:8080 %h %p
912
913 ProxyJump
914 Specifies one or more jump proxies as either [user@]host[:port]
915 or an ssh URI. Multiple proxies may be separated by comma char‐
916 acters and will be visited sequentially. Setting this option
917 will cause ssh(1) to connect to the target host by first making a
918 ssh(1) connection to the specified ProxyJump host and then estab‐
919 lishing a TCP forwarding to the ultimate target from there. Set‐
920 ting the host to none disables this option entirely.
921
922 Note that this option will compete with the ProxyCommand option -
923 whichever is specified first will prevent later instances of the
924 other from taking effect.
925
926 Note also that the configuration for the destination host (either
927 supplied via the command-line or the configuration file) is not
928 generally applied to jump hosts. ~/.ssh/config should be used if
929 specific configuration is required for jump hosts.
930
931 ProxyUseFdpass
932 Specifies that ProxyCommand will pass a connected file descriptor
933 back to ssh(1) instead of continuing to execute and pass data.
934 The default is no.
935
936 PubkeyAcceptedAlgorithms
937 The default is handled system-wide by crypto-policies(7). Infor‐
938 mation about defaults, how to modify the defaults and how to cus‐
939 tomize existing policies with sub-policies are present in manual
940 page update-crypto-policies(8).
941
942 Specifies the signature algorithms that will be used for public
943 key authentication as a comma-separated list of patterns. If the
944 specified list begins with a ‘+’ character, then the algorithms
945 after it will be appended to the built-in openssh default instead
946 of replacing it. If the specified list begins with a ‘-’ charac‐
947 ter, then the specified algorithms (including wildcards) will be
948 removed from the built-in openssh default set instead of replac‐
949 ing them. If the specified list begins with a ‘^’ character,
950 then the specified algorithms will be placed at the head of the
951 built-in openssh default set.
952
953 The list of available signature algorithms may also be obtained
954 using "ssh -Q PubkeyAcceptedAlgorithms".
955
956 PubkeyAuthentication
957 Specifies whether to try public key authentication. The argument
958 to this keyword must be yes (the default) or no.
959
960 RekeyLimit
961 Specifies the maximum amount of data that may be transmitted be‐
962 fore the session key is renegotiated, optionally followed by a
963 maximum amount of time that may pass before the session key is
964 renegotiated. The first argument is specified in bytes and may
965 have a suffix of ‘K’, ‘M’, or ‘G’ to indicate Kilobytes,
966 Megabytes, or Gigabytes, respectively. The default is between
967 ‘1G’ and ‘4G’, depending on the cipher. The optional second
968 value is specified in seconds and may use any of the units docu‐
969 mented in the TIME FORMATS section of sshd_config(5). The de‐
970 fault value for RekeyLimit is default none, which means that
971 rekeying is performed after the cipher's default amount of data
972 has been sent or received and no time based rekeying is done.
973
974 RemoteCommand
975 Specifies a command to execute on the remote machine after suc‐
976 cessfully connecting to the server. The command string extends
977 to the end of the line, and is executed with the user's shell.
978 Arguments to RemoteCommand accept the tokens described in the
979 TOKENS section.
980
981 RemoteForward
982 Specifies that a TCP port on the remote machine be forwarded over
983 the secure channel. The remote port may either be forwarded to a
984 specified host and port from the local machine, or may act as a
985 SOCKS 4/5 proxy that allows a remote client to connect to arbi‐
986 trary destinations from the local machine. The first argument is
987 the listening specification and may be [bind_address:]port or, if
988 the remote host supports it, a Unix domain socket path. If for‐
989 warding to a specific destination then the second argument must
990 be host:hostport or a Unix domain socket path, otherwise if no
991 destination argument is specified then the remote forwarding will
992 be established as a SOCKS proxy. When acting as a SOCKS proxy
993 the destination of the connection can be restricted by
994 PermitRemoteOpen.
995
996 IPv6 addresses can be specified by enclosing addresses in square
997 brackets. Multiple forwardings may be specified, and additional
998 forwardings can be given on the command line. Privileged ports
999 can be forwarded only when logging in as root on the remote ma‐
1000 chine. Unix domain socket paths may use the tokens described in
1001 the TOKENS section and environment variables as described in the
1002 ENVIRONMENT VARIABLES section.
1003
1004 If the port argument is 0, the listen port will be dynamically
1005 allocated on the server and reported to the client at run time.
1006
1007 If the bind_address is not specified, the default is to only bind
1008 to loopback addresses. If the bind_address is ‘*’ or an empty
1009 string, then the forwarding is requested to listen on all inter‐
1010 faces. Specifying a remote bind_address will only succeed if the
1011 server's GatewayPorts option is enabled (see sshd_config(5)).
1012
1013 RequestTTY
1014 Specifies whether to request a pseudo-tty for the session. The
1015 argument may be one of: no (never request a TTY), yes (always re‐
1016 quest a TTY when standard input is a TTY), force (always request
1017 a TTY) or auto (request a TTY when opening a login session).
1018 This option mirrors the -t and -T flags for ssh(1).
1019
1020 RequiredRSASize
1021 Specifies the minimum RSA key size (in bits) that ssh(1) will ac‐
1022 cept. User authentication keys smaller than this limit will be
1023 ignored. Servers that present host keys smaller than this limit
1024 will cause the connection to be terminated. The default is 1024
1025 bits. Note that this limit may only be raised from the default.
1026
1027 RevokedHostKeys
1028 Specifies revoked host public keys. Keys listed in this file
1029 will be refused for host authentication. Note that if this file
1030 does not exist or is not readable, then host authentication will
1031 be refused for all hosts. Keys may be specified as a text file,
1032 listing one public key per line, or as an OpenSSH Key Revocation
1033 List (KRL) as generated by ssh-keygen(1). For more information
1034 on KRLs, see the KEY REVOCATION LISTS section in ssh-keygen(1).
1035
1036 SecurityKeyProvider
1037 Specifies a path to a library that will be used when loading any
1038 FIDO authenticator-hosted keys, overriding the default of using
1039 the built-in USB HID support.
1040
1041 If the specified value begins with a ‘$’ character, then it will
1042 be treated as an environment variable containing the path to the
1043 library.
1044
1045 SendEnv
1046 Specifies what variables from the local environ(7) should be sent
1047 to the server. The server must also support it, and the server
1048 must be configured to accept these environment variables. Note
1049 that the TERM environment variable is always sent whenever a
1050 pseudo-terminal is requested as it is required by the protocol.
1051 Refer to AcceptEnv in sshd_config(5) for how to configure the
1052 server. Variables are specified by name, which may contain wild‐
1053 card characters. Multiple environment variables may be separated
1054 by whitespace or spread across multiple SendEnv directives.
1055
1056 See PATTERNS for more information on patterns.
1057
1058 It is possible to clear previously set SendEnv variable names by
1059 prefixing patterns with -. The default is not to send any envi‐
1060 ronment variables.
1061
1062 ServerAliveCountMax
1063 Sets the number of server alive messages (see below) which may be
1064 sent without ssh(1) receiving any messages back from the server.
1065 If this threshold is reached while server alive messages are be‐
1066 ing sent, ssh will disconnect from the server, terminating the
1067 session. It is important to note that the use of server alive
1068 messages is very different from TCPKeepAlive (below). The server
1069 alive messages are sent through the encrypted channel and there‐
1070 fore will not be spoofable. The TCP keepalive option enabled by
1071 TCPKeepAlive is spoofable. The server alive mechanism is valu‐
1072 able when the client or server depend on knowing when a connec‐
1073 tion has become unresponsive.
1074
1075 The default value is 3. If, for example, ServerAliveInterval
1076 (see below) is set to 15 and ServerAliveCountMax is left at the
1077 default, if the server becomes unresponsive, ssh will disconnect
1078 after approximately 45 seconds.
1079
1080 ServerAliveInterval
1081 Sets a timeout interval in seconds after which if no data has
1082 been received from the server, ssh(1) will send a message through
1083 the encrypted channel to request a response from the server. The
1084 default is 0, indicating that these messages will not be sent to
1085 the server.
1086
1087 SessionType
1088 May be used to either request invocation of a subsystem on the
1089 remote system, or to prevent the execution of a remote command at
1090 all. The latter is useful for just forwarding ports. The argu‐
1091 ment to this keyword must be none (same as the -N option),
1092 subsystem (same as the -s option) or default (shell or command
1093 execution).
1094
1095 SetEnv Directly specify one or more environment variables and their con‐
1096 tents to be sent to the server. Similarly to SendEnv, with the
1097 exception of the TERM variable, the server must be prepared to
1098 accept the environment variable.
1099
1100 StdinNull
1101 Redirects stdin from /dev/null (actually, prevents reading from
1102 stdin). Either this or the equivalent -n option must be used
1103 when ssh is run in the background. The argument to this keyword
1104 must be yes (same as the -n option) or no (the default).
1105
1106 StreamLocalBindMask
1107 Sets the octal file creation mode mask (umask) used when creating
1108 a Unix-domain socket file for local or remote port forwarding.
1109 This option is only used for port forwarding to a Unix-domain
1110 socket file.
1111
1112 The default value is 0177, which creates a Unix-domain socket
1113 file that is readable and writable only by the owner. Note that
1114 not all operating systems honor the file mode on Unix-domain
1115 socket files.
1116
1117 StreamLocalBindUnlink
1118 Specifies whether to remove an existing Unix-domain socket file
1119 for local or remote port forwarding before creating a new one.
1120 If the socket file already exists and StreamLocalBindUnlink is
1121 not enabled, ssh will be unable to forward the port to the Unix-
1122 domain socket file. This option is only used for port forwarding
1123 to a Unix-domain socket file.
1124
1125 The argument must be yes or no (the default).
1126
1127 StrictHostKeyChecking
1128 If this flag is set to yes, ssh(1) will never automatically add
1129 host keys to the ~/.ssh/known_hosts file, and refuses to connect
1130 to hosts whose host key has changed. This provides maximum pro‐
1131 tection against man-in-the-middle (MITM) attacks, though it can
1132 be annoying when the /etc/gsissh/ssh_known_hosts file is poorly
1133 maintained or when connections to new hosts are frequently made.
1134 This option forces the user to manually add all new hosts.
1135
1136 If this flag is set to accept-new then ssh will automatically add
1137 new host keys to the user's known_hosts file, but will not permit
1138 connections to hosts with changed host keys. If this flag is set
1139 to no or off, ssh will automatically add new host keys to the
1140 user known hosts files and allow connections to hosts with
1141 changed hostkeys to proceed, subject to some restrictions. If
1142 this flag is set to ask (the default), new host keys will be
1143 added to the user known host files only after the user has con‐
1144 firmed that is what they really want to do, and ssh will refuse
1145 to connect to hosts whose host key has changed. The host keys of
1146 known hosts will be verified automatically in all cases.
1147
1148 SyslogFacility
1149 Gives the facility code that is used when logging messages from
1150 ssh(1). The possible values are: DAEMON, USER, AUTH, LOCAL0, LO‐
1151 CAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7. The de‐
1152 fault is USER.
1153
1154 TCPKeepAlive
1155 Specifies whether the system should send TCP keepalive messages
1156 to the other side. If they are sent, death of the connection or
1157 crash of one of the machines will be properly noticed. However,
1158 this means that connections will die if the route is down tempo‐
1159 rarily, and some people find it annoying.
1160
1161 The default is yes (to send TCP keepalive messages), and the
1162 client will notice if the network goes down or the remote host
1163 dies. This is important in scripts, and many users want it too.
1164
1165 To disable TCP keepalive messages, the value should be set to no.
1166 See also ServerAliveInterval for protocol-level keepalives.
1167
1168 Tunnel Request tun(4) device forwarding between the client and the
1169 server. The argument must be yes, point-to-point (layer 3),
1170 ethernet (layer 2), or no (the default). Specifying yes requests
1171 the default tunnel mode, which is point-to-point.
1172
1173 TunnelDevice
1174 Specifies the tun(4) devices to open on the client (local_tun)
1175 and the server (remote_tun).
1176
1177 The argument must be local_tun[:remote_tun]. The devices may be
1178 specified by numerical ID or the keyword any, which uses the next
1179 available tunnel device. If remote_tun is not specified, it de‐
1180 faults to any. The default is any:any.
1181
1182 UpdateHostKeys
1183 Specifies whether ssh(1) should accept notifications of addi‐
1184 tional hostkeys from the server sent after authentication has
1185 completed and add them to UserKnownHostsFile. The argument must
1186 be yes, no or ask. This option allows learning alternate
1187 hostkeys for a server and supports graceful key rotation by al‐
1188 lowing a server to send replacement public keys before old ones
1189 are removed.
1190
1191 Additional hostkeys are only accepted if the key used to authen‐
1192 ticate the host was already trusted or explicitly accepted by the
1193 user, the host was authenticated via UserKnownHostsFile (i.e. not
1194 GlobalKnownHostsFile) and the host was authenticated using a
1195 plain key and not a certificate.
1196
1197 UpdateHostKeys is enabled by default if the user has not overrid‐
1198 den the default UserKnownHostsFile setting and has not enabled
1199 VerifyHostKeyDNS, otherwise UpdateHostKeys will be set to no.
1200
1201 If UpdateHostKeys is set to ask, then the user is asked to con‐
1202 firm the modifications to the known_hosts file. Confirmation is
1203 currently incompatible with ControlPersist, and will be disabled
1204 if it is enabled.
1205
1206 Presently, only sshd(8) from OpenSSH 6.8 and greater support the
1207 "hostkeys@openssh.com" protocol extension used to inform the
1208 client of all the server's hostkeys.
1209
1210 User Specifies the user to log in as. This can be useful when a dif‐
1211 ferent user name is used on different machines. This saves the
1212 trouble of having to remember to give the user name on the com‐
1213 mand line.
1214
1215 UserKnownHostsFile
1216 Specifies one or more files to use for the user host key data‐
1217 base, separated by whitespace. Each filename may use tilde nota‐
1218 tion to refer to the user's home directory, the tokens described
1219 in the TOKENS section and environment variables as described in
1220 the ENVIRONMENT VARIABLES section. The default is
1221 ~/.ssh/known_hosts, ~/.ssh/known_hosts2.
1222
1223 VerifyHostKeyDNS
1224 Specifies whether to verify the remote key using DNS and SSHFP
1225 resource records. If this option is set to yes, the client will
1226 implicitly trust keys that match a secure fingerprint from DNS.
1227 Insecure fingerprints will be handled as if this option was set
1228 to ask. If this option is set to ask, information on fingerprint
1229 match will be displayed, but the user will still need to confirm
1230 new host keys according to the StrictHostKeyChecking option. The
1231 default is no.
1232
1233 See also VERIFYING HOST KEYS in ssh(1).
1234
1235 VisualHostKey
1236 If this flag is set to yes, an ASCII art representation of the
1237 remote host key fingerprint is printed in addition to the finger‐
1238 print string at login and for unknown host keys. If this flag is
1239 set to no (the default), no fingerprint strings are printed at
1240 login and only the fingerprint string will be printed for unknown
1241 host keys.
1242
1243 XAuthLocation
1244 Specifies the full pathname of the xauth(1) program. The default
1245 is /usr/bin/xauth.
1246
1248 A pattern consists of zero or more non-whitespace characters, ‘*’ (a
1249 wildcard that matches zero or more characters), or ‘?’ (a wildcard that
1250 matches exactly one character). For example, to specify a set of decla‐
1251 rations for any host in the ".co.uk" set of domains, the following pat‐
1252 tern could be used:
1253
1254 Host *.co.uk
1255
1256 The following pattern would match any host in the 192.168.0.[0-9] network
1257 range:
1258
1259 Host 192.168.0.?
1260
1261 A pattern-list is a comma-separated list of patterns. Patterns within
1262 pattern-lists may be negated by preceding them with an exclamation mark
1263 (‘!’). For example, to allow a key to be used from anywhere within an
1264 organization except from the "dialup" pool, the following entry (in au‐
1265 thorized_keys) could be used:
1266
1267 from="!*.dialup.example.com,*.example.com"
1268
1269 Note that a negated match will never produce a positive result by itself.
1270 For example, attempting to match "host3" against the following pattern-
1271 list will fail:
1272
1273 from="!host1,!host2"
1274
1275 The solution here is to include a term that will yield a positive match,
1276 such as a wildcard:
1277
1278 from="!host1,!host2,*"
1279
1281 Arguments to some keywords can make use of tokens, which are expanded at
1282 runtime:
1283
1284 %% A literal ‘%’.
1285 %C Hash of %l%h%p%r.
1286 %d Local user's home directory.
1287 %f The fingerprint of the server's host key.
1288 %H The known_hosts hostname or address that is being searched
1289 for.
1290 %h The remote hostname.
1291 %I A string describing the reason for a KnownHostsCommand execu‐
1292 tion: either ADDRESS when looking up a host by address (only
1293 when CheckHostIP is enabled), HOSTNAME when searching by
1294 hostname, or ORDER when preparing the host key algorithm
1295 preference list to use for the destination host.
1296 %i The local user ID.
1297 %K The base64 encoded host key.
1298 %k The host key alias if specified, otherwise the original re‐
1299 mote hostname given on the command line.
1300 %L The local hostname.
1301 %l The local hostname, including the domain name.
1302 %n The original remote hostname, as given on the command line.
1303 %p The remote port.
1304 %r The remote username.
1305 %T The local tun(4) or tap(4) network interface assigned if tun‐
1306 nel forwarding was requested, or "NONE" otherwise.
1307 %t The type of the server host key, e.g. ssh-ed25519.
1308 %u The local username.
1309
1310 CertificateFile, ControlPath, IdentityAgent, IdentityFile,
1311 KnownHostsCommand, LocalForward, Match exec, RemoteCommand,
1312 RemoteForward, and UserKnownHostsFile accept the tokens %%, %C, %d, %h,
1313 %i, %k, %L, %l, %n, %p, %r, and %u.
1314
1315 KnownHostsCommand additionally accepts the tokens %f, %H, %I, %K and %t.
1316
1317 Hostname accepts the tokens %% and %h.
1318
1319 LocalCommand accepts all tokens.
1320
1321 ProxyCommand accepts the tokens %%, %h, %n, %p, and %r.
1322
1324 Arguments to some keywords can be expanded at runtime from environment
1325 variables on the client by enclosing them in ${}, for example
1326 ${HOME}/.ssh would refer to the user's .ssh directory. If a specified
1327 environment variable does not exist then an error will be returned and
1328 the setting for that keyword will be ignored.
1329
1330 The keywords CertificateFile, ControlPath, IdentityAgent, IdentityFile,
1331 KnownHostsCommand, and UserKnownHostsFile support environment variables.
1332 The keywords LocalForward and RemoteForward support environment variables
1333 only for Unix domain socket paths.
1334
1336 ~/.ssh/config
1337 This is the per-user configuration file. The format of this file
1338 is described above. This file is used by the SSH client. Be‐
1339 cause of the potential for abuse, this file must have strict per‐
1340 missions: read/write for the user, and not writable by others.
1341
1342 /etc/gsissh/ssh_config
1343 Systemwide configuration file. This file provides defaults for
1344 those values that are not specified in the user's configuration
1345 file, and for those users who do not have a configuration file.
1346 This file must be world-readable.
1347
1349 ssh(1)
1350
1352 OpenSSH is a derivative of the original and free ssh 1.2.12 release by
1353 Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo
1354 de Raadt and Dug Song removed many bugs, re-added newer features and cre‐
1355 ated OpenSSH. Markus Friedl contributed the support for SSH protocol
1356 versions 1.5 and 2.0.
1357
1358BSD September 25, 2021 BSD