Table of Contents

Class AuthenticationMethod

Namespace
Renci.SshNet
Assembly
Renci.SshNet.dll

Base class for all supported authentication methods.

public abstract class AuthenticationMethod

Inheritance

Derived

Inherited Members

Constructors

AuthenticationMethod(string)

Initializes a new instance of the Renci.SshNet.AuthenticationMethod class.

protected AuthenticationMethod(string username)

Parameters

username string

The username.

Exceptions

ArgumentException

username is whitespace or null.

Properties

AllowedAuthentications

Gets or sets the list of allowed authentications.

public string[] AllowedAuthentications { get; protected set; }

Property Value

string[]

Name

Gets the name of the authentication method.

public abstract string Name { get; }

Property Value

string

Username

Gets connection username.

public string Username { get; }

Property Value

string

Methods

Authenticate(Session)

Authenticates the specified session.

public abstract AuthenticationResult Authenticate(Session session)

Parameters

session Session

The session to authenticate.

Returns

AuthenticationResult

The result of the authentication process.