Class SshConfigSettings
- Namespace
- Tmds.Ssh
- Assembly
- Tmds.Ssh.dll
Settings for configuring the SshClient using the OpenSSH ssh_config model.
public sealed class SshConfigSettings
- Inheritance
-
SshConfigSettings
- Inherited Members
Constructors
SshConfigSettings()
Creates default config settings.
public SshConfigSettings()
Properties
AutoConnect
Gets or sets whether to automatically connect when the client is used.
public bool AutoConnect { get; set; }
Property Value
Remarks
Defaults to true.
AutoReconnect
Gets or sets whether to automatically reconnect when the client is used after an unexpected disconnect.
public bool AutoReconnect { get; set; }
Property Value
Remarks
Defaults to false.
BannerHandler
Gets or sets the handler for banners sent by the server during authentication.
public BannerHandler? BannerHandler { get; set; }
Property Value
Remarks
Defaults to a handler that logs the banner at Information level using Log().
Custom handlers can call Log() to log the banner.
Set to null to ignore banners.
ConfigFilePaths
Gets or sets the config file paths.
public List<string> ConfigFilePaths { get; set; }
Property Value
ConnectTimeout
Gets or sets the connection timeout.
public TimeSpan ConnectTimeout { get; set; }
Property Value
Remarks
Defaults to 15 seconds. This is overridden by the ConnectTimeout option (when set).
DefaultConfig
Gets default configuration settings.
public static SshConfigSettings DefaultConfig { get; }
Property Value
DefaultConfigFilePaths
Gets default configuration file paths.
public static IReadOnlyList<string> DefaultConfigFilePaths { get; }
Property Value
HostAuthentication
Gets or sets the host authentication callback for unknown host keys.
public HostAuthentication? HostAuthentication { get; set; }
Property Value
Remarks
The delegate is called for unknown keys when StrictHostKeyChecking is 'ask' (default).
NoConfig
Gets configuration that loads no files.
public static SshConfigSettings NoConfig { get; }
Property Value
Options
Gets or sets config options.
public Dictionary<SshConfigOption, SshConfigOptionValue> Options { get; set; }
Property Value
PasswordPrompt
Gets or sets the password prompt for password authentication.
public PasswordPrompt? PasswordPrompt { get; set; }
Property Value
PostConfigure
Gets or sets a callback that is invoked after the SshClientSettings have been derived from the SSH configuration.
public Action<SshConfigSettings.PostConfigureContext>? PostConfigure { get; set; }