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

AuthenticationMethod

Base class for all supported authentication methods
using Renci.SshNet.Common; using System; namespace Renci.SshNet { public abstract class AuthenticationMethod : IAuthenticationMethod { public abstract string Name { get; } public string Username { get; set; } public string[] AllowedAuthentications { get; set; } protected AuthenticationMethod(string username) { if (username.IsNullOrWhiteSpace()) throw new ArgumentException("username"); Username = username; } public abstract AuthenticationResult Authenticate(Session session); AuthenticationResult IAuthenticationMethod.Authenticate(ISession session) { return Authenticate((Session)session); } } }