Class SshHostConfig
The effective settings for one host, resolved from an SshConfig.
public sealed class SshHostConfig
- Inheritance
-
SshHostConfig
- Inherited Members
Properties
- AddKeysToAgent
AddKeysToAgent: when not null, a key loaded from an identity file that the server accepts is added to the agent with these constraints (yes;confirmasks for each use; a time interval sets the lifetime). Null forno(the default) and forask, which needs a prompt this library does not show.
- AddressFamily
The address family restriction.
- Alias
The host name as given by the caller (the alias,
%n).
- BatchMode
Whether non-interactive mode is requested (
BatchMode).
- BindAddress
The local address to connect from (
BindAddress,ssh -b), or null.
- BindInterface
The network interface to connect from (
BindInterface,ssh -B), or null; BindAddress wins.
- CertificateFiles
Certificate files (
CertificateFile).
- ChannelTimeouts
ChannelTimeout type=interval ...: idle timeouts by channel type, in the order given (the first matching type applies). Empty fornoneor when unset. Entries that do not parse are left out.
- Ciphers
Raw
Ciphersspecification, or null.
- ConnectTimeout
The connection timeout, or null.
- DynamicForwards
DynamicForwardspecifications, as written ([bind:]port).
- ExitOnForwardFailure
Whether a forwarding that cannot be set up fails the connection (
ExitOnForwardFailure).
- ForwardAgent
Whether agent forwarding is requested.
- GatewayPorts
Whether local forwardings may listen on every address, not only loopback, when the bind address says so (
GatewayPorts).
- GlobalKnownHostsFiles
System-wide known_hosts files.
- GssapiAuthentication
Whether Kerberos authentication (
gssapi-with-mic) is tried (GSSAPIAuthentication, off by default as in ssh).
- GssapiDelegateCredentials
Whether the Kerberos ticket is forwarded to the server (
GSSAPIDelegateCredentials, off by default).
- HashKnownHosts
Whether new known_hosts entries are written hashed (
HashKnownHosts).
- HostKeyAlgorithms
Raw
HostKeyAlgorithmsspecification (a list, or+,-or^applied to the defaults, as in OpenSSH), or null.
- HostKeyAlias
The name to look up in known_hosts instead of the host (
HostKeyAlias).
- HostName
The real host name to connect to (
HostName, or the alias).
- IdentitiesOnly
Whether only the configured identities are offered (
IdentitiesOnly).
- IdentityAgent
The agent socket or pipe (
IdentityAgent), ornone/SSH_AUTH_SOCKas written.
- IdentityFiles
Identity files, in order, with tokens and
~expanded. Defaults to the standardid_*names when none are configured.
- KbdInteractiveAuthentication
Whether keyboard-interactive authentication is allowed.
- KexAlgorithms
Raw
KexAlgorithmsspecification, or null.
- KnownHostsCommand
The
KnownHostsCommand, as written (its tokens, including%H %I %K %f %t, are expanded each time it runs), or null. Connecting by alias runs it only with AllowKnownHostsCommand; its output is read as known_hosts lines, in addition to the files.
- LocalForwards
LocalForwardspecifications, as written ([bind:]port host:hostport).
- Macs
Raw
MACsspecification, or null.
- ObscureKeystrokeTiming
ObscureKeystrokeTiming yes|no|interval:milliseconds: the interval keystrokes are sent on in terminal sessions, or null forno. 20 ms foryesand when unset, as in ssh; a value that does not parse, or an interval outside 1 to 1000 ms, also gives 20 ms. See ObscureKeystrokeTiming.
- Options
All directives that applied, by lower-case keyword, with the arguments of the first (or all, for accumulating ones) occurrence. Includes keywords this library has no typed property for.
- PasswordAuthentication
Whether password authentication is allowed.
- Port
The port (default 22).
- PreferredAuthentications
Authentication methods in preference order (
PreferredAuthentications), or empty for the default.
- ProxyCommand
The
ProxyCommand, with tokens expanded, or null.
- ProxyJump
The
ProxyJumphops, in order. Empty for none.
- PubkeyAcceptedAlgorithms
Raw
PubkeyAcceptedAlgorithmsspecification, or null.
- PubkeyAuthentication
Whether public key authentication is allowed.
- RefuseConnection
RefuseConnection yes: connecting to this host is refused outright, before any network activity (OpenSSH 10.0+; meant forMatchblocks that rule out a situation).
- RemoteForwards
RemoteForwardspecifications, as written.
- RequestTty
The TTY request mode.
- RequiredRsaSize
RequiredRSASize: the smallest RSA host key accepted, in bits, or null when unset (SshSharp's own minimum, 2048, applies; ssh's default is 1024). Values below 1024, which ssh refuses, are left out.
- RevokedHostKeys
RevokedHostKeys: a file of host keys never to accept (an OpenSSH KRL, asssh-keygen -kwrites, or a list of public keys), with~and tokens expanded; null when not set (ornone).
- SendEnv
Environment variable name patterns to send (
SendEnv).
- ServerAliveCountMax
The number of unanswered keep-alives before disconnecting (default 3).
- ServerAliveInterval
The interval for server keep-alive messages, or null for none.
- SetEnv
Environment variables to set on the server (
SetEnv); the first definition of a name wins.
- StrictHostKeyChecking
The host key checking policy.
- UpdateHostKeys
Whether known_hosts follows the host keys the server announces after login (
UpdateHostKeys).
- User
The remote user.
- UserKnownHostsFiles
User known_hosts files, with
~expanded.