Class AMNetPublickeyAuthenticator
Directory-backed public key authenticator that compares incoming key fingerprints against key files in an Authorized_Keys directory.
Implements
Inherited Members
Namespace: ApacheMinaSSHD.NET.Wrapper.Abstractions
Assembly: ApacheMinaSSHD.NET.Wrapper.dll
Syntax
public class AMNetPublickeyAuthenticator : IAMNetPublickeyAuthenticator
Remarks
Supports RSA, ECDSA (NIST P-256, P-384, P-521), and Ed25519 keys in PEM, OpenSSH public key, and SSH2 public key formats. For new applications, prefer AMNetAuthorizedKeysAuthenticator for OpenSSH authorized_keys files or AMNetFingerprintPublickeyAuthenticator when fingerprints are stored in an application database.
Constructors
| Edit this page View SourceAMNetPublickeyAuthenticator(string)
Creates a public key authenticator.
Declaration
public AMNetPublickeyAuthenticator(string authKeysPath = "")
Parameters
| Type | Name | Description |
|---|---|---|
| string | authKeysPath | Base path that contains the Authorized_Keys directory. When empty, a default application data path is used. |
Methods
| Edit this page View SourceAuthenticate(string, string, ISshSession)
Returns whether the supplied public key fingerprint should be accepted for the user.
Declaration
public virtual bool Authenticate(string username, string incomingFingerprint, ISshSession session)
Parameters
| Type | Name | Description |
|---|---|---|
| string | username | The username requested by the client. |
| string | incomingFingerprint | The fingerprint of the public key presented by the client. |
| ISshSession | session | Session metadata for the connection being authenticated. |
Returns
| Type | Description |
|---|---|
| bool |
|