ssh_cfg/
ssh_option_key.rs

1use std::{fmt, str::FromStr};
2
3use crate::ConfigError;
4
5/// SSH option keys inside the SSH configuration file.
6///
7/// See <https://linux.die.net/man/5/ssh_config>
8#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
9pub enum SshOptionKey {
10    /// Restricts the following declarations (up to the next `Host` keyword) to
11    /// be only for those hosts that match one of the patterns given after
12    /// the keyword.
13    ///
14    /// If more than one pattern is provided, they should be separated
15    /// by whitespace. A single `*` as a pattern can be used to provide global
16    /// defaults for all hosts. The host is the hostname argument given on the
17    /// command line (i.e. the name is not converted to a canonicalized host
18    /// name before matching).
19    ///
20    /// See [Patterns](index.html#patterns) for more information on patterns.
21    Host,
22
23    /// Specifies what environment variables sent by the client will be copied
24    /// into the session's environ(7).
25    ///
26    /// See `SendEnv` and `SetEnv` in ssh_config(5) for how to configure the
27    /// client. The `TERM` environment variable is always accepted whenever the
28    /// client requests a pseudo-terminal as it is required by the protocol.
29    /// Variables are specified by name, which may contain the wildcard
30    /// characters `*` and `?`. Multiple environment variables may be separated
31    /// by whitespace or spread across multiple AcceptEnv directives. Be warned
32    /// that some environment variables could be used to bypass restricted user
33    /// environments. For this reason, care should be taken in the use of this
34    /// directive. The default is not to accept any environment variables.
35    AcceptEnv,
36
37    /// Specifies whether keys should be automatically added to a running
38    /// ssh-agent(1).
39    ///
40    /// If this option is set to yes and a key is loaded from a
41    /// file, the key and its passphrase are added to the agent with the default
42    /// lifetime, as if by ssh-add(1). If this option is set to ask, ssh(1)
43    /// will require confirmation using the SSH_ASKPASS program before adding a
44    /// key (see ssh-add(1) for details). If this option is set to confirm,
45    /// each use of the key must be confirmed, as if the -c option was specified
46    /// to ssh-add(1). If this option is set to no, no keys are added to the
47    /// agent. Alternately, this option may be specified as a time interval
48    /// using the format described in the TIME FORMATS section of sshd_config(5)
49    /// to specify the key's lifetime in ssh-agent(1), after which it will
50    /// automatically be removed. The argument must be no (the default), yes,
51    /// confirm (optionally followed by a time interval), ask or a time
52    /// interval.
53    AddKeysToAgent,
54
55    /// Specifies which address family to use when connecting.
56    ///
57    /// Valid arguments are `any`, `inet` (use IPv4 only), or `inet6` (use IPv6
58    /// only).
59    AddressFamily,
60
61    /// Specifies whether ssh-agent(1) forwarding is permitted.
62    ///
63    /// The default is `yes`. Note that disabling agent forwarding does not
64    /// improve security unless users are also denied shell access, as they can
65    /// always install their own forwarders.
66    AllowAgentForwarding,
67
68    /// This keyword can be followed by a list of group name patterns, separated
69    /// by spaces.
70    ///
71    /// If specified, login is allowed only for users whose primary group or
72    /// supplementary group list matches one of the patterns. Only group names
73    /// are valid; a numerical group ID is not recognized. By default, login is
74    /// allowed for all groups. The allow/deny directives are processed in the
75    /// following order: `DenyUsers`, `AllowUsers`, `DenyGroups`, and finally
76    /// `AllowGroups`.
77    ///
78    /// See `PATTERNS` in ssh_config(5) for more information on patterns.
79    AllowGroups,
80
81    /// Specifies whether `StreamLocal` (Unix-domain socket) forwarding is
82    /// permitted.
83    ///
84    /// The available options are `yes` (the default) or `all` to allow
85    /// `StreamLocal` forwarding, `no` to prevent all `StreamLocal` forwarding,
86    /// `local` to allow local (from the perspective of ssh(1)) forwarding only
87    /// or `remote` to allow remote forwarding only. Note that disabling
88    /// `StreamLocal` forwarding does not improve security unless users are also
89    /// denied shell access, as they can always install their own forwarders.
90    AllowStreamLocalForwarding,
91
92    /// Specifies whether TCP forwarding is permitted.
93    ///
94    /// The available options are yes (the default) or all to allow TCP
95    /// forwarding, no to prevent all TCP forwarding, local to allow local (from
96    /// the perspective of ssh(1)) forwarding only or remote to allow remote
97    /// forwarding only. Note that disabling TCP forwarding does not improve
98    /// security unless users are also denied shell access, as they can always
99    /// install their own forwarders.
100    AllowTcpForwarding,
101
102    /// This keyword can be followed by a list of user name patterns, separated
103    /// by spaces.
104    ///
105    /// If specified, login is allowed only for user names that match one of the
106    /// patterns. Only user names are valid; a numerical user ID is not
107    /// recognized. By default, login is allowed for all users. If the pattern
108    /// takes the form `USER@HOST` then `USER` and `HOST` are separately
109    /// checked, restricting logins to particular users from particular hosts.
110    /// HOST criteria may additionally contain addresses to match in CIDR
111    /// address/masklen format. The allow/deny directives are processed in the
112    /// following order: `DenyUsers`, `AllowUsers`, `DenyGroups`, and finally
113    /// `AllowGroups`.
114    ///
115    /// See `PATTERNS` in ssh_config(5) for more information on patterns.
116    AllowUsers,
117
118    /// Specifies the authentication methods that must be successfully completed
119    /// for a user to be granted access.
120    ///
121    /// This option must be followed by one or more lists of comma-separated
122    /// authentication method names, or by the single string any to indicate the
123    /// default behaviour of accepting any single authentication method. If the
124    /// default is overridden, then successful authentication requires
125    /// completion of every method in at least one of these lists.
126    ///
127    /// For example, `"publickey,password publickey,keyboard-interactive"` would
128    /// require the user to complete public key authentication, followed by
129    /// either password or keyboard interactive authentication. Only methods
130    /// that are next in one or more lists are offered at each stage, so for
131    /// this example it would not be possible to attempt password or
132    /// keyboard-interactive authentication before public key.
133    ///
134    /// For keyboard interactive authentication it is also possible to restrict
135    /// authentication to a specific device by appending a colon followed by the
136    /// device identifier bsdauth or pam. depending on the server configuration.
137    /// For example, "keyboard-interactive:bsdauth" would restrict keyboard
138    /// interactive authentication to the bsdauth device.
139    ///
140    /// If the publickey method is listed more than once, sshd(8) verifies that
141    /// keys that have been used successfully are not reused for subsequent
142    /// authentications. For example, "publickey,publickey" requires successful
143    /// authentication using two different public keys.
144    ///
145    /// Note that each authentication method listed should also be explicitly
146    /// enabled in the configuration.
147    ///
148    /// The available authentication methods are: "gssapi-with-mic",
149    /// "hostbased", "keyboard-interactive", "none" (used for access to
150    /// password-less accounts when PermitEmptyPasswords is enabled), "password"
151    /// and "publickey".
152    AuthenticationMethods,
153
154    /// Specifies a program to be used to look up the user's public keys.
155    ///
156    /// The program must be owned by root, not writable by group or others and
157    /// specified by an absolute path. Arguments to `AuthorizedKeysCommand`
158    /// accept the tokens described in the TOKENS section. If no arguments are
159    /// specified then the username of the target user is used.
160    ///
161    /// The program should produce on standard output zero or more lines of
162    /// authorized_keys output (see `AUTHORIZED_KEYS` in sshd(8)). If a key
163    /// supplied by `AuthorizedKeysCommand` does not successfully authenticate
164    /// and authorize the user then public key authentication continues using
165    /// the usual `AuthorizedKeysFile` files. By default, no
166    /// `AuthorizedKeysCommand` is run.
167    AuthorizedKeysCommand,
168
169    /// Specifies the user under whose account the `AuthorizedKeysCommand` is
170    /// run.
171    ///
172    /// It is recommended to use a dedicated user that has no other role on the
173    /// host than running authorized keys commands. If `AuthorizedKeysCommand`
174    /// is specified but AuthorizedKeysCommandUser is not, then sshd(8) will
175    /// refuse to start.
176    AuthorizedKeysCommandUser,
177
178    /// Specifies the file that contains the public keys used for user
179    /// authentication.
180    ///
181    /// The format is described in the `AUTHORIZED_KEYS` FILE FORMAT section of
182    /// sshd(8). Arguments to `AuthorizedKeysFile` accept the tokens described
183    /// in the TOKENS section. After expansion, `AuthorizedKeysFile` is taken to
184    /// be an absolute path or one relative to the user's home directory.
185    /// Multiple files may be listed, separated by whitespace. Alternately this
186    /// option may be set to `none` to skip checking for user keys in files. The
187    /// default is ".ssh/authorized_keys .ssh/authorized_keys2".
188    AuthorizedKeysFile,
189
190    /// Specifies a program to be used to generate the list of allowed
191    /// certificate principals as per `AuthorizedPrincipalsFile`.
192    ///
193    /// The program must be owned by root, not writable by group or others and
194    /// specified by an absolute path. Arguments to
195    /// `AuthorizedPrincipalsCommand` accept the tokens described in the TOKENS
196    /// section. If no arguments are specified then the username of the target
197    /// user is used.
198    ///
199    /// The program should produce on standard output zero or more lines of
200    /// `AuthorizedPrincipalsFile` output. If either
201    /// `AuthorizedPrincipalsCommand` or `AuthorizedPrincipalsFile` is
202    /// specified, then certificates offered by the client for authentication
203    /// must contain a principal that is listed. By default, no
204    /// AuthorizedPrincipalsCommand is run.
205    AuthorizedPrincipalsCommand,
206
207    /// Specifies the user under whose account the `AuthorizedPrincipalsCommand`
208    /// is run.
209    ///
210    /// It is recommended to use a dedicated user that has no other role on the
211    /// host than running authorized principals commands. If
212    /// `AuthorizedPrincipalsCommand` is specified but
213    /// `AuthorizedPrincipalsCommandUser` is not, then sshd(8) will refuse to
214    /// start.
215    AuthorizedPrincipalsCommandUser,
216
217    /// Specifies a file that lists principal names that are accepted for
218    /// certificate authentication.
219    ///
220    /// When using certificates signed by a key listed in `TrustedUserCAKeys`,
221    /// this file lists names, one of which must appear in the certificate for
222    /// it to be accepted for authentication. Names are listed one per line
223    /// preceded by key options (as described in AUTHORIZED_KEYS FILE FORMAT in
224    /// sshd(8)). Empty lines and comments starting with `#` are ignored.
225    ///
226    /// Arguments to `AuthorizedPrincipalsFile` accept the tokens described in
227    /// the TOKENS section. After expansion, `AuthorizedPrincipalsFile` is taken
228    /// to be an absolute path or one relative to the user's home directory. The
229    /// default is none, i.e. not to use a principals file - in this case, the
230    /// username of the user must appear in a certificate's principals list for
231    /// it to be accepted.
232    ///
233    /// Note that `AuthorizedPrincipalsFile` is only used when authentication
234    /// proceeds using a CA listed in `TrustedUserCAKeys` and is not consulted
235    /// for certification authorities trusted via `~/.ssh/authorized_keys`,
236    /// though the `principals=key` option offers a similar facility (see
237    /// sshd(8) for details).
238    AuthorizedPrincipalsFile,
239
240    /// The contents of the specified file are sent to the remote user before
241    /// authentication is allowed.
242    ///
243    /// If the argument is none then no banner is displayed. By default, no
244    /// banner is displayed.
245    Banner,
246
247    /// If set to `yes`, passphrase/password querying will be disabled.
248    ///
249    /// This option is useful in scripts and other batch jobs where no user is
250    /// present to supply the password. The argument must be `yes` or `no`.
251    /// The default is `no`.
252    BatchMode,
253
254    /// Use the specified address on the local machine as the source address of
255    /// the connection.
256    ///
257    /// Only useful on systems with more than one address. Note
258    /// that this option does not work if UsePrivilegedPort is set to `yes`.
259    BindAddress,
260
261    /// Use the address of the specified interface on the local machine as the
262    /// source address of the connection.
263    BindInterface,
264
265    /// When CanonicalizeHostname is enabled, this option specifies the list of
266    /// domain suffixes in which to search for the specified destination host.
267    CanonicalDomains,
268
269    /// Specifies whether to fail with an error when hostname canonicalization
270    /// fails. The default, yes, will attempt to look up the unqualified
271    /// hostname using the system resolver's search rules. A value of no will
272    /// cause ssh(1) to fail instantly if CanonicalizeHostname is enabled and
273    /// the target hostname cannot be found in any of the domains specified by
274    /// CanonicalDomains.
275    CanonicalizeFallbackLocal,
276
277    /// Controls whether explicit hostname canonicalization is performed.
278    ///
279    /// The default, `no`, is not to perform any name rewriting and let the
280    /// system resolver handle all hostname lookups. If set to `yes` then,
281    /// for connections that do not use a `ProxyCommand` or ProxyJump, ssh(1)
282    /// will attempt to canonicalize the hostname specified on the command
283    /// line using the CanonicalDomains suffixes and
284    /// `CanonicalizePermittedCNAMEs` rules. If `CanonicalizeHostname` is set
285    /// to `always`, then canonicalization is applied to proxied connections
286    /// too.
287    ///
288    /// If this option is enabled, then the configuration files are processed
289    /// again using the new target name to pick up any new configuration in
290    /// matching Host and Match stanzas. A value of none disables the use of a
291    /// ProxyJump host.
292    CanonicalizeHostname,
293
294    /// Specifies the maximum number of dot characters in a hostname before
295    /// canonicalization is disabled. The default, 1, allows a single dot (i.e.
296    /// hostname.subdomain).
297    CanonicalizeMaxDots,
298
299    /// Specifies rules to determine whether CNAMEs should be followed when
300    /// canonicalizing hostnames.
301    ///
302    /// The rules consist of one or more arguments of
303    /// `source_domain_list:target_domain_list`, where source_domain_list is a
304    /// pattern-list of domains that may follow CNAMEs in canonicalization, and
305    /// target_domain_list is a pattern-list of domains that they may resolve
306    /// to.
307    ///
308    /// For example, `"*.a.example.com:*.b.example.com,*.c.example.com"` will
309    /// allow hostnames matching `"*.a.example.com"` to be canonicalized to
310    /// names in the `"*.b.example.com"` or `"*.c.example.com"` domains.
311    CanonicalizePermittedCNAMEs,
312
313    /// Specifies which algorithms are allowed for signing of
314    /// certificates by certificate authorities (CAs).
315    ///
316    /// The default
317    /// is:
318    ///
319    /// ```text
320    /// ssh-ed25519,
321    /// ecdsa-sha2-nistp256,
322    /// ecdsa-sha2-nistp384,
323    /// ecdsa-sha2-nistp521,
324    /// sk-ssh-ed25519@openssh.com,
325    /// sk-ecdsa-sha2-nistp256@openssh.com,
326    /// rsa-sha2-512,
327    /// rsa-sha2-256
328    /// ```
329    ///
330    /// If the specified list begins with a `+` character, then the specified
331    /// algorithms will be appended to the default set instead of replacing
332    /// them. If the specified list begins with a `-` character, then the
333    /// specified algorithms (including wildcards) will be removed from the
334    /// default set instead of replacing them.
335    ///
336    /// ssh(1) will not accept host certificates signed using algorithms other
337    /// than those specified.
338    CASignatureAlgorithms,
339
340    /// Specifies a file from which the user's certificate is read.
341    ///
342    /// A corresponding private key must be provided separately in order to use
343    /// this certificate either from an IdentityFile directive or -i flag to
344    /// ssh(1), via ssh-agent(1), or via a `PKCS11Provider` or
345    /// `SecurityKeyProvider`.
346    ///
347    /// Arguments to CertificateFile may use the tilde syntax to refer to a
348    /// user's home directory, the tokens described in the TOKENS section and
349    /// environment variables as described in the ENVIRONMENT VARIABLES section.
350    ///
351    /// It is possible to have multiple certificate files specified in
352    /// configuration files; these certificates will be tried in sequence.
353    /// Multiple CertificateFile directives will add to the list of certificates
354    /// used for authentication.
355    CertificateFile,
356
357    /// Specifies whether to use challenge-response authentication.
358    ///
359    /// The argument to this keyword must be `yes` or `no`. The default is
360    /// `yes`.
361    ChallengeResponseAuthentication,
362
363    /// If this flag is set to `yes`, ssh(1) will additionally check the host
364    /// IP address in the known_hosts file.
365    ///
366    /// This allows ssh to detect if a host key changed due to DNS spoofing. If
367    /// the option is set to `no`, the check will not be executed. The default
368    /// is `yes`.
369    CheckHostIP,
370
371    /// Specifies the pathname of a directory to chroot(2) to after
372    /// authentication.
373    ///
374    /// At session startup sshd(8) checks that all components of the pathname
375    /// are root-owned directories which are not writable by any other user or
376    /// group. After the chroot, sshd(8) changes the working directory to the
377    /// user's home directory. Arguments to ChrootDirectory accept the tokens
378    /// described in the TOKENS section.
379    ///
380    /// The ChrootDirectory must contain the necessary files and directories to
381    /// support the user's session. For an interactive session this requires at
382    /// least a shell, typically sh(1), and basic `/dev` nodes such as null(4),
383    /// zero(4), stdin(4), stdout(4), stderr(4), and tty(4) devices. For file
384    /// transfer sessions using SFTP no additional configuration of the
385    /// environment is necessary if the inprocess sftp-server is used, though
386    /// sessions which use logging may require `/dev/log` inside the chroot
387    /// directory on some operating systems (see sftp-server(8) for details).
388    ///
389    /// For safety, it is very important that the directory hierarchy be
390    /// prevented from modification by other processes on the system (especially
391    /// those outside the jail). Misconfiguration can lead to unsafe
392    /// environments which sshd(8) cannot detect.
393    ///
394    /// The default is none, indicating not to chroot(2).
395    ChrootDirectory,
396
397    /// Specifies the cipher to use for encrypting the session in protocol
398    /// version 1.
399    ///
400    /// Currently, `blowfish`, `3des`, and `des` are supported. `des` is only
401    /// supported in the ssh(1) client for interoperability with legacy protocol
402    /// 1 implementations that do not support the `3des` cipher. Its use is
403    /// strongly discouraged due to cryptographic weaknesses. The default is
404    /// `3des`.
405    Cipher,
406
407    /// Specifies the ciphers allowed for protocol version 2 in order of
408    /// preference.
409    ///
410    /// Multiple ciphers must be comma-separated. The supported ciphers are
411    /// `3des-cbc`, `aes128-cbc`, `aes192-cbc`, `aes256-cbc`, `aes128-ctr`,
412    /// `aes192-ctr`, `aes256-ctr`, `arcfour128`, `arcfour256`, `arcfour`,
413    /// `blowfish-cbc`, and `cast128-cbc`. The default is:
414    ///
415    /// ```text
416    /// aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,
417    /// aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,
418    /// aes256-cbc,arcfour
419    /// ```
420    Ciphers,
421
422    /// Specifies that all local, remote, and dynamic port forwardings specified
423    /// in the configuration files or on the command line be cleared.
424    ///
425    /// This option is primarily useful when used from the ssh(1) command line
426    /// to clear port forwardings set in configuration files, and is
427    /// automatically set by scp(1) and sftp(1). The argument must be `yes`
428    /// or `no`. The default is `no`.
429    ClearAllForwardings,
430
431    /// Sets the number of client alive messages which may be sent without
432    /// sshd(8) receiving any messages back from the client.
433    ///
434    /// If this threshold is reached while client alive messages are being sent,
435    /// sshd will disconnect the client, terminating the session. It is
436    /// important to note that the use of client alive messages is very
437    /// different from TCPKeepAlive. The client alive messages are sent through
438    /// the encrypted channel and therefore will not be spoofable. The TCP
439    /// keepalive option enabled by TCPKeepAlive is spoofable. The client alive
440    /// mechanism is valuable when the client or server depend on knowing when a
441    /// connection has become inactive.
442    ///
443    /// The default value is 3. If `ClientAliveInterval` is set to 15, and
444    /// `ClientAliveCountMax` is left at the default, unresponsive SSH clients
445    /// will be disconnected after approximately 45 seconds.
446    ClientAliveCountMax,
447
448    /// Sets a timeout interval in seconds after which if no data has been
449    /// received from the client, sshd(8) will send a message through the
450    /// encrypted channel to request a response from the client.
451    ///
452    /// The default is 0, indicating that these messages will not be sent to the
453    /// client.
454    ClientAliveInterval,
455
456    /// Specifies whether to use compression.
457    ///
458    /// The argument must be `yes` or `no`. The default is `no`.
459    Compression,
460
461    /// Specifies the compression level to use if compression is enabled.
462    ///
463    /// The argument must be an integer from 1 (fast) to 9 (slow, best). The
464    /// default level is 6, which is good for most applications. The meaning
465    /// of the values is the same as in gzip(1). Note that this option
466    /// applies to protocol version 1 only.
467    CompressionLevel,
468
469    /// Specifies the number of tries (one per second) to make before exiting.
470    ///
471    /// The argument must be an integer. This may be useful in scripts if the
472    /// connection sometimes fails. The default is 1.
473    ConnectionAttempts,
474
475    /// Specifies the timeout (in seconds) used when connecting to the SSH
476    /// server, instead of using the default system TCP timeout.
477    ///
478    /// This value is used only when the target is down or really unreachable,
479    /// not when it refuses the connection.
480    ConnectTimeout,
481
482    /// Enables the sharing of multiple sessions over a single network
483    /// connection.
484    ///
485    /// When set to `yes`, ssh(1) will listen for connections on a control
486    /// socket specified using the `ControlPath` argument. Additional sessions
487    /// can connect to this socket using the same `ControlPath` with
488    /// `ControlMaster` set to `no` (the default). These sessions will try to
489    /// reuse the master instance's network connection rather than initiating
490    /// new ones, but will fall back to connecting normally if the control
491    /// socket does not exist, or is not listening.
492    ///
493    /// Setting this to `ask` will cause ssh to listen for control
494    /// connections, but require confirmation using the SSH_ASKPASS program
495    /// before they are accepted (see ssh-add(1) for details). If the
496    /// `ControlPath` cannot be opened, ssh will continue without connecting to
497    /// a master instance.
498    ///
499    /// X11 and ssh-agent(1) forwarding is supported over these multiplexed
500    /// connections, however the display and agent forwarded will be the one
501    /// belonging to the master connection i.e. it is not possible to forward
502    /// multiple displays or agents.
503    ///
504    /// Two additional options allow for opportunistic multiplexing: try to use
505    /// a master connection but fall back to creating a new one if one does not
506    /// already exist. These options are: `auto` and `autoask`. The latter
507    /// requires confirmation like the `ask` option.
508    ControlMaster,
509
510    /// Specify the path to the control socket used for connection sharing as
511    /// described in the `ControlMaster` section above or the string `none` to
512    /// disable connection sharing.
513    ///
514    /// In the path, `%l` will be substituted by the local host name, `%h` will
515    /// be substituted by the target host name, `%p` the port, and `%r` by
516    /// the remote login username. It is recommended that any `ControlPath`
517    /// used for opportunistic connection sharing include at least `%h`, `%p`,
518    /// and `%r. This ensures that shared connections are uniquely identified.
519    ControlPath,
520
521    /// When used in conjunction with ControlMaster, specifies that the master
522    /// connection should remain open in the background (waiting for future
523    /// client connections) after the initial client connection has been
524    /// closed. If set to no (the default), then the master connection will
525    /// not be placed into the background, and will close as soon as the
526    /// initial client connection  is closed. If set to yes or 0, then the
527    /// master connection will remain in the background indefinitely (until
528    /// killed or closed via a mechanism such as the "ssh -O exit"). If set
529    /// to a time in seconds, or a time in any of the formats documented in
530    /// sshd_config(5), then the backgrounded master connection will
531    /// automatically terminate after it has remained idle (with no client
532    /// connections) for the specified time.
533    ControlPersist,
534
535    /// This keyword can be followed by a list of group name patterns, separated
536    /// by spaces.
537    ///
538    /// Login is disallowed for users whose primary group or supplementary group
539    /// list matches one of the patterns. Only group names are valid; a
540    /// numerical group ID is not recognized. By default, login is allowed for
541    /// all groups. The allow/deny directives are processed in the following
542    /// order: DenyUsers, AllowUsers, DenyGroups, and finally AllowGroups.
543    ///
544    /// See `PATTERNS` in ssh_config(5) for more information on patterns.
545    DenyGroups,
546
547    /// This keyword can be followed by a list of user name patterns, separated
548    /// by spaces.
549    ///
550    /// Login is disallowed for user names that match one of the patterns. Only
551    /// user names are valid; a numerical user ID is not recognized. By default,
552    /// login is allowed for all users. If the pattern takes the form USER@HOST
553    /// then USER and HOST are separately checked, restricting logins to
554    /// particular users from particular hosts. HOST criteria may additionally
555    /// contain addresses to match in CIDR address/masklen format. The
556    /// allow/deny directives are processed in the following order: `DenyUsers`,
557    /// `AllowUsers`, `DenyGroups`, and finally `AllowGroups`.
558    ///
559    /// See `PATTERNS` in ssh_config(5) for more information on patterns.
560    DenyUsers,
561
562    /// Disables all forwarding features, including X11, ssh-agent(1), TCP and
563    /// `StreamLocal`.
564    ///
565    /// This option overrides all other forwarding related options and may
566    /// simplify restricted configurations.
567    DisableForwarding,
568
569    /// Specifies that a TCP port on the local machine be forwarded over the
570    /// secure channel, and the application protocol is then used to determine
571    /// where to connect to from the remote machine.
572    ///
573    /// The argument must be `[bind_address:]port`. IPv6 addresses can be
574    /// specified by enclosing addresses in square brackets or by using an
575    /// alternative syntax: `[bind_address/]port`. By default, the local port is
576    /// bound in accordance with the `GatewayPorts` setting. However, an
577    /// explicit bind_address may be used to bind the connection to a specific
578    /// address. The bind_address of `localhost` indicates that the listening
579    /// port be bound for local use only, while an empty address or `*`
580    /// indicates that the port should be available from all interfaces.
581    ///
582    /// Currently the `SOCKS4` and `SOCKS5` protocols are supported, and ssh(1)
583    /// will act as a `SOCKS` server. Multiple forwardings may be specified,
584    /// and additional forwardings can be given on the command line. Only
585    /// the superuser can forward privileged ports.
586    DynamicForward,
587
588    /// Setting this option to `yes` in the global client configuration file
589    /// `/etc/ssh/ssh_config` enables the use of the helper program
590    /// ssh-keysign(8) during `HostbasedAuthentication`.
591    ///
592    /// The argument must be `yes` or `no`. The default is `no`. This option
593    /// should be placed in the non-hostspecific section. See ssh-keysign(8)
594    /// for more information.
595    EnableSSHKeysign,
596
597    /// Sets the escape character (default: '~').
598    ///
599    /// The escape character can also be set on the command line. The argument
600    /// should be a single character, '^' followed by a letter, or `none` to
601    /// disable the escape character entirely (making the connection transparent
602    /// for binary data).
603    EscapeChar,
604
605    /// Specifies whether ssh(1) should terminate the connection if it cannot
606    /// set up all requested dynamic, tunnel, local, and remote port
607    /// forwardings.
608    ///
609    /// The argument must be `yes` or `no`. The default is `no`.
610    ExitOnForwardFailure,
611
612    /// Writes a temporary file containing a list of authentication methods and
613    /// public credentials (e.g. keys) used to authenticate the user.
614    ///
615    /// The location of the file is exposed to the user session through the
616    /// `SSH_USER_AUTH` environment variable. The default is no.
617    ExposeAuthInfo,
618
619    /// Specifies the hash algorithm used when displaying key fingerprints.
620    /// Valid options are: md5 and sha256 (the default).
621    FingerprintHash,
622
623    /// Forces the execution of the command specified by `ForceCommand`,
624    /// ignoring any command supplied by the client and `~/.ssh/rc` if present.
625    ///
626    /// The command is invoked by using the user's login shell with the `-c`
627    /// option. This applies to shell, command, or subsystem execution. It is
628    /// most useful inside a Match block. The command originally supplied by the
629    /// client is available in the `SSH_ORIGINAL_COMMAND` environment variable.
630    /// Specifying a command of internal-sftp will force the use of an
631    /// in-process SFTP server that requires no support files when used with
632    /// ChrootDirectory. The default is none.
633    ForceCommand,
634
635    /// Requests ssh to go to background just before command execution. This is
636    /// useful if ssh is going to ask for passwords or passphrases, but the user
637    /// wants it in the background. This implies the StdinNull configuration
638    /// option being set to `yes`. The recommended way to start X11 programs at
639    /// a remote site is with something like ssh -f host xterm, which is the
640    /// same as ssh host xterm if the ForkAfterAuthentication configuration
641    /// option is set to `yes`.
642    ///
643    /// If the ExitOnForwardFailure configuration option is set to `yes`, then a
644    /// client started with the ForkAfterAuthentication configuration option
645    /// being set to `yes` will wait for all remote port forwards to be
646    /// successfully established before placing itself in the background. The
647    /// argument to this keyword must be yes (same as the -f option) or no (the
648    /// default).
649    ForkAfterAuthentication,
650
651    /// Specifies whether the connection to the authentication agent (if any)
652    /// will be forwarded to the remote machine.
653    ///
654    /// The argument must be `yes` or `no`. The default is `no`.
655    ///
656    /// Agent forwarding should be enabled with caution. Users with the ability
657    /// to bypass file permissions on the remote host (for the agent's
658    /// Unix-domain socket) can access the local agent through the forwarded
659    /// connection. An attacker cannot obtain key material from the agent,
660    /// however they can perform operations on the keys that enable them to
661    /// authenticate using the identities loaded into the agent.
662    ForwardAgent,
663
664    /// Specifies whether X11 connections will be automatically redirected over
665    /// the secure channel and DISPLAY set.
666    ///
667    /// The argument must be `yes` or `no`. The default is `no`.
668    ///
669    /// X11 forwarding should be enabled with caution. Users with the ability to
670    /// bypass file permissions on the remote host (for the user's X11
671    /// authorization database) can access the local X11 display through the
672    /// forwarded connection. An attacker may then be able to perform activities
673    /// such as keystroke monitoring if the ForwardX11Trusted option is also
674    /// enabled.
675    ForwardX11,
676
677    /// Specify a timeout for untrusted X11 forwarding using the format
678    /// described in the TIME FORMATS section of sshd_config(5). X11 connections
679    /// received by ssh(1) after this time will be refused. Setting
680    /// ForwardX11Timeout to zero will disable the timeout and permit X11
681    /// forwarding for the life of the connection. The default is to disable
682    /// untrusted X11 forwarding after twenty minutes has elapsed.
683    ForwardX11Timeout,
684
685    /// If this option is set to `yes`, remote X11 clients will have full
686    /// access to the original X11 display.
687    ///
688    /// If this option is set to `no`, remote X11 clients will be considered
689    /// untrusted and prevented from stealing or tampering with data belonging
690    /// to trusted X11 clients. Furthermore, the xauth(1) token used for the
691    /// session will be set to expire after 20 minutes. Remote clients will be
692    /// refused access after this time.
693    ///
694    /// The default is `no`.
695    ///
696    /// See the `X11 SECURITY` extension specification for full details on the
697    /// restrictions imposed on untrusted clients.
698    ForwardX11Trusted,
699
700    /// Specifies whether remote hosts are allowed to connect to local forwarded
701    /// ports.
702    ///
703    /// By default, ssh(1) binds local port forwardings to the loopback address.
704    /// This prevents other remote hosts from connecting to forwarded ports.
705    /// `GatewayPorts` can be used to specify that ssh should bind local
706    /// port forwardings to the wildcard address, thus allowing remote hosts to
707    /// connect to forwarded ports. The argument must be `yes` or `no`. The
708    /// default is `no`.
709    GatewayPorts,
710
711    /// Specifies a file to use for the global host key database instead of
712    /// `/etc/ssh/ssh_known_hosts`.
713    GlobalKnownHostsFile,
714
715    /// Specifies whether user authentication based on GSSAPI is allowed.
716    ///
717    /// The default is `no`. Note that this option applies to protocol version 2
718    /// only.
719    GSSAPIAuthentication,
720
721    /// Specifies whether to automatically destroy the user's credentials cache
722    /// on logout.
723    ///
724    /// The default is `yes`.
725    GSSAPICleanupCredentials,
726
727    /// If set, specifies the GSSAPI client identity that ssh should use when
728    /// connecting to the server.
729    ///
730    /// The default is unset, which means that the default identity will be
731    /// used.
732    GSSAPIClientIdentity,
733
734    /// Forward (delegate) credentials to the server.
735    ///
736    /// The default is `no`. Note that this option applies to protocol version 2
737    /// connections using GSSAPI.
738    GSSAPIDelegateCredentials,
739
740    /// Specifies whether key exchange based on GSSAPI may be used.
741    ///
742    /// When using GSSAPI key exchange the server need not have a host key. The
743    /// default is `no`. Note that this option applies to protocol version 2
744    /// only.
745    GSSAPIKeyExchange,
746
747    /// If set to `yes` then renewal of the client's GSSAPI credentials will
748    /// force the rekeying of the ssh connection.
749    ///
750    /// With a compatible server, this can delegate the renewed credentials to a
751    /// session on the server. The default is `no`.
752    GSSAPIRenewalForcesRekey,
753
754    /// Determines whether to be strict about the identity of the GSSAPI
755    /// acceptor a client authenticates against.
756    ///
757    /// If set to `yes` then the client must authenticate against the host
758    /// service on the current hostname. If set to `no` then the client may
759    /// authenticate against any service key stored in the machine's default
760    /// store. This facility is provided to assist with operation on multi homed
761    /// machines. The default is `yes`.
762    GSSAPIStrictAcceptorCheck,
763
764    /// Set to `yes` to indicate that the DNS is trusted to securely
765    /// canonicalize` the name of the host being connected to.
766    ///
767    /// If `no`, the hostname entered on the command line will be passed
768    /// untouched to the GSSAPI library. The default is `no`. This option
769    /// only applies to protocol version 2 connections using GSSAPI.
770    GSSAPITrustDns,
771
772    /// Indicates that ssh(1) should hash host names and addresses when they are
773    /// added to `~/.ssh/known_hosts`.
774    ///
775    /// These hashed names may be used normally by ssh(1) and sshd(8), but they
776    /// do not reveal identifying information should the file's contents be
777    /// disclosed. The default is `no`. Note that existing names and addresses
778    /// in known hosts files will not be converted automatically, but may be
779    /// manually hashed using ssh-keygen(1).
780    HashKnownHosts,
781
782    /// Specifies the signature algorithms that will be used for hostbased
783    /// authentication as a comma-separated list of patterns. Alternately if the
784    /// specified list begins with a `+` character, then the specified signature
785    /// algorithms will be appended to the default set instead of replacing
786    /// them. If the specified list begins with a `-` character, then the
787    /// specified signature algorithms (including wildcards) will be removed
788    /// from the default set instead of replacing them. If the specified list
789    /// begins with a `^` character, then the specified signature algorithms
790    /// will be placed at the head of the default set. The default for this
791    /// option is:
792    ///
793    /// ```text
794    /// ssh-ed25519-cert-v01@openssh.com,
795    /// ecdsa-sha2-nistp256-cert-v01@openssh.com,
796    /// ecdsa-sha2-nistp384-cert-v01@openssh.com,
797    /// ecdsa-sha2-nistp521-cert-v01@openssh.com,
798    /// sk-ssh-ed25519-cert-v01@openssh.com,
799    /// sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,
800    /// rsa-sha2-512-cert-v01@openssh.com,
801    /// rsa-sha2-256-cert-v01@openssh.com,
802    /// ssh-rsa-cert-v01@openssh.com,
803    /// ssh-ed25519,
804    /// ecdsa-sha2-nistp256,
805    /// ecdsa-sha2-nistp384,
806    /// ecdsa-sha2-nistp521,
807    /// sk-ssh-ed25519@openssh.com,
808    /// sk-ecdsa-sha2-nistp256@openssh.com,
809    /// rsa-sha2-512,
810    /// rsa-sha2-256,ssh-rsa
811    /// ```
812    ///
813    /// The -Q option of ssh(1) may be used to list supported signature
814    /// algorithms. This was formerly named `HostbasedKeyTypes`.
815    HostbasedAcceptedAlgorithms,
816
817    /// Specifies the key types that will be accepted for hostbased
818    /// authentication as a list of comma-separated patterns.
819    ///
820    /// Alternately if the specified value begins with a `+` character, then the
821    /// specified key types will be appended to the default set instead of
822    /// replacing them. If the specified value begins with a `-` character, then
823    /// the specified key types (including wildcards) will be removed from the
824    /// default set instead of replacing them.
825    ///
826    /// The default for this option is:
827    ///
828    /// ```text
829    /// ecdsa-sha2-nistp256-cert-v01@openssh.com,
830    /// ecdsa-sha2-nistp384-cert-v01@openssh.com,
831    /// ecdsa-sha2-nistp521-cert-v01@openssh.com,
832    /// ssh-ed25519-cert-v01@openssh.com,
833    /// rsa-sha2-512-cert-v01@openssh.com,
834    /// rsa-sha2-256-cert-v01@openssh.com,
835    /// ssh-rsa-cert-v01@openssh.com,
836    /// ecdsa-sha2-nistp256,
837    /// ecdsa-sha2-nistp384,
838    /// ecdsa-sha2-nistp521,
839    /// ssh-ed25519,
840    /// rsa-sha2-512,
841    /// rsa-sha2-256,
842    /// ssh-rsa
843    /// ```
844    ///
845    /// The list of available key types may also be obtained using `ssh -Q key`.
846    HostbasedAcceptedKeyTypes,
847
848    /// Specifies whether to try rhosts based authentication with public key
849    /// authentication.
850    ///
851    /// The argument must be `yes` or `no`. The default is `no`. This option
852    /// applies to protocol version 2 only and is similar to
853    /// `RhostsRSAAuthentication`.
854    HostbasedAuthentication,
855
856    /// Specifies whether or not the server will attempt to perform a reverse
857    /// name lookup when matching the name in the `~/.shosts`, `rhosts`, and
858    /// `/etc/hosts.equiv` files during `HostbasedAuthentication`.
859    ///
860    /// A setting of `yes` means that sshd(8) uses the name supplied by the
861    /// client rather than attempting to resolve the name from the TCP
862    /// connection itself. The default is `no`.
863    HostbasedUsesNameFromPacketOnly,
864
865    /// Specifies a file containing a public host certificate.
866    ///
867    /// The certificate's public key must match a private host key already
868    /// specified by `HostKey`. The default behaviour of sshd(8) is not to load
869    /// any certificates.
870    HostCertificate,
871
872    /// Specifies a file containing a private host key used by SSH.
873    ///
874    /// The defaults are `/etc/ssh/ssh_host_ecdsa_key`,
875    /// `/etc/ssh/ssh_host_ed25519_key` and `/etc/ssh/ssh_host_rsa_key`.
876    ///
877    /// Note that sshd(8) will refuse to use a file if it is
878    /// group/world-accessible and that the `HostKeyAlgorithms` option restricts
879    /// which of the keys are actually used by sshd(8).
880    ///
881    /// It is possible to have multiple host key files. It is also possible to
882    /// specify public host key files instead. In this case operations on the
883    /// private key will be delegated to an ssh-agent(1).
884    HostKey,
885
886    /// Identifies the UNIX-domain socket used to communicate with an agent that
887    /// has access to the private host keys.
888    ///
889    /// If the string
890    /// SSH_AUTH_SOCK" is specified, the location of the socket will be
891    /// read from the `SSH_AUTH_SOCK` environment variable.
892    HostKeyAgent,
893
894    /// Specifies the protocol version 2 host key algorithms that the client
895    /// wants to use in order of preference.
896    ///
897    /// The default for this option is: `ssh-rsa,ssh-dss`.
898    HostKeyAlgorithms,
899
900    /// Specifies an alias that should be used instead of the real host name
901    /// when looking up or saving the host key in the host key database files.
902    ///
903    /// This option is useful for tunneling SSH connections or for multiple
904    /// servers running on a single host.
905    HostKeyAlias,
906
907    /// Specifies the real host name to log into. This can be used to specify
908    /// nicknames or abbreviations for hosts. Arguments to Hostname accept the
909    /// tokens described in the TOKENS section. Numeric IP addresses are also
910    /// permitted (both on the command line and in Hostname specifications). The
911    /// default is the name given on the command line.
912    Hostname,
913
914    /// Specifies the real host name to log into.
915    ///
916    /// This can be used to specify nicknames or abbreviations for hosts. The
917    /// default is the name given on the command line. Numeric IP addresses
918    /// are also permitted (both on the command line and in `HostName`
919    /// specifications).
920    HostName,
921
922    /// Specifies that ssh(1) should only use the authentication identity files
923    /// configured in the ssh_config files, even if ssh-agent(1) offers more
924    /// identities.
925    ///
926    /// The argument to this keyword must be `yes` or `no`. This option is
927    /// intended for situations where `ssh-agent` offers many different
928    /// identities. The default is `no`.
929    IdentitiesOnly,
930
931    /// Specifies the UNIX-domain socket used to communicate with the
932    /// authentication agent.
933    ///
934    /// This option overrides the `SSH_AUTH_SOCK` environment variable and can
935    /// be used to select a specific agent. Setting the socket name to none
936    /// disables the use of an authentication agent. If the string
937    /// `"SSH_AUTH_SOCK"` is specified, the location of the socket will be read
938    /// from the `SSH_AUTH_SOCK` environment variable. Otherwise if the
939    /// specified value begins with a `$` character, then it will be treated
940    /// as an environment variable containing the location of the socket.
941    ///
942    /// Arguments to IdentityAgent may use the tilde syntax to refer to a user's
943    /// home directory, the tokens described in the TOKENS section and
944    /// environment variables as described in the ENVIRONMENT VARIABLES section.
945    IdentityAgent,
946
947    /// Specifies a file from which the user's RSA or DSA authentication
948    /// identity is read.
949    ///
950    /// The default is `~/.ssh/identity` for protocol version 1, and
951    /// `~/.ssh/id_rsa` and `~/.ssh/id_dsa` for protocol version 2.
952    /// Additionally, any identities represented by the authentication agent
953    /// will be used for authentication.
954    ///
955    /// The file name may use the tilde syntax to refer to a user's home
956    /// directory or one of the following escape characters: `%d` (local user's
957    /// home directory), `%u` (local user name), `%l` (local host name), `%h`
958    /// (remote host name) or `%r` (remote user name).
959    ///
960    /// It is possible to have multiple identity files specified in
961    /// configuration files; all these identities will be tried in sequence.
962    IdentityFile,
963
964    /// Specifies that .rhosts and .shosts files will not be used in
965    /// `HostbasedAuthentication`.
966    ///
967    /// `/etc/hosts.equiv` and `/etc/ssh/shosts.equiv` are still used. The
968    /// default is `yes`.
969    IgnoreRhosts,
970
971    /// Specifies a pattern-list of unknown options to be ignored if they are
972    /// encountered in configuration parsing. This may be used to suppress
973    /// errors if ssh_config contains options that are unrecognised by ssh(1).
974    /// It is recommended that IgnoreUnknown be listed early in the
975    /// configuration file as it will not be applied to unknown options that
976    /// appear before it.
977    IgnoreUnknown,
978
979    /// Specifies whether sshd(8) should ignore the user's `~/.ssh/known_hosts`
980    /// during `HostbasedAuthentication` and use only the system-wide known
981    /// hosts file `/etc/ssh/known_hosts`.
982    ///
983    /// The default is `no`.
984    IgnoreUserKnownHosts,
985
986    /// Include the specified configuration file(s). Multiple pathnames may be
987    /// specified and each pathname may contain glob(7) wildcards and, for user
988    /// configurations, shell-like `~` references to user home directories.
989    /// Wildcards will be expanded and processed in lexical order. Files without
990    /// absolute paths are assumed to be in `~/.ssh` if included in a user
991    /// configuration file or `/etc/ssh` if included from the system
992    /// configuration file. Include directive may appear inside a Match or
993    /// Host block to perform conditional inclusion.
994    Include,
995
996    /// Specifies the IPv4 type-of-service or DSCP class for connections.
997    ///
998    /// Accepted values are `af11`, `af12`, `af13`, `af21`, `af22`, `af23`,
999    /// `af31`, `af32`, `af33`, `af41`, `af42`, `af43`, `cs0`, `cs1`, `cs2`,
1000    /// `cs3`, `cs4`, `cs5`, `cs6`, `cs7`, `ef`, `le`, `lowdelay`, `throughput`,
1001    /// `reliability`, a numeric value, or `none` to use the operating system
1002    /// default. This option may take one or two arguments, separated by
1003    /// whitespace. If one argument is specified, it is used as the packet class
1004    /// unconditionally. If two values are specified, the first is automatically
1005    /// selected for interactive sessions and the second for non-interactive
1006    /// sessions. The default is `af21` (Low-Latency Data) for interactive
1007    /// sessions and `cs1` (Lower Effort) for non-interactive sessions.
1008    IPQoS,
1009
1010    /// Specifies whether to use keyboard-interactive authentication.
1011    ///
1012    /// The argument to this keyword must be `yes` or `no`. The default is
1013    /// `yes`.
1014    KbdInteractiveAuthentication,
1015
1016    /// Specifies the list of methods to use in keyboard-interactive
1017    /// authentication.
1018    ///
1019    /// Multiple method names must be comma-separated. The default is to use the
1020    /// server specified list. The methods available vary depending on what
1021    /// the server supports. For an OpenSSH server, it may be zero or more
1022    /// of: `bsdauth`, `pam`, and `skey`.
1023    KbdInteractiveDevices,
1024
1025    /// Specifies whether the password provided by the user for
1026    /// `PasswordAuthentication` will be validated through the Kerberos KDC.
1027    ///
1028    /// To use this option, the server needs a Kerberos servtab which allows the
1029    /// verification of the KDC's identity. The default is `no`.
1030    KerberosAuthentication,
1031
1032    /// If AFS is active and the user has a Kerberos 5 TGT, attempt to
1033    /// acquire an AFS token before accessing the user's home directory.
1034    ///
1035    /// The default is `no`.
1036    KerberosGetAFSToken,
1037
1038    /// If password authentication through Kerberos fails then the password will
1039    /// be validated via any additional local mechanism such as `/etc/passwd`.
1040    ///
1041    /// The default is `yes`.
1042    KerberosOrLocalPasswd,
1043
1044    /// Specifies whether to automatically destroy the user's ticket
1045    /// cache file on logout. The default is `yes`.
1046    KerberosTicketCleanup,
1047
1048    /// Specifies the available KEX (Key Exchange) algorithms.
1049    ///
1050    /// Multiple algorithms must be comma-separated. If the specified list
1051    /// begins with a `+` character, then the specified methods will be appended
1052    /// to the default set instead of replacing them. If the specified list
1053    /// begins with a `-` character, then the specified methods (including
1054    /// wildcards) will be removed from the default set instead of replacing
1055    /// them. If the specified list begins with a `^` character, then the
1056    /// specified methods will be placed at the head of the default set. The
1057    /// default is:
1058    ///
1059    /// ```text
1060    /// curve25519-sha256,
1061    /// curve25519-sha256@libssh.org,
1062    /// ecdh-sha2-nistp256,
1063    /// ecdh-sha2-nistp384,
1064    /// ecdh-sha2-nistp521,
1065    /// diffie-hellman-group-exchange-sha256,
1066    /// diffie-hellman-group16-sha512,
1067    /// diffie-hellman-group18-sha512,
1068    /// diffie-hellman-group14-sha256
1069    /// ```
1070    ///
1071    /// The list of available key exchange algorithms may also be obtained using
1072    /// `ssh -Q kex`.
1073    KexAlgorithms,
1074
1075    /// Specifies a command to use to obtain a list of host keys, in addition to
1076    /// those listed in `UserKnownHostsFile` and `GlobalKnownHostsFile`.
1077    ///
1078    /// This command is executed after the files have been read. It may write
1079    /// host key lines to standard output in identical format to the usual
1080    /// files (described in the VERIFYING HOST KEYS section in ssh(1)).
1081    /// Arguments to KnownHostsCommand accept the tokens described in the
1082    /// TOKENS section. The command may be invoked multiple times per
1083    /// connection: once when preparing the preference list of host key
1084    /// algorithms to use, again to obtain the host key for the requested
1085    /// host name and, if CheckHostIP is enabled, one more time to obtain
1086    /// the host key matching the server's address. If the command exits
1087    /// abnormally or returns a non-zero exit status then the connection is
1088    /// terminated.
1089    KnownHostsCommand,
1090
1091    /// Specifies the local addresses sshd(8) should listen on.
1092    ///
1093    /// The following forms may be used:
1094    ///
1095    /// ```text
1096    /// ListenAddress hostname|address [rdomain domain]
1097    /// ListenAddress hostname:port [rdomain domain]
1098    /// ListenAddress IPv4_address:port [rdomain domain]
1099    /// ListenAddress [hostname|address]:port [rdomain domain]
1100    /// ```
1101    ///
1102    /// The optional rdomain qualifier requests sshd(8) listen in an explicit
1103    /// routing domain. If port is not specified, sshd will listen on the
1104    /// address and all Port options specified. The default is to listen on all
1105    /// local addresses on the current default routing domain. Multiple
1106    /// `ListenAddress` options are permitted. For more information on routing
1107    /// domains, see rdomain(4).
1108    ListenAddress,
1109
1110    /// Specifies a command to execute on the local machine after successfully
1111    /// connecting to the server.
1112    ///
1113    /// The command string extends to the end of the line, and is executed with
1114    /// the user's shell. The following escape character substitutions will
1115    /// be performed:
1116    ///
1117    /// * `%d` (local user's home directory)
1118    /// * `%h` (remote host name)
1119    /// * `%l` (local host name)
1120    /// * `%n` (host name as provided on the command line)
1121    /// * `%p` (remote port)
1122    /// * `%r` (remote user name)
1123    /// * `%u` (local user name)
1124    ///
1125    /// This directive is ignored unless `PermitLocalCommand` has been enabled.
1126    LocalCommand,
1127
1128    /// Specifies that a TCP port on the local machine be forwarded over the
1129    /// secure channel to the specified host and port from the remote machine.
1130    ///
1131    /// The first argument must be `[bind_address:]port` and the second
1132    /// argument must be `host:hostport`. IPv6 addresses can be specified by
1133    /// enclosing addresses in square brackets or by using an alternative
1134    /// syntax: `[bind_address/]port` and `host/hostport`. Multiple
1135    /// forwardings may be specified, and additional forwardings can be given on
1136    /// the command line. Only the superuser can forward privileged ports. By
1137    /// default, the local port is bound in accordance with the `GatewayPorts`
1138    /// setting. However, an explicit bind_address may be used to bind the
1139    /// connection to a specific address. The bind_address of `localhost`
1140    /// indicates that the listening port be bound for local use only, while an
1141    /// empty address or `*` indicates that the port should be available from
1142    /// all interfaces.
1143    LocalForward,
1144
1145    /// The server disconnects after this time if the user has not successfully
1146    /// logged in.
1147    ///
1148    /// If the value is 0, there is no time limit. The default is
1149    /// 120 seconds.
1150    LoginGraceTime,
1151
1152    /// Gives the verbosity level that is used when logging messages from
1153    /// ssh(1).
1154    ///
1155    /// The possible values are: `QUIET`, `FATAL`, `ERROR`, `INFO`, `VERBOSE`,
1156    /// `DEBUG`, `DEBUG1`, `DEBUG2`, and `DEBUG3`. The default is `INFO`.
1157    /// `DEBUG` and `DEBUG1` are equivalent. `DEBUG2` and `DEBUG3` each
1158    /// specify higher levels of verbose output.
1159    LogLevel,
1160
1161    /// Specify one or more overrides to LogLevel.
1162    ///
1163    /// An override consists of a pattern lists that matches the source file,
1164    /// function and line number to force detailed logging for. For example, an
1165    /// override pattern of:
1166    ///
1167    /// ```text
1168    /// kex.c:*:1000,*:kex_exchange_identification():*,packet.c:*
1169    /// ```
1170    ///
1171    /// would enable detailed logging for line 1000 of kex.c, everything in the
1172    /// kex_exchange_identification() function, and all code in the packet.c
1173    /// file. This option is intended for debugging and no overrides are enabled
1174    /// by default.
1175    LogVerbose,
1176
1177    /// Specifies the MAC (message authentication code) algorithms in order of
1178    /// preference.
1179    ///
1180    /// The MAC algorithm is used in protocol version 2 for data integrity
1181    /// protection. Multiple algorithms must be comma-separated. The default
1182    /// is:
1183    ///
1184    /// ```text
1185    /// hmac-md5,hmac-sha1,umac-64@openssh.com,
1186    /// hmac-ripemd160,hmac-sha1-96,hmac-md5-96
1187    /// ```
1188    MACs,
1189
1190    /// Restricts the following declarations (up to the next Host or Match
1191    /// keyword) to be used only when the conditions following the Match keyword
1192    /// are satisfied. Match conditions are specified using one or more
1193    /// criteria or the single token all which always matches. The available
1194    /// criteria keywords are: canonical, final, exec, host, originalhost, user,
1195    /// and localuser. The all criteria must appear alone or immediately after
1196    /// canonical or final. Other criteria may be combined arbitrarily. All
1197    /// criteria but all, canonical, and final require an argument. Criteria may
1198    /// be negated by prepending an exclamation mark (`!`).
1199    ///
1200    /// The canonical keyword matches only when the configuration file is being
1201    /// re-parsed after hostname canonicalization (see the CanonicalizeHostname
1202    /// option). This may be useful to specify conditions that work with
1203    /// canonical host names only.
1204    ///
1205    /// The final keyword requests that the configuration be re-parsed
1206    /// (regardless of whether CanonicalizeHostname is enabled), and matches
1207    /// only during this final pass. If CanonicalizeHostname is enabled, then
1208    /// canonical and final match during the same pass.
1209    ///
1210    /// The exec keyword executes the specified command under the user's shell.
1211    /// If the command returns a zero exit status then the condition is
1212    /// considered true. Commands containing whitespace characters must be
1213    /// quoted. Arguments to exec accept the tokens described in the TOKENS
1214    /// section.
1215    ///
1216    /// The other keywords' criteria must be single entries or comma-separated
1217    /// lists and may use the wildcard and negation operators described in the
1218    /// PATTERNS section. The criteria for the host keyword are matched against
1219    /// the target hostname, after any substitution by the Hostname or
1220    /// CanonicalizeHostname options. The originalhost keyword matches against
1221    /// the hostname as it was specified on the command-line. The user keyword
1222    /// matches against the target username on the remote host. The localuser
1223    /// keyword matches against the name of the local user running ssh(1) (this
1224    /// keyword may be useful in system-wide ssh_config files).
1225    Match,
1226
1227    /// Specifies the maximum number of authentication attempts permitted per
1228    /// connection.
1229    ///
1230    /// Once the number of failures reaches half this value, additional failures
1231    /// are logged. The default is 6.
1232    MaxAuthTries,
1233
1234    /// Specifies the maximum number of open shell, login or subsystem (e.g.
1235    /// sftp) sessions permitted per network connection.
1236    ///
1237    /// Multiple sessions may be established by clients that support connection
1238    /// multiplexing. Setting MaxSessions to 1 will effectively disable session
1239    /// multiplexing, whereas setting it to 0 will prevent all shell, login and
1240    /// subsystem sessions while still permitting forwarding. The default is 10.
1241    MaxSessions,
1242
1243    /// Specifies the maximum number of concurrent unauthenticated connections
1244    /// to the SSH daemon.
1245    ///
1246    /// Additional connections will be dropped until authentication succeeds or
1247    /// the LoginGraceTime expires for a connection. The default is
1248    /// 10:30:100.
1249    ///
1250    /// Alternatively, random early drop can be enabled by specifying the
1251    /// three colon separated values start:rate:full (e.g. "10:30:60").
1252    /// sshd(8) will refuse connection attempts with a probability of
1253    /// rate/100 (30%) if there are currently start (10) unauthenticated
1254    /// connections. The probability increases linearly and all connection
1255    /// attempts are refused if the number of unauthenticated connections
1256    /// reaches full (60).
1257    MaxStartups,
1258
1259    /// This option can be used if the home directory is shared across machines.
1260    ///
1261    /// In this case localhost will refer to a different machine on each of the
1262    /// machines and the user will get many warnings about changed host keys.
1263    /// However, this option disables host authentication for localhost. The
1264    /// argument to this keyword must be `yes` or `no`. The default is to
1265    /// check the host key for localhost.
1266    NoHostAuthenticationForLocalhost,
1267
1268    /// Specifies the number of password prompts before giving up.
1269    ///
1270    /// The argument to this keyword must be an integer. The default is 3.
1271    NumberOfPasswordPrompts,
1272
1273    /// Specifies whether to use password authentication.
1274    ///
1275    /// The argument to this keyword must be `yes` or `no`. The default is
1276    /// `yes`.
1277    PasswordAuthentication,
1278
1279    /// When password authentication is allowed, it specifies whether the
1280    /// server allows login to accounts with empty password strings.
1281    ///
1282    /// The
1283    /// default is `no`.
1284    PermitEmptyPasswords,
1285
1286    /// Specifies the addresses/ports on which a remote TCP port forwarding may
1287    /// listen.
1288    ///
1289    /// The listen specification must be one of the following forms:
1290    ///
1291    /// ```text
1292    /// PermitListen port
1293    /// PermitListen host:port
1294    /// ```
1295    ///
1296    /// Multiple permissions may be specified by separating them with
1297    /// whitespace. An argument of any can be used to remove all restrictions
1298    /// and permit any listen requests. An argument of none can be used to
1299    /// prohibit all listen requests. The host name may contain wildcards as
1300    /// described in the `PATTERNS` section in ssh_config(5). The wildcard `*`
1301    /// can also be used in place of a port number to allow all ports. By
1302    /// default all port forwarding listen requests are permitted. Note that the
1303    /// GatewayPorts option may further restrict which addresses may be listened
1304    /// on. Note also that ssh(1) will request a listen host of "localhost" if
1305    /// no listen host was specifically requested, and this this name is treated
1306    /// differently to explicit localhost addresses of 127.0.0.1" and "::1".
1307    PermitListen,
1308
1309    /// Allow local command execution via the LocalCommand option or using the
1310    /// `!command` escape sequence in ssh(1).
1311    ///
1312    /// The argument must be `yes` or `no`. The default is `no`.
1313    PermitLocalCommand,
1314
1315    /// Specifies the destinations to which TCP port forwarding is permitted.
1316    ///
1317    /// The forwarding specification must be one of the following forms:
1318    ///
1319    /// ```text
1320    /// PermitOpen host:port
1321    /// PermitOpen IPv4_addr:port
1322    /// PermitOpen [IPv6_addr]:port
1323    /// ```
1324    ///
1325    /// Multiple forwards may be specified by separating them with whitespace.
1326    /// An argument of any can be used to remove all restrictions and permit
1327    /// any forwarding requests. An argument of none can be used to prohibit
1328    /// all forwarding requests. The wildcard `*` can be used for host or
1329    /// port to allow all hosts or ports, respectively. By default all port
1330    /// forwarding requests are permitted.
1331    PermitOpen,
1332
1333    /// Specifies the destinations to which remote TCP port forwarding is
1334    /// permitted when `RemoteForward` is used as a SOCKS proxy.
1335    ///
1336    /// The forwarding specification must be one of the following forms:
1337    ///
1338    /// ```text
1339    /// PermitRemoteOpen host:port
1340    /// PermitRemoteOpen IPv4_addr:port
1341    /// PermitRemoteOpen [IPv6_addr]:port
1342    /// ```
1343    ///
1344    /// Multiple forwards may be specified by separating them with whitespace.
1345    /// An argument of any can be used to remove all restrictions and permit any
1346    /// forwarding requests. An argument of none can be used to prohibit all
1347    /// forwarding requests. The wildcard `*` can be used for host or port to
1348    /// allow all hosts or ports respectively. Otherwise, no pattern matching or
1349    /// address lookups are performed on supplied names.
1350    PermitRemoteOpen,
1351
1352    /// Specifies whether root can log in using ssh(1).
1353    ///
1354    /// The argument must be `yes`, `prohibit-password`, `forced-commands-only`,
1355    /// or `no`. The default is `no`. Note that if
1356    /// `ChallengeResponseAuthentication` and `UsePAM` are both yes, this
1357    /// setting may be overridden by the PAM policy.
1358    ///
1359    /// If this option is set to prohibit-password (or its deprecated alias,
1360    /// without-password), password and keyboard-interactive authentication are
1361    /// disabled for root.
1362    ///
1363    /// If this option is set to forced-commands-only, root login with public
1364    /// key authentication will be allowed, but only if the command option has
1365    /// been specified (which may be useful for taking remote backups even if
1366    /// root login is normally not allowed). All other authentication methods
1367    /// are disabled for root.
1368    ///
1369    /// If this option is set to `no`, root is not allowed to log in.
1370    PermitRootLogin,
1371
1372    /// Specifies whether pty(4) allocation is permitted.
1373    ///
1374    /// The default is `yes`.
1375    PermitTTY,
1376
1377    /// Specifies whether tun(4) device forwarding is allowed.
1378    ///
1379    /// The argument must be `yes`, `point-to-point` (layer 3), `ethernet`
1380    /// (layer 2), or `no`. Specifying `yes` permits both `point-to-point` and
1381    /// `ethernet`. The default is `no`.
1382    ///
1383    /// Independent of this setting, the permissions of the selected tun(4)
1384    /// device must allow access to the user.
1385    PermitTunnel,
1386
1387    /// Specifies whether `~/.ssh/environment` and environment= options in
1388    /// ssh/authorized_keys are processed by sshd(8).
1389    ///
1390    /// Valid options are `yes`, `no` or a pattern-list specifying which
1391    /// environment variable names to accept (for example "LANG,LC_*"). The
1392    /// default is `no`. Enabling environment processing may enable users to
1393    /// bypass access restrictions in some configurations using mechanisms such
1394    /// as LD_PRELOAD.
1395    PermitUserEnvironment,
1396
1397    /// Specifies whether any `~/.ssh/rc` file is executed.
1398    ///
1399    /// The default is `yes`.
1400    PermitUserRC,
1401
1402    /// Specifies the file that contains the process ID of the SSH daemon, or
1403    /// none to not write one. The default is `/var/run/sshd.pid`.
1404    PidFile,
1405
1406    /// Specifies which PKCS#11 provider to use or none to indicate that no
1407    /// provider should be used (the default).
1408    ///
1409    /// The argument to this keyword is a path to the PKCS#11 shared library
1410    /// ssh(1) should use to communicate with a PKCS#11 token providing keys for
1411    /// user authentication.
1412    PKCS11Provider,
1413
1414    /// Specifies the port number to connect on the remote host.
1415    ///
1416    /// The default is 22.
1417    Port,
1418
1419    /// Specifies the order in which the client should try protocol 2
1420    /// authentication methods.
1421    ///
1422    /// This allows a client to prefer one method (e.g. keyboard-interactive)
1423    /// over another method (e.g. password). The default for this option is:
1424    /// `gssapi-with-mic, hostbased, publickey, keyboard-interactive, password`.
1425    PreferredAuthentications,
1426
1427    /// Specifies whether sshd(8) should print the date and time of the last
1428    /// user login when a user logs in interactively.
1429    ///
1430    /// The default is `yes`.
1431    PrintLastLog,
1432
1433    /// Specifies whether sshd(8) should print `/etc/motd` when a user logs
1434    /// in interactively.
1435    ///
1436    /// (On some systems it is also printed by the shell, `/etc/profile`, or
1437    /// equivalent.) The default is `yes`.
1438    PrintMotd,
1439
1440    /// Specifies the protocol versions ssh(1) should support in order of
1441    /// preference.
1442    ///
1443    /// The possible values are '1' and '2'. Multiple versions must be
1444    /// comma-separated. The default is `2,1`. This means that ssh tries
1445    /// version 2 and falls back to version 1 if version 2 is not available.
1446    Protocol,
1447
1448    /// Specifies the command to use to connect to the server.
1449    ///
1450    /// The command string extends to the end of the line, and is executed with
1451    /// the user's shell. In the command string, `%h` will be substituted by
1452    /// the host name to connect and `%p` by the port. The command can be
1453    /// basically anything, and should read from its standard input and
1454    /// write to its standard output. It should eventually connect an
1455    /// sshd(8) server running on some machine, or execute sshd -i
1456    /// somewhere. Host key management will be done using the HostName of
1457    /// the host being connected (defaulting to the name typed by the user).
1458    /// Setting the command to `none` disables this option entirely. Note
1459    /// that [`CheckHostIP`][Self::CheckHostIP] is not available for connects
1460    /// with a proxy command.
1461    ///
1462    /// This directive is useful in conjunction with nc(1) and its proxy
1463    /// support. For example, the following directive would connect via an HTTP
1464    /// proxy at 192.0.2.0:
1465    ///
1466    /// ```text
1467    /// ProxyCommand /usr/bin/nc -X connect -x 192.0.2.0:8080 %h %p
1468    /// ```
1469    ProxyCommand,
1470
1471    /// Specifies one or more jump proxies as either `[user@]host[:port]` or an
1472    /// ssh URI.
1473    ///
1474    /// Multiple proxies may be separated by comma characters and will be
1475    /// visited sequentially. Setting this option will cause ssh(1) to connect
1476    /// to the target host by first making a ssh(1) connection to the specified
1477    /// ProxyJump host and then establishing a TCP forwarding to the ultimate
1478    /// target from there. Setting the host to none disables this option
1479    /// entirely.
1480    ///
1481    /// Note that this option will compete with the `ProxyCommand` option -
1482    /// whichever is specified first will prevent later instances of the other
1483    /// from taking effect.
1484    ///
1485    /// Note also that the configuration for the destination host (either
1486    /// supplied via the command-line or the configuration file) is not
1487    /// generally applied to jump hosts. `~/.ssh/config` should be used if
1488    /// specific configuration is required for jump hosts.
1489    ProxyJump,
1490
1491    /// Specifies that `ProxyCommand` will pass a connected file descriptor back
1492    /// to ssh(1) instead of continuing to execute and pass data.
1493    ///
1494    /// The default is no.
1495    ProxyUseFdpass,
1496
1497    /// Specifies the signature algorithms that will be used for public key
1498    /// authentication as a comma-separated list of patterns.
1499    ///
1500    /// If the specified list begins with a `+` character, then the algorithms
1501    /// after it will be appended to the default instead of replacing it. If the
1502    /// specified list begins with a `-` character, then the specified
1503    /// algorithms (including wildcards) will be removed from the default set
1504    /// instead of replacing them. If the specified list begins with a `^`
1505    /// character, then the specified algorithms will be placed at the head of
1506    /// the default set.
1507    ///
1508    /// The default for this option is:
1509    ///
1510    /// ```text
1511    /// ssh-ed25519-cert-v01@openssh.com,
1512    /// ecdsa-sha2-nistp256-cert-v01@openssh.com,
1513    /// ecdsa-sha2-nistp384-cert-v01@openssh.com,
1514    /// ecdsa-sha2-nistp521-cert-v01@openssh.com,
1515    /// sk-ssh-ed25519-cert-v01@openssh.com,
1516    /// sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,
1517    /// rsa-sha2-512-cert-v01@openssh.com,
1518    /// rsa-sha2-256-cert-v01@openssh.com,
1519    /// ssh-rsa-cert-v01@openssh.com,
1520    /// ssh-ed25519,
1521    /// ecdsa-sha2-nistp256,
1522    /// ecdsa-sha2-nistp384,
1523    /// ecdsa-sha2-nistp521,
1524    /// sk-ssh-ed25519@openssh.com,
1525    /// sk-ecdsa-sha2-nistp256@openssh.com,
1526    /// rsa-sha2-512,
1527    /// rsa-sha2-256,ssh-rsa
1528    /// ```
1529    ///
1530    /// The list of available signature algorithms may also be obtained using
1531    /// `ssh -Q PubkeyAcceptedAlgorithms`.
1532    PubkeyAcceptedAlgorithms,
1533
1534    /// Specifies the key types that will be accepted for public key
1535    /// authentication as a list of comma-separated patterns.
1536    ///
1537    /// Alternately if the specified value begins with a `+` character, then the
1538    /// specified key types will be appended to the default set instead of
1539    /// replacing them. If the specified value begins with a `-` character, then
1540    /// the specified key types (including wildcards) will be removed from the
1541    /// default set instead of replacing them.
1542    ///
1543    /// The default for this option is:
1544    ///
1545    /// ```text
1546    /// ecdsa-sha2-nistp256-cert-v01@openssh.com,
1547    /// ecdsa-sha2-nistp384-cert-v01@openssh.com,
1548    /// ecdsa-sha2-nistp521-cert-v01@openssh.com,
1549    /// ssh-ed25519-cert-v01@openssh.com,
1550    /// rsa-sha2-512-cert-v01@openssh.com,
1551    /// rsa-sha2-256-cert-v01@openssh.com,
1552    /// ssh-rsa-cert-v01@openssh.com,
1553    /// ecdsa-sha2-nistp256,
1554    /// ecdsa-sha2-nistp384,
1555    /// ecdsa-sha2-nistp521,
1556    /// ssh-ed25519,
1557    /// rsa-sha2-512,
1558    /// rsa-sha2-256,
1559    /// ssh-rsa
1560    /// ```
1561    ///
1562    /// The list of available key types may also be obtained using `ssh -Q key`.
1563    PubkeyAcceptedKeyTypes,
1564
1565    /// Specifies whether to try public key authentication.
1566    ///
1567    /// The argument to this keyword must be `yes` or `no`. The default is
1568    /// `yes`. This option applies to protocol version 2 only.
1569    PubkeyAuthentication,
1570
1571    /// Specifies an explicit routing domain that is applied after
1572    /// authentication has completed.
1573    ///
1574    /// The user session, as well and any forwarded or listening IP sockets,
1575    /// will be bound to this rdomain(4). If the routing domain is set to %D,
1576    /// then the domain in which the incoming connection was received will be
1577    /// applied.
1578    RDomain,
1579
1580    /// Specifies the maximum amount of data that may be transmitted before the
1581    /// session key is renegotiated.
1582    ///
1583    /// The argument is the number of bytes, with an optional suffix of 'K',
1584    /// 'M', or 'G' to indicate Kilobytes, Megabytes, or Gigabytes,
1585    /// respectively. The default is between '1G' and '4G', depending on the
1586    /// cipher. This option applies to protocol version 2 only.
1587    RekeyLimit,
1588
1589    /// Specifies a command to execute on the remote machine after successfully
1590    ///  connecting to the server. The command string extends to the end of the
1591    ///  line, and is executed with the user's shell. Arguments to RemoteCommand
1592    ///  accept the tokens described in the TOKENS section.
1593    RemoteCommand,
1594
1595    /// Specifies that a TCP port on the remote machine be forwarded over the
1596    /// secure channel to the specified host and port from the local machine.
1597    ///
1598    /// The first argument must be `[bind_address:]port` and the second
1599    /// argument must be `host:hostport`. IPv6 addresses can be specified by
1600    /// enclosing addresses in square brackets or by using an alternative
1601    /// syntax: `[bind_address/]port` and `host/hostport`. Multiple forwardings
1602    /// may be specified, and additional forwardings can be given on the command
1603    /// line. Privileged ports can be forwarded only when logging in as root on
1604    /// the remote machine.
1605    ///
1606    /// If the port argument is '0', the listen port will be dynamically
1607    /// allocated on the server and reported to the client at run time.
1608    ///
1609    /// If the bind_address is not specified, the default is to only bind to
1610    /// loopback addresses. If the bind_address is `*` or an empty string, then
1611    /// the forwarding is requested to listen on all interfaces. Specifying a
1612    /// remote bind_address will only succeed if the server's GatewayPorts
1613    /// option is enabled (see sshd_config(5)).
1614    RemoteForward,
1615
1616    /// Specifies whether to request a pseudo-tty for the session. The
1617    /// argument may be one of: no (never request a TTY), yes (always
1618    ///  request a TTY when standard input is a TTY), force (always
1619    /// request a TTY) or auto (request a TTY when opening a login
1620    ///  session). This option mirrors the -t and -T flags for ssh(1).
1621    RequestTTY,
1622
1623    /// Specifies revoked host public keys.
1624    ///
1625    /// Keys listed in this file will be refused for host authentication. Note
1626    /// that if this file does not exist or is not readable, then host
1627    /// authentication will be refused for all hosts. Keys may be specified as a
1628    /// text file, listing one public key per line, or as an OpenSSH Key
1629    /// Revocation List (KRL) as generated by ssh-keygen(1). For more
1630    /// information on KRLs, see the KEY REVOCATION LISTS section in
1631    /// ssh-keygen(1).
1632    RevokedHostKeys,
1633
1634    /// Specifies revoked public keys file, or `none` to not use one.
1635    ///
1636    /// Keys listed in this file will be refused for public key authentication.
1637    /// Note that if this file is not readable, then public key authentication
1638    /// will be refused for all users. Keys may be specified as a text file,
1639    /// listing one public key per line, or as an OpenSSH Key Revocation List
1640    /// (KRL) as generated by ssh-keygen(1). For more information on KRLs, see
1641    /// the KEY REVOCATION LISTS section in ssh-keygen(1).
1642    RevokedKeys,
1643
1644    /// Specifies whether to try rhosts based authentication with RSA host
1645    /// authentication.
1646    ///
1647    /// The argument must be `yes` or `no`. The default is `no`. This option
1648    /// applies to protocol version 1 only and requires ssh(1) to be setuid
1649    /// root.
1650    RhostsRSAAuthentication,
1651
1652    /// Specifies whether to try RSA authentication.
1653    ///
1654    /// The argument to this keyword must be `yes` or `no`. RSA authentication
1655    /// will only be attempted if the identity file exists, or an authentication
1656    /// agent is running. The default is `yes`. Note that this option
1657    /// applies to protocol version 1 only.
1658    RSAAuthentication,
1659
1660    /// Specifies a path to a library that will be used when loading any FIDO
1661    /// authenticator-hosted keys, overriding the default of using the built-in
1662    /// USB HID support.
1663    ///
1664    /// If the specified value begins with a `$` character, then it will be
1665    /// treated as an environment variable containing the path to the library.
1666    SecurityKeyProvider,
1667
1668    /// Specifies what variables from the local environ(7) should be sent to the
1669    /// server.
1670    ///
1671    /// Note that environment passing is only supported for protocol 2. The
1672    /// server must also support it, and the server must be configured to
1673    /// accept these environment variables. Refer to AcceptEnv in sshd_config(5)
1674    /// for how to configure the server. Variables are specified by name, which
1675    /// may contain wildcard characters. Multiple environment variables may be
1676    /// separated by whitespace or spread across multiple SendEnv directives.
1677    /// The default is not to send any environment variables.
1678    ///
1679    /// See [Patterns](index.html#patterns) for more information on patterns.
1680    SendEnv,
1681
1682    /// Sets the number of server alive messages (see below) which may be sent
1683    /// without ssh(1) receiving any messages back from the server.
1684    ///
1685    /// If this threshold is reached while server alive messages are being sent,
1686    /// ssh will disconnect from the server, terminating the session. It is
1687    /// important to note that the use of server alive messages is very
1688    /// different from `TCPKeepAlive` (below). The server alive messages are
1689    /// sent through the encrypted channel and therefore will not be
1690    /// spoofable. The TCP keepalive option enabled by `TCPKeepAlive` is
1691    /// spoofable. The server alive mechanism is valuable when the client or
1692    /// server depend on knowing when a connection has become inactive.
1693    ///
1694    /// The default value is 3. If, for example, `ServerAliveInterval` (see
1695    /// below) is set to 15 and `ServerAliveCountMax` is left at the default,
1696    /// if the server becomes unresponsive, ssh will disconnect after
1697    /// approximately 45 seconds. This option applies to protocol version 2
1698    /// only.
1699    ServerAliveCountMax,
1700
1701    /// Sets a timeout interval in seconds after which if no data has been
1702    /// received from the server, ssh(1) will send a message through the
1703    /// encrypted channel to request a response from the server.
1704    ///
1705    /// The default is 0, indicating that these messages will not be sent to the
1706    /// server. This option applies to protocol version 2 only.
1707    ServerAliveInterval,
1708
1709    /// May be used to either request invocation of a subsystem on the remote
1710    /// system, or to prevent the execution of a remote command at all.
1711    ///
1712    /// The latter is useful for just forwarding ports. The argument to this
1713    /// keyword must be none (same as the -N option), subsystem (same as the -s
1714    /// option) or default (shell or command execution).
1715    SessionType,
1716
1717    /// Directly specify one or more environment variables and their contents to
1718    /// be sent to the server.
1719    ///
1720    /// Similarly to `SendEnv`, with the exception of the TERM variable, the
1721    /// server must be prepared to accept the environment variable.
1722    SetEnv,
1723
1724    /// Specifies which smartcard device to use.
1725    ///
1726    /// The argument to this keyword is the device ssh(1) should use to
1727    /// communicate with a smartcard used for storing the user's private RSA
1728    /// key. By default, no device is specified and smartcard support is not
1729    /// activated.
1730    SmartcardDevice,
1731
1732    /// Redirects stdin from `/dev/null` (actually, prevents reading from
1733    /// stdin).
1734    ///
1735    /// Either this or the equivalent -n option must be used when ssh is run in
1736    /// the background. The argument to this keyword must be yes (same as the -n
1737    /// option) or no (the default).
1738    StdinNull,
1739
1740    /// Sets the octal file creation mode mask (umask) used when creating a
1741    /// Unix-domain socket file for local or remote port forwarding.
1742    ///
1743    /// This option is only used for port forwarding to a Unix-domain socket
1744    /// file.
1745    ///
1746    /// The default value is 0177, which creates a Unix-domain socket file that
1747    /// is readable and writable only by the owner. Note that not all operating
1748    /// systems honor the file mode on Unix-domain socket files.
1749    StreamLocalBindMask,
1750
1751    /// Specifies whether to remove an existing Unix-domain socket file for
1752    /// local or remote port forwarding before creating a new one.
1753    ///
1754    /// If the socket file already exists and StreamLocalBindUnlink is not
1755    /// enabled, ssh will be unable to forward the port to the Unix-domain
1756    /// socket file. This option is only used for port forwarding to a
1757    /// Unix-domain socket file.
1758    ///
1759    /// The argument must be yes or no (the default).
1760    StreamLocalBindUnlink,
1761
1762    /// If this flag is set to `yes`, ssh(1) will never automatically add host
1763    /// keys to the `~/.ssh/known_hosts` file, and refuses to connect to hosts
1764    /// whose host key has changed.
1765    ///
1766    /// This provides maximum protection against trojan horse attacks, though it
1767    /// can be annoying when the `/etc/ssh/ssh_known_hosts` file is poorly
1768    /// maintained or when connections to new hosts are frequently made.
1769    /// This option forces the user to manually add all new hosts. If this
1770    /// flag is set to `no`, ssh will automatically add new host keys to the
1771    /// user known hosts files. If this flag is set to `ask`, new host keys
1772    /// will be added to the user known host files only after the user has
1773    /// confirmed that is what they really want to do, and ssh will refuse
1774    /// to connect to hosts whose host key has changed. The host keys of
1775    /// known hosts will be verified automatically in all cases. The
1776    /// argument must be `yes`, `no`, or `ask`. The default is `ask`.
1777    StrictHostKeyChecking,
1778
1779    /// Specifies whether sshd(8) should check file modes and ownership
1780    /// of the user's files and home directory before accepting login.
1781    ///
1782    /// This is normally desirable because novices sometimes accidentally leave
1783    /// their directory or files world-writable. The default is `yes`. Note that
1784    /// this does not apply to ChrootDirectory, whose permissions and ownership
1785    /// are checked unconditionally.
1786    StrictModes,
1787
1788    /// Configures an external subsystem (e.g. file transfer daemon).
1789    ///
1790    /// Arguments should be a subsystem name and a command (with optional
1791    /// arguments) to execute upon subsystem request.
1792    ///
1793    /// The command sftp-server implements the SFTP file transfer subsystem.
1794    ///
1795    /// Alternately the name internal-sftp implements an in-process SFTP server.
1796    /// This may simplify configurations using ChrootDirectory to force a
1797    /// different filesystem root on clients.
1798    ///
1799    /// By default no subsystems are defined.
1800    Subsystem,
1801
1802    /// Gives the facility code that is used when logging messages from ssh(1).
1803    ///
1804    /// The possible values are: `DAEMON`, `USER`, `AUTH`, `LOCAL0`, `LOCAL1`,
1805    /// `LOCAL2`, `LOCAL3`, `LOCAL4`, `LOCAL5`, `LOCAL6`, `LOCAL7`. The
1806    /// default is `USER`.
1807    SyslogFacility,
1808
1809    /// Specifies whether the system should send TCP keepalive messages to the
1810    /// other side.
1811    ///
1812    /// If they are sent, death of the connection or crash of one of the
1813    /// machines will be properly noticed. However, this means that
1814    /// connections will die if the route is down temporarily, and some people
1815    /// find it annoying.
1816    ///
1817    /// The default is `yes` (to send TCP keepalive messages), and the client
1818    /// will notice if the network goes down or the remote host dies. This is
1819    /// important in scripts, and many users want it too.
1820    ///
1821    /// To disable TCP keepalive messages, the value should be set to `no`.
1822    TCPKeepAlive,
1823
1824    /// Specifies a file containing public keys of certificate authorities that
1825    /// are trusted to sign user certificates for authentication, or `none` to
1826    /// not use one.
1827    ///
1828    /// Keys are listed one per line; empty lines and comments starting with `#`
1829    /// are allowed. If a certificate is presented for authentication and has
1830    /// its signing CA key listed in this file, then it may be used for
1831    /// authentication for any user listed in the certificate's principals list.
1832    /// Note that certificates that lack a list of principals will not be
1833    /// permitted for authentication using `TrustedUserCAKeys`. For more details
1834    /// on certificates, see the CERTIFICATES section in ssh-keygen(1).
1835    TrustedUserCAKeys,
1836
1837    /// Request tun(4) device forwarding between the client and the server.
1838    ///
1839    /// The argument must be `yes`, `point-to-point` (layer 3), `ethernet`
1840    /// (layer 2), or `no`. Specifying `yes` requests the default tunnel
1841    /// mode, which is `point-to-point`. The default is `no`.
1842    Tunnel,
1843
1844    /// Specifies the tun(4) devices to open on the client (`local_tun`) and the
1845    /// server (`remote_tun`).
1846    ///
1847    /// The argument must be `local_tun[:remote_tun]`. The devices may be
1848    /// specified by numerical ID or the keyword `any`, which uses the next
1849    /// available tunnel device. If remote_tun is not specified, it defaults to
1850    /// `any`. The default is `any:any`.
1851    TunnelDevice,
1852
1853    /// Specifies whether ssh(1) should accept notifications of additional
1854    /// hostkeys from the server sent after authentication has completed and add
1855    /// them to `UserKnownHostsFile`.
1856    ///
1857    /// The argument must be `yes`, `no` or `ask`. This option allows learning
1858    /// alternate hostkeys for a server and supports graceful key rotation by
1859    /// allowing a server to send replacement public keys before old ones are
1860    /// removed.
1861    ///
1862    /// Additional hostkeys are only accepted if the key used to authenticate
1863    /// the host was already trusted or explicitly accepted by the user, the
1864    /// host was authenticated via `UserKnownHostsFile` (i.e. not
1865    /// `GlobalKnownHostsFile`) and the host was authenticated using a plain key
1866    /// and not a certificate.
1867    ///
1868    /// `UpdateHostKeys` is enabled by default if the user has not overridden
1869    /// the default `UserKnownHostsFile` setting and has not enabled
1870    /// VerifyHostKeyDNS, otherwise `UpdateHostKeys` will be set to no.
1871    ///
1872    /// If `UpdateHostKeys` is set to `ask`, then the user is asked to confirm
1873    /// the modifications to the known_hosts file. Confirmation is currently
1874    /// incompatible with ControlPersist, and will be disabled if it is enabled.
1875    ///
1876    /// Presently, only sshd(8) from OpenSSH 6.8 and greater support the
1877    /// "hostkeys@openssh.com" protocol extension used to inform the client of
1878    /// all the server's hostkeys.
1879    UpdateHostKeys,
1880
1881    /// Specifies whether sshd(8) attempts to send authentication success and
1882    /// failure messages to the blacklistd(8) daemon.
1883    ///
1884    /// The default is `no`. For forward compatibility with an upcoming
1885    /// blacklisted rename, the `UseBlocklist` alias can be used instead.
1886    UseBlacklist,
1887
1888    /// Specifies whether sshd(8) should look up the remote host name, and to
1889    /// check that the resolved host name for the remote IP address maps back to
1890    /// the very same IP address.
1891    ///
1892    /// If this option is set to `no`, then only addresses and not host names
1893    /// may be used in `~/.ssh/authorized_keys` from and `sshd_config` Match
1894    /// Host directives. The default is "yes".
1895    UseDNS,
1896
1897    /// Enables the Pluggable Authentication Module interface.
1898    ///
1899    /// If set to `yes` this will enable PAM authentication using
1900    /// `ChallengeResponseAuthentication` and `PasswordAuthentication` in
1901    /// addition to PAM account and session module processing for all
1902    /// authentication types.
1903    ///
1904    /// Because PAM challenge-response authentication usually serves an
1905    /// equivalent role to password authentication, you should disable either
1906    /// `PasswordAuthentication` or `ChallengeResponseAuthentication`.
1907    ///
1908    /// If `UsePAM` is enabled, you will not be able to run sshd(8) as a
1909    /// non-root user. The default is `yes`.
1910    UsePAM,
1911
1912    /// Specifies whether to use a privileged port for outgoing connections.
1913    ///
1914    /// The argument must be `yes` or `no`. The default is `no`. If set to
1915    /// `yes`, ssh(1) must be setuid root. Note that this option must be set
1916    /// to `yes` for `RhostsRSAAuthentication` with older servers.
1917    UsePrivilegedPort,
1918
1919    /// Specifies the user to log in as.
1920    ///
1921    /// This can be useful when a different user name is used on different
1922    /// machines. This saves the trouble of having to remember to give the
1923    /// user name on the command line.
1924    User,
1925
1926    /// Specifies a file to use for the user host key database instead of
1927    /// `~/.ssh/known_hosts`.
1928    UserKnownHostsFile,
1929
1930    /// Specifies whether to verify the remote key using DNS and SSHFP resource
1931    /// records.
1932    ///
1933    /// If this option is set to `yes`, the client will implicitly trust keys
1934    /// that match a secure fingerprint from DNS. Insecure fingerprints will
1935    /// be handled as if this option was set to `ask`. If this option is set
1936    /// to `ask`, information on fingerprint match will be displayed, but
1937    /// the user will still need to confirm new host keys according to the
1938    /// StrictHostKeyChecking option. The argument must be `yes`, `no`, or
1939    /// `ask`. The default is `no`. Note that this option applies to
1940    /// protocol version 2 only.
1941    ///
1942    /// See also VERIFYING HOST KEYS in ssh(1).
1943    VerifyHostKeyDNS,
1944
1945    /// Optionally specifies additional text to append to the SSH protocol
1946    /// banner sent by the server upon connection.
1947    ///
1948    /// The default is `FreeBSD-20200214`. The value `none` may be used to
1949    /// disable this.
1950    VersionAddendum,
1951
1952    /// If this flag is set to `yes`, an ASCII art representation of the
1953    /// remote host key fingerprint is printed in addition to the hex
1954    /// fingerprint string at login and for unknown host keys.
1955    ///
1956    /// If this flag is set to `no`, no fingerprint strings are printed at login
1957    /// and only the hex fingerprint string will be printed for unknown host
1958    /// keys. The default is `no`.
1959    VisualHostKey,
1960
1961    /// Specifies the first display number available for sshd(8)'s X11
1962    /// forwarding.
1963    ///
1964    /// This prevents sshd from interfering with real X11 servers. The default
1965    /// is 10.
1966    X11DisplayOffset,
1967
1968    /// Specifies whether X11 forwarding is permitted.
1969    ///
1970    /// The argument must be `yes` or `no`. The default is `yes`.
1971    ///
1972    /// When X11 forwarding is enabled, there may be additional exposure to the
1973    /// server and to client displays if the sshd(8) proxy display is configured
1974    /// to listen on the wildcard address (see `X11UseLocalhost`), though this
1975    /// is not the default. Additionally, the authentication spoofing and
1976    /// authentication data verification and substitution occur on the client
1977    /// side. The security risk of using X11 forwarding is that the client's X11
1978    /// display server may be exposed to attack when the SSH client requests
1979    /// forwarding (see the warnings for ForwardX11 in ssh_config(5)). A system
1980    /// administrator may have a stance in which they want to protect clients
1981    /// that may expose themselves to attack by unwittingly requesting X11
1982    /// forwarding, which can warrant a no setting.
1983    ///
1984    /// Note that disabling X11 forwarding does not prevent users from
1985    /// forwarding X11 traffic, as users can always install their own
1986    /// forwarders.
1987    X11Forwarding,
1988
1989    /// Specifies whether sshd(8) should bind the X11 forwarding server to the
1990    /// loopback address or to the wildcard address.
1991    ///
1992    /// By default, sshd binds the forwarding server to the loopback address and
1993    /// sets the hostname part of the `DISPLAY` environment variable to
1994    /// localhost. This prevents remote hosts from connecting to the proxy
1995    /// display. However, some older X11 clients may not function with this
1996    /// configuration. `X11UseLocalhost` may be set to `no` to specify that the
1997    /// forwarding server should be bound to the wildcard address. The argument
1998    /// must be `yes` or `no`. The default is `yes`.
1999    X11UseLocalhost,
2000
2001    /// Specifies the full pathname of the xauth(1) program.
2002    ///
2003    /// The default is `/usr/bin/xauth`.
2004    XAuthLocation,
2005}
2006
2007impl FromStr for SshOptionKey {
2008    type Err = ConfigError;
2009
2010    fn from_str(s: &str) -> Result<Self, Self::Err> {
2011        if s.eq_ignore_ascii_case("host") {
2012            Ok(Self::Host)
2013        } else if s.eq_ignore_ascii_case("acceptenv") {
2014            Ok(Self::AcceptEnv)
2015        } else if s.eq_ignore_ascii_case("addkeystoagent") {
2016            Ok(Self::AddKeysToAgent)
2017        } else if s.eq_ignore_ascii_case("addressfamily") {
2018            Ok(Self::AddressFamily)
2019        } else if s.eq_ignore_ascii_case("allowagentforwarding") {
2020            Ok(Self::AllowAgentForwarding)
2021        } else if s.eq_ignore_ascii_case("allowgroups") {
2022            Ok(Self::AllowGroups)
2023        } else if s.eq_ignore_ascii_case("allowstreamlocalforwarding") {
2024            Ok(Self::AllowStreamLocalForwarding)
2025        } else if s.eq_ignore_ascii_case("allowtcpforwarding") {
2026            Ok(Self::AllowTcpForwarding)
2027        } else if s.eq_ignore_ascii_case("allowusers") {
2028            Ok(Self::AllowUsers)
2029        } else if s.eq_ignore_ascii_case("authenticationmethods") {
2030            Ok(Self::AuthenticationMethods)
2031        } else if s.eq_ignore_ascii_case("authorizedkeyscommand") {
2032            Ok(Self::AuthorizedKeysCommand)
2033        } else if s.eq_ignore_ascii_case("authorizedkeyscommanduser") {
2034            Ok(Self::AuthorizedKeysCommandUser)
2035        } else if s.eq_ignore_ascii_case("authorizedkeysfile") {
2036            Ok(Self::AuthorizedKeysFile)
2037        } else if s.eq_ignore_ascii_case("authorizedprincipalscommand") {
2038            Ok(Self::AuthorizedPrincipalsCommand)
2039        } else if s.eq_ignore_ascii_case("authorizedprincipalscommanduser") {
2040            Ok(Self::AuthorizedPrincipalsCommandUser)
2041        } else if s.eq_ignore_ascii_case("authorizedprincipalsfile") {
2042            Ok(Self::AuthorizedPrincipalsFile)
2043        } else if s.eq_ignore_ascii_case("banner") {
2044            Ok(Self::Banner)
2045        } else if s.eq_ignore_ascii_case("batchmode") {
2046            Ok(Self::BatchMode)
2047        } else if s.eq_ignore_ascii_case("bindaddress") {
2048            Ok(Self::BindAddress)
2049        } else if s.eq_ignore_ascii_case("bindinterface") {
2050            Ok(Self::BindInterface)
2051        } else if s.eq_ignore_ascii_case("canonicaldomains") {
2052            Ok(Self::CanonicalDomains)
2053        } else if s.eq_ignore_ascii_case("canonicalizefallbacklocal") {
2054            Ok(Self::CanonicalizeFallbackLocal)
2055        } else if s.eq_ignore_ascii_case("canonicalizehostname") {
2056            Ok(Self::CanonicalizeHostname)
2057        } else if s.eq_ignore_ascii_case("canonicalizemaxdots") {
2058            Ok(Self::CanonicalizeMaxDots)
2059        } else if s.eq_ignore_ascii_case("canonicalizepermittedcnames") {
2060            Ok(Self::CanonicalizePermittedCNAMEs)
2061        } else if s.eq_ignore_ascii_case("casignaturealgorithms") {
2062            Ok(Self::CASignatureAlgorithms)
2063        } else if s.eq_ignore_ascii_case("certificatefile") {
2064            Ok(Self::CertificateFile)
2065        } else if s.eq_ignore_ascii_case("challengeresponseauthentication") {
2066            Ok(Self::ChallengeResponseAuthentication)
2067        } else if s.eq_ignore_ascii_case("checkhostip") {
2068            Ok(Self::CheckHostIP)
2069        } else if s.eq_ignore_ascii_case("chrootdirectory") {
2070            Ok(Self::ChrootDirectory)
2071        } else if s.eq_ignore_ascii_case("cipher") {
2072            Ok(Self::Cipher)
2073        } else if s.eq_ignore_ascii_case("ciphers") {
2074            Ok(Self::Ciphers)
2075        } else if s.eq_ignore_ascii_case("clearallforwardings") {
2076            Ok(Self::ClearAllForwardings)
2077        } else if s.eq_ignore_ascii_case("clientalivecountmax") {
2078            Ok(Self::ClientAliveCountMax)
2079        } else if s.eq_ignore_ascii_case("clientaliveinterval") {
2080            Ok(Self::ClientAliveInterval)
2081        } else if s.eq_ignore_ascii_case("compression") {
2082            Ok(Self::Compression)
2083        } else if s.eq_ignore_ascii_case("compressionlevel") {
2084            Ok(Self::CompressionLevel)
2085        } else if s.eq_ignore_ascii_case("connectionattempts") {
2086            Ok(Self::ConnectionAttempts)
2087        } else if s.eq_ignore_ascii_case("connecttimeout") {
2088            Ok(Self::ConnectTimeout)
2089        } else if s.eq_ignore_ascii_case("controlmaster") {
2090            Ok(Self::ControlMaster)
2091        } else if s.eq_ignore_ascii_case("controlpath") {
2092            Ok(Self::ControlPath)
2093        } else if s.eq_ignore_ascii_case("controlpersist") {
2094            Ok(Self::ControlPersist)
2095        } else if s.eq_ignore_ascii_case("denygroups") {
2096            Ok(Self::DenyGroups)
2097        } else if s.eq_ignore_ascii_case("denyusers") {
2098            Ok(Self::DenyUsers)
2099        } else if s.eq_ignore_ascii_case("disableforwarding") {
2100            Ok(Self::DisableForwarding)
2101        } else if s.eq_ignore_ascii_case("dynamicforward") {
2102            Ok(Self::DynamicForward)
2103        } else if s.eq_ignore_ascii_case("enablesshkeysign") {
2104            Ok(Self::EnableSSHKeysign)
2105        } else if s.eq_ignore_ascii_case("escapechar") {
2106            Ok(Self::EscapeChar)
2107        } else if s.eq_ignore_ascii_case("exitonforwardfailure") {
2108            Ok(Self::ExitOnForwardFailure)
2109        } else if s.eq_ignore_ascii_case("exposeauthinfo") {
2110            Ok(Self::ExposeAuthInfo)
2111        } else if s.eq_ignore_ascii_case("fingerprinthash") {
2112            Ok(Self::FingerprintHash)
2113        } else if s.eq_ignore_ascii_case("forcecommand") {
2114            Ok(Self::ForceCommand)
2115        } else if s.eq_ignore_ascii_case("forkafterauthentication") {
2116            Ok(Self::ForkAfterAuthentication)
2117        } else if s.eq_ignore_ascii_case("forwardagent") {
2118            Ok(Self::ForwardAgent)
2119        } else if s.eq_ignore_ascii_case("forwardx11") {
2120            Ok(Self::ForwardX11)
2121        } else if s.eq_ignore_ascii_case("forwardx11timeout") {
2122            Ok(Self::ForwardX11Timeout)
2123        } else if s.eq_ignore_ascii_case("forwardx11trusted") {
2124            Ok(Self::ForwardX11Trusted)
2125        } else if s.eq_ignore_ascii_case("gatewayports") {
2126            Ok(Self::GatewayPorts)
2127        } else if s.eq_ignore_ascii_case("globalknownhostsfile") {
2128            Ok(Self::GlobalKnownHostsFile)
2129        } else if s.eq_ignore_ascii_case("gssapiauthentication") {
2130            Ok(Self::GSSAPIAuthentication)
2131        } else if s.eq_ignore_ascii_case("gssapicleanupcredentials") {
2132            Ok(Self::GSSAPICleanupCredentials)
2133        } else if s.eq_ignore_ascii_case("gssapiclientidentity") {
2134            Ok(Self::GSSAPIClientIdentity)
2135        } else if s.eq_ignore_ascii_case("gssapidelegatecredentials") {
2136            Ok(Self::GSSAPIDelegateCredentials)
2137        } else if s.eq_ignore_ascii_case("gssapikeyexchange") {
2138            Ok(Self::GSSAPIKeyExchange)
2139        } else if s.eq_ignore_ascii_case("gssapirenewalforcesrekey") {
2140            Ok(Self::GSSAPIRenewalForcesRekey)
2141        } else if s.eq_ignore_ascii_case("gssapistrictacceptorcheck") {
2142            Ok(Self::GSSAPIStrictAcceptorCheck)
2143        } else if s.eq_ignore_ascii_case("gssapitrustdns") {
2144            Ok(Self::GSSAPITrustDns)
2145        } else if s.eq_ignore_ascii_case("hashknownhosts") {
2146            Ok(Self::HashKnownHosts)
2147        } else if s.eq_ignore_ascii_case("hostbasedacceptedalgorithms") {
2148            Ok(Self::HostbasedAcceptedAlgorithms)
2149        } else if s.eq_ignore_ascii_case("hostbasedacceptedkeytypes") {
2150            Ok(Self::HostbasedAcceptedKeyTypes)
2151        } else if s.eq_ignore_ascii_case("hostbasedauthentication") {
2152            Ok(Self::HostbasedAuthentication)
2153        } else if s.eq_ignore_ascii_case("hostbasedusesnamefrompacketonly") {
2154            Ok(Self::HostbasedUsesNameFromPacketOnly)
2155        } else if s.eq_ignore_ascii_case("hostcertificate") {
2156            Ok(Self::HostCertificate)
2157        } else if s.eq_ignore_ascii_case("hostkey") {
2158            Ok(Self::HostKey)
2159        } else if s.eq_ignore_ascii_case("hostkeyagent") {
2160            Ok(Self::HostKeyAgent)
2161        } else if s.eq_ignore_ascii_case("hostkeyalgorithms") {
2162            Ok(Self::HostKeyAlgorithms)
2163        } else if s.eq_ignore_ascii_case("hostkeyalias") {
2164            Ok(Self::HostKeyAlias)
2165        } else if s.eq_ignore_ascii_case("hostname") {
2166            Ok(Self::Hostname)
2167        } else if s.eq_ignore_ascii_case("hostname") {
2168            Ok(Self::HostName)
2169        } else if s.eq_ignore_ascii_case("identitiesonly") {
2170            Ok(Self::IdentitiesOnly)
2171        } else if s.eq_ignore_ascii_case("identityagent") {
2172            Ok(Self::IdentityAgent)
2173        } else if s.eq_ignore_ascii_case("identityfile") {
2174            Ok(Self::IdentityFile)
2175        } else if s.eq_ignore_ascii_case("ignorerhosts") {
2176            Ok(Self::IgnoreRhosts)
2177        } else if s.eq_ignore_ascii_case("ignoreunknown") {
2178            Ok(Self::IgnoreUnknown)
2179        } else if s.eq_ignore_ascii_case("ignoreuserknownhosts") {
2180            Ok(Self::IgnoreUserKnownHosts)
2181        } else if s.eq_ignore_ascii_case("include") {
2182            Ok(Self::Include)
2183        } else if s.eq_ignore_ascii_case("ipqos") {
2184            Ok(Self::IPQoS)
2185        } else if s.eq_ignore_ascii_case("kbdinteractiveauthentication") {
2186            Ok(Self::KbdInteractiveAuthentication)
2187        } else if s.eq_ignore_ascii_case("kbdinteractivedevices") {
2188            Ok(Self::KbdInteractiveDevices)
2189        } else if s.eq_ignore_ascii_case("kerberosauthentication") {
2190            Ok(Self::KerberosAuthentication)
2191        } else if s.eq_ignore_ascii_case("kerberosgetafstoken") {
2192            Ok(Self::KerberosGetAFSToken)
2193        } else if s.eq_ignore_ascii_case("kerberosorlocalpasswd") {
2194            Ok(Self::KerberosOrLocalPasswd)
2195        } else if s.eq_ignore_ascii_case("kerberosticketcleanup") {
2196            Ok(Self::KerberosTicketCleanup)
2197        } else if s.eq_ignore_ascii_case("kexalgorithms") {
2198            Ok(Self::KexAlgorithms)
2199        } else if s.eq_ignore_ascii_case("knownhostscommand") {
2200            Ok(Self::KnownHostsCommand)
2201        } else if s.eq_ignore_ascii_case("listenaddress") {
2202            Ok(Self::ListenAddress)
2203        } else if s.eq_ignore_ascii_case("localcommand") {
2204            Ok(Self::LocalCommand)
2205        } else if s.eq_ignore_ascii_case("localforward") {
2206            Ok(Self::LocalForward)
2207        } else if s.eq_ignore_ascii_case("logingracetime") {
2208            Ok(Self::LoginGraceTime)
2209        } else if s.eq_ignore_ascii_case("loglevel") {
2210            Ok(Self::LogLevel)
2211        } else if s.eq_ignore_ascii_case("logverbose") {
2212            Ok(Self::LogVerbose)
2213        } else if s.eq_ignore_ascii_case("macs") {
2214            Ok(Self::MACs)
2215        } else if s.eq_ignore_ascii_case("match") {
2216            Ok(Self::Match)
2217        } else if s.eq_ignore_ascii_case("maxauthtries") {
2218            Ok(Self::MaxAuthTries)
2219        } else if s.eq_ignore_ascii_case("maxsessions") {
2220            Ok(Self::MaxSessions)
2221        } else if s.eq_ignore_ascii_case("maxstartups") {
2222            Ok(Self::MaxStartups)
2223        } else if s.eq_ignore_ascii_case("nohostauthenticationforlocalhost") {
2224            Ok(Self::NoHostAuthenticationForLocalhost)
2225        } else if s.eq_ignore_ascii_case("numberofpasswordprompts") {
2226            Ok(Self::NumberOfPasswordPrompts)
2227        } else if s.eq_ignore_ascii_case("passwordauthentication") {
2228            Ok(Self::PasswordAuthentication)
2229        } else if s.eq_ignore_ascii_case("permitemptypasswords") {
2230            Ok(Self::PermitEmptyPasswords)
2231        } else if s.eq_ignore_ascii_case("permitlisten") {
2232            Ok(Self::PermitListen)
2233        } else if s.eq_ignore_ascii_case("permitlocalcommand") {
2234            Ok(Self::PermitLocalCommand)
2235        } else if s.eq_ignore_ascii_case("permitopen") {
2236            Ok(Self::PermitOpen)
2237        } else if s.eq_ignore_ascii_case("permitremoteopen") {
2238            Ok(Self::PermitRemoteOpen)
2239        } else if s.eq_ignore_ascii_case("permitrootlogin") {
2240            Ok(Self::PermitRootLogin)
2241        } else if s.eq_ignore_ascii_case("permittty") {
2242            Ok(Self::PermitTTY)
2243        } else if s.eq_ignore_ascii_case("permittunnel") {
2244            Ok(Self::PermitTunnel)
2245        } else if s.eq_ignore_ascii_case("permituserenvironment") {
2246            Ok(Self::PermitUserEnvironment)
2247        } else if s.eq_ignore_ascii_case("permituserrc") {
2248            Ok(Self::PermitUserRC)
2249        } else if s.eq_ignore_ascii_case("pidfile") {
2250            Ok(Self::PidFile)
2251        } else if s.eq_ignore_ascii_case("pkcs11provider") {
2252            Ok(Self::PKCS11Provider)
2253        } else if s.eq_ignore_ascii_case("port") {
2254            Ok(Self::Port)
2255        } else if s.eq_ignore_ascii_case("preferredauthentications") {
2256            Ok(Self::PreferredAuthentications)
2257        } else if s.eq_ignore_ascii_case("printlastlog") {
2258            Ok(Self::PrintLastLog)
2259        } else if s.eq_ignore_ascii_case("printmotd") {
2260            Ok(Self::PrintMotd)
2261        } else if s.eq_ignore_ascii_case("protocol") {
2262            Ok(Self::Protocol)
2263        } else if s.eq_ignore_ascii_case("proxycommand") {
2264            Ok(Self::ProxyCommand)
2265        } else if s.eq_ignore_ascii_case("proxyjump") {
2266            Ok(Self::ProxyJump)
2267        } else if s.eq_ignore_ascii_case("proxyusefdpass") {
2268            Ok(Self::ProxyUseFdpass)
2269        } else if s.eq_ignore_ascii_case("pubkeyacceptedalgorithms") {
2270            Ok(Self::PubkeyAcceptedAlgorithms)
2271        } else if s.eq_ignore_ascii_case("pubkeyacceptedkeytypes") {
2272            Ok(Self::PubkeyAcceptedKeyTypes)
2273        } else if s.eq_ignore_ascii_case("pubkeyauthentication") {
2274            Ok(Self::PubkeyAuthentication)
2275        } else if s.eq_ignore_ascii_case("rdomain") {
2276            Ok(Self::RDomain)
2277        } else if s.eq_ignore_ascii_case("rekeylimit") {
2278            Ok(Self::RekeyLimit)
2279        } else if s.eq_ignore_ascii_case("remotecommand") {
2280            Ok(Self::RemoteCommand)
2281        } else if s.eq_ignore_ascii_case("remoteforward") {
2282            Ok(Self::RemoteForward)
2283        } else if s.eq_ignore_ascii_case("requesttty") {
2284            Ok(Self::RequestTTY)
2285        } else if s.eq_ignore_ascii_case("revokedhostkeys") {
2286            Ok(Self::RevokedHostKeys)
2287        } else if s.eq_ignore_ascii_case("revokedkeys") {
2288            Ok(Self::RevokedKeys)
2289        } else if s.eq_ignore_ascii_case("rhostsrsaauthentication") {
2290            Ok(Self::RhostsRSAAuthentication)
2291        } else if s.eq_ignore_ascii_case("rsaauthentication") {
2292            Ok(Self::RSAAuthentication)
2293        } else if s.eq_ignore_ascii_case("securitykeyprovider") {
2294            Ok(Self::SecurityKeyProvider)
2295        } else if s.eq_ignore_ascii_case("sendenv") {
2296            Ok(Self::SendEnv)
2297        } else if s.eq_ignore_ascii_case("serveralivecountmax") {
2298            Ok(Self::ServerAliveCountMax)
2299        } else if s.eq_ignore_ascii_case("serveraliveinterval") {
2300            Ok(Self::ServerAliveInterval)
2301        } else if s.eq_ignore_ascii_case("sessiontype") {
2302            Ok(Self::SessionType)
2303        } else if s.eq_ignore_ascii_case("setenv") {
2304            Ok(Self::SetEnv)
2305        } else if s.eq_ignore_ascii_case("smartcarddevice") {
2306            Ok(Self::SmartcardDevice)
2307        } else if s.eq_ignore_ascii_case("stdinnull") {
2308            Ok(Self::StdinNull)
2309        } else if s.eq_ignore_ascii_case("streamlocalbindmask") {
2310            Ok(Self::StreamLocalBindMask)
2311        } else if s.eq_ignore_ascii_case("streamlocalbindunlink") {
2312            Ok(Self::StreamLocalBindUnlink)
2313        } else if s.eq_ignore_ascii_case("stricthostkeychecking") {
2314            Ok(Self::StrictHostKeyChecking)
2315        } else if s.eq_ignore_ascii_case("strictmodes") {
2316            Ok(Self::StrictModes)
2317        } else if s.eq_ignore_ascii_case("subsystem") {
2318            Ok(Self::Subsystem)
2319        } else if s.eq_ignore_ascii_case("syslogfacility") {
2320            Ok(Self::SyslogFacility)
2321        } else if s.eq_ignore_ascii_case("tcpkeepalive") {
2322            Ok(Self::TCPKeepAlive)
2323        } else if s.eq_ignore_ascii_case("trustedusercakeys") {
2324            Ok(Self::TrustedUserCAKeys)
2325        } else if s.eq_ignore_ascii_case("tunnel") {
2326            Ok(Self::Tunnel)
2327        } else if s.eq_ignore_ascii_case("tunneldevice") {
2328            Ok(Self::TunnelDevice)
2329        } else if s.eq_ignore_ascii_case("updatehostkeys") {
2330            Ok(Self::UpdateHostKeys)
2331        } else if s.eq_ignore_ascii_case("useblacklist") {
2332            Ok(Self::UseBlacklist)
2333        } else if s.eq_ignore_ascii_case("usedns") {
2334            Ok(Self::UseDNS)
2335        } else if s.eq_ignore_ascii_case("usepam") {
2336            Ok(Self::UsePAM)
2337        } else if s.eq_ignore_ascii_case("useprivilegedport") {
2338            Ok(Self::UsePrivilegedPort)
2339        } else if s.eq_ignore_ascii_case("user") {
2340            Ok(Self::User)
2341        } else if s.eq_ignore_ascii_case("userknownhostsfile") {
2342            Ok(Self::UserKnownHostsFile)
2343        } else if s.eq_ignore_ascii_case("verifyhostkeydns") {
2344            Ok(Self::VerifyHostKeyDNS)
2345        } else if s.eq_ignore_ascii_case("versionaddendum") {
2346            Ok(Self::VersionAddendum)
2347        } else if s.eq_ignore_ascii_case("visualhostkey") {
2348            Ok(Self::VisualHostKey)
2349        } else if s.eq_ignore_ascii_case("x11displayoffset") {
2350            Ok(Self::X11DisplayOffset)
2351        } else if s.eq_ignore_ascii_case("x11forwarding") {
2352            Ok(Self::X11Forwarding)
2353        } else if s.eq_ignore_ascii_case("x11uselocalhost") {
2354            Ok(Self::X11UseLocalhost)
2355        } else if s.eq_ignore_ascii_case("xauthlocation") {
2356            Ok(Self::XAuthLocation)
2357        } else {
2358            Err(ConfigError::SshOptionUnknown { key: s.to_string() })
2359        }
2360    }
2361}
2362
2363impl fmt::Display for SshOptionKey {
2364    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2365        match self {
2366            Self::Host => write!(f, "Host"),
2367            Self::AcceptEnv => write!(f, "AcceptEnv"),
2368            Self::AddKeysToAgent => write!(f, "AddKeysToAgent"),
2369            Self::AddressFamily => write!(f, "AddressFamily"),
2370            Self::AllowAgentForwarding => write!(f, "AllowAgentForwarding"),
2371            Self::AllowGroups => write!(f, "AllowGroups"),
2372            Self::AllowStreamLocalForwarding => write!(f, "AllowStreamLocalForwarding"),
2373            Self::AllowTcpForwarding => write!(f, "AllowTcpForwarding"),
2374            Self::AllowUsers => write!(f, "AllowUsers"),
2375            Self::AuthenticationMethods => write!(f, "AuthenticationMethods"),
2376            Self::AuthorizedKeysCommand => write!(f, "AuthorizedKeysCommand"),
2377            Self::AuthorizedKeysCommandUser => write!(f, "AuthorizedKeysCommandUser"),
2378            Self::AuthorizedKeysFile => write!(f, "AuthorizedKeysFile"),
2379            Self::AuthorizedPrincipalsCommand => write!(f, "AuthorizedPrincipalsCommand"),
2380            Self::AuthorizedPrincipalsCommandUser => write!(f, "AuthorizedPrincipalsCommandUser"),
2381            Self::AuthorizedPrincipalsFile => write!(f, "AuthorizedPrincipalsFile"),
2382            Self::Banner => write!(f, "Banner"),
2383            Self::BatchMode => write!(f, "BatchMode"),
2384            Self::BindAddress => write!(f, "BindAddress"),
2385            Self::BindInterface => write!(f, "BindInterface"),
2386            Self::CanonicalDomains => write!(f, "CanonicalDomains"),
2387            Self::CanonicalizeFallbackLocal => write!(f, "CanonicalizeFallbackLocal"),
2388            Self::CanonicalizeHostname => write!(f, "CanonicalizeHostname"),
2389            Self::CanonicalizeMaxDots => write!(f, "CanonicalizeMaxDots"),
2390            Self::CanonicalizePermittedCNAMEs => write!(f, "CanonicalizePermittedCNAMEs"),
2391            Self::CASignatureAlgorithms => write!(f, "CASignatureAlgorithms"),
2392            Self::CertificateFile => write!(f, "CertificateFile"),
2393            Self::ChallengeResponseAuthentication => write!(f, "ChallengeResponseAuthentication"),
2394            Self::CheckHostIP => write!(f, "CheckHostIP"),
2395            Self::ChrootDirectory => write!(f, "ChrootDirectory"),
2396            Self::Cipher => write!(f, "Cipher"),
2397            Self::Ciphers => write!(f, "Ciphers"),
2398            Self::ClearAllForwardings => write!(f, "ClearAllForwardings"),
2399            Self::ClientAliveCountMax => write!(f, "ClientAliveCountMax"),
2400            Self::ClientAliveInterval => write!(f, "ClientAliveInterval"),
2401            Self::Compression => write!(f, "Compression"),
2402            Self::CompressionLevel => write!(f, "CompressionLevel"),
2403            Self::ConnectionAttempts => write!(f, "ConnectionAttempts"),
2404            Self::ConnectTimeout => write!(f, "ConnectTimeout"),
2405            Self::ControlMaster => write!(f, "ControlMaster"),
2406            Self::ControlPath => write!(f, "ControlPath"),
2407            Self::ControlPersist => write!(f, "ControlPersist"),
2408            Self::DenyGroups => write!(f, "DenyGroups"),
2409            Self::DenyUsers => write!(f, "DenyUsers"),
2410            Self::DisableForwarding => write!(f, "DisableForwarding"),
2411            Self::DynamicForward => write!(f, "DynamicForward"),
2412            Self::EnableSSHKeysign => write!(f, "EnableSSHKeysign"),
2413            Self::EscapeChar => write!(f, "EscapeChar"),
2414            Self::ExitOnForwardFailure => write!(f, "ExitOnForwardFailure"),
2415            Self::ExposeAuthInfo => write!(f, "ExposeAuthInfo"),
2416            Self::FingerprintHash => write!(f, "FingerprintHash"),
2417            Self::ForceCommand => write!(f, "ForceCommand"),
2418            Self::ForkAfterAuthentication => write!(f, "ForkAfterAuthentication"),
2419            Self::ForwardAgent => write!(f, "ForwardAgent"),
2420            Self::ForwardX11 => write!(f, "ForwardX11"),
2421            Self::ForwardX11Timeout => write!(f, "ForwardX11Timeout"),
2422            Self::ForwardX11Trusted => write!(f, "ForwardX11Trusted"),
2423            Self::GatewayPorts => write!(f, "GatewayPorts"),
2424            Self::GlobalKnownHostsFile => write!(f, "GlobalKnownHostsFile"),
2425            Self::GSSAPIAuthentication => write!(f, "GSSAPIAuthentication"),
2426            Self::GSSAPICleanupCredentials => write!(f, "GSSAPICleanupCredentials"),
2427            Self::GSSAPIClientIdentity => write!(f, "GSSAPIClientIdentity"),
2428            Self::GSSAPIDelegateCredentials => write!(f, "GSSAPIDelegateCredentials"),
2429            Self::GSSAPIKeyExchange => write!(f, "GSSAPIKeyExchange"),
2430            Self::GSSAPIRenewalForcesRekey => write!(f, "GSSAPIRenewalForcesRekey"),
2431            Self::GSSAPIStrictAcceptorCheck => write!(f, "GSSAPIStrictAcceptorCheck"),
2432            Self::GSSAPITrustDns => write!(f, "GSSAPITrustDns"),
2433            Self::HashKnownHosts => write!(f, "HashKnownHosts"),
2434            Self::HostbasedAcceptedAlgorithms => write!(f, "HostbasedAcceptedAlgorithms"),
2435            Self::HostbasedAcceptedKeyTypes => write!(f, "HostbasedAcceptedKeyTypes"),
2436            Self::HostbasedAuthentication => write!(f, "HostbasedAuthentication"),
2437            Self::HostbasedUsesNameFromPacketOnly => write!(f, "HostbasedUsesNameFromPacketOnly"),
2438            Self::HostCertificate => write!(f, "HostCertificate"),
2439            Self::HostKey => write!(f, "HostKey"),
2440            Self::HostKeyAgent => write!(f, "HostKeyAgent"),
2441            Self::HostKeyAlgorithms => write!(f, "HostKeyAlgorithms"),
2442            Self::HostKeyAlias => write!(f, "HostKeyAlias"),
2443            Self::Hostname => write!(f, "Hostname"),
2444            Self::HostName => write!(f, "HostName"),
2445            Self::IdentitiesOnly => write!(f, "IdentitiesOnly"),
2446            Self::IdentityAgent => write!(f, "IdentityAgent"),
2447            Self::IdentityFile => write!(f, "IdentityFile"),
2448            Self::IgnoreRhosts => write!(f, "IgnoreRhosts"),
2449            Self::IgnoreUnknown => write!(f, "IgnoreUnknown"),
2450            Self::IgnoreUserKnownHosts => write!(f, "IgnoreUserKnownHosts"),
2451            Self::Include => write!(f, "Include"),
2452            Self::IPQoS => write!(f, "IPQoS"),
2453            Self::KbdInteractiveAuthentication => write!(f, "KbdInteractiveAuthentication"),
2454            Self::KbdInteractiveDevices => write!(f, "KbdInteractiveDevices"),
2455            Self::KerberosAuthentication => write!(f, "KerberosAuthentication"),
2456            Self::KerberosGetAFSToken => write!(f, "KerberosGetAFSToken"),
2457            Self::KerberosOrLocalPasswd => write!(f, "KerberosOrLocalPasswd"),
2458            Self::KerberosTicketCleanup => write!(f, "KerberosTicketCleanup"),
2459            Self::KexAlgorithms => write!(f, "KexAlgorithms"),
2460            Self::KnownHostsCommand => write!(f, "KnownHostsCommand"),
2461            Self::ListenAddress => write!(f, "ListenAddress"),
2462            Self::LocalCommand => write!(f, "LocalCommand"),
2463            Self::LocalForward => write!(f, "LocalForward"),
2464            Self::LoginGraceTime => write!(f, "LoginGraceTime"),
2465            Self::LogLevel => write!(f, "LogLevel"),
2466            Self::LogVerbose => write!(f, "LogVerbose"),
2467            Self::MACs => write!(f, "MACs"),
2468            Self::Match => write!(f, "Match"),
2469            Self::MaxAuthTries => write!(f, "MaxAuthTries"),
2470            Self::MaxSessions => write!(f, "MaxSessions"),
2471            Self::MaxStartups => write!(f, "MaxStartups"),
2472            Self::NoHostAuthenticationForLocalhost => write!(f, "NoHostAuthenticationForLocalhost"),
2473            Self::NumberOfPasswordPrompts => write!(f, "NumberOfPasswordPrompts"),
2474            Self::PasswordAuthentication => write!(f, "PasswordAuthentication"),
2475            Self::PermitEmptyPasswords => write!(f, "PermitEmptyPasswords"),
2476            Self::PermitListen => write!(f, "PermitListen"),
2477            Self::PermitLocalCommand => write!(f, "PermitLocalCommand"),
2478            Self::PermitOpen => write!(f, "PermitOpen"),
2479            Self::PermitRemoteOpen => write!(f, "PermitRemoteOpen"),
2480            Self::PermitRootLogin => write!(f, "PermitRootLogin"),
2481            Self::PermitTTY => write!(f, "PermitTTY"),
2482            Self::PermitTunnel => write!(f, "PermitTunnel"),
2483            Self::PermitUserEnvironment => write!(f, "PermitUserEnvironment"),
2484            Self::PermitUserRC => write!(f, "PermitUserRC"),
2485            Self::PidFile => write!(f, "PidFile"),
2486            Self::PKCS11Provider => write!(f, "PKCS11Provider"),
2487            Self::Port => write!(f, "Port"),
2488            Self::PreferredAuthentications => write!(f, "PreferredAuthentications"),
2489            Self::PrintLastLog => write!(f, "PrintLastLog"),
2490            Self::PrintMotd => write!(f, "PrintMotd"),
2491            Self::Protocol => write!(f, "Protocol"),
2492            Self::ProxyCommand => write!(f, "ProxyCommand"),
2493            Self::ProxyJump => write!(f, "ProxyJump"),
2494            Self::ProxyUseFdpass => write!(f, "ProxyUseFdpass"),
2495            Self::PubkeyAcceptedAlgorithms => write!(f, "PubkeyAcceptedAlgorithms"),
2496            Self::PubkeyAcceptedKeyTypes => write!(f, "PubkeyAcceptedKeyTypes"),
2497            Self::PubkeyAuthentication => write!(f, "PubkeyAuthentication"),
2498            Self::RDomain => write!(f, "RDomain"),
2499            Self::RekeyLimit => write!(f, "RekeyLimit"),
2500            Self::RemoteCommand => write!(f, "RemoteCommand"),
2501            Self::RemoteForward => write!(f, "RemoteForward"),
2502            Self::RequestTTY => write!(f, "RequestTTY"),
2503            Self::RevokedHostKeys => write!(f, "RevokedHostKeys"),
2504            Self::RevokedKeys => write!(f, "RevokedKeys"),
2505            Self::RhostsRSAAuthentication => write!(f, "RhostsRSAAuthentication"),
2506            Self::RSAAuthentication => write!(f, "RSAAuthentication"),
2507            Self::SecurityKeyProvider => write!(f, "SecurityKeyProvider"),
2508            Self::SendEnv => write!(f, "SendEnv"),
2509            Self::ServerAliveCountMax => write!(f, "ServerAliveCountMax"),
2510            Self::ServerAliveInterval => write!(f, "ServerAliveInterval"),
2511            Self::SessionType => write!(f, "SessionType"),
2512            Self::SetEnv => write!(f, "SetEnv"),
2513            Self::SmartcardDevice => write!(f, "SmartcardDevice"),
2514            Self::StdinNull => write!(f, "StdinNull"),
2515            Self::StreamLocalBindMask => write!(f, "StreamLocalBindMask"),
2516            Self::StreamLocalBindUnlink => write!(f, "StreamLocalBindUnlink"),
2517            Self::StrictHostKeyChecking => write!(f, "StrictHostKeyChecking"),
2518            Self::StrictModes => write!(f, "StrictModes"),
2519            Self::Subsystem => write!(f, "Subsystem"),
2520            Self::SyslogFacility => write!(f, "SyslogFacility"),
2521            Self::TCPKeepAlive => write!(f, "TCPKeepAlive"),
2522            Self::TrustedUserCAKeys => write!(f, "TrustedUserCAKeys"),
2523            Self::Tunnel => write!(f, "Tunnel"),
2524            Self::TunnelDevice => write!(f, "TunnelDevice"),
2525            Self::UpdateHostKeys => write!(f, "UpdateHostKeys"),
2526            Self::UseBlacklist => write!(f, "UseBlacklist"),
2527            Self::UseDNS => write!(f, "UseDNS"),
2528            Self::UsePAM => write!(f, "UsePAM"),
2529            Self::UsePrivilegedPort => write!(f, "UsePrivilegedPort"),
2530            Self::User => write!(f, "User"),
2531            Self::UserKnownHostsFile => write!(f, "UserKnownHostsFile"),
2532            Self::VerifyHostKeyDNS => write!(f, "VerifyHostKeyDNS"),
2533            Self::VersionAddendum => write!(f, "VersionAddendum"),
2534            Self::VisualHostKey => write!(f, "VisualHostKey"),
2535            Self::X11DisplayOffset => write!(f, "X11DisplayOffset"),
2536            Self::X11Forwarding => write!(f, "X11Forwarding"),
2537            Self::X11UseLocalhost => write!(f, "X11UseLocalhost"),
2538            Self::XAuthLocation => write!(f, "XAuthLocation"),
2539        }
2540    }
2541}