Table of Contents

Class AuthenticationMethod

Namespace
Renci.SshNet
Assembly
Renci.SshNet.dll

Base class for all supported authentication methods.

public abstract class AuthenticationMethod : IDisposable

Inheritance

Derived

Implements

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.

Dispose(bool)

Releases unmanaged and - optionally - managed resources.

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

true to release both managed and unmanaged resources; false to release only unmanaged resources.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()