Class SshServiceCollectionExtensions
- Namespace
- Microsoft.Extensions.DependencyInjection
- Assembly
- SshSharp.Extensions.DependencyInjection.dll
Registers SSH endpoints with a service collection.
public static class SshServiceCollectionExtensions
- Inheritance
-
SshServiceCollectionExtensions
- Inherited Members
Methods
- AddSsh(IHealthChecksBuilder, string, string?, HealthStatus?, IEnumerable<string>?, TimeSpan?)
Adds a health check for the SSH endpoint
name: healthy when its shared connection (ISshConnectionProvider) is up, or can be opened, and answers a ping.
- AddSshClient(IServiceCollection, string)
Registers the SSH endpoint
name, with ISshClientFactory and ISshConnectionProvider. Configure it through the returned builder, for example.BindConfiguration("Ssh:Deploy")or.Configure(o => ...), and add.ValidateOnStart()to check its settings when the host starts.
- AddSshClient(IServiceCollection, string, Action<SshEndpointOptions>)
Registers the SSH endpoint
name, configured byconfigure.