<PackageReference Include="SSH.NET" Version="2024.2.0" />

AuthenticationMethod

Base class for all supported authentication methods.
public string[] AllowedAuthentications { get; protected set; }

Gets or sets the list of allowed authentications.

public abstract string Name { get; }

Gets the name of the authentication method.

public string Username { get; }

Gets connection username.

protected AuthenticationMethod(string username)

Initializes a new instance of the AuthenticationMethod class.

public abstract AuthenticationResult Authenticate(Session session)

Authenticates the specified session.