<PackageReference Include="SSH.NET" Version="2016.0.0-beta1" />

AuthenticationMethod

Base class for all supported authentication methods
using System; using System.Collections.Generic; namespace Renci.SshNet { public abstract class AuthenticationMethod : IAuthenticationMethod { public abstract string Name { get; } public string Username { get; set; } public IList<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); } } }