Class AMNetAuthorizedKeysAuthenticator
Authorized_keys authenticator configuration.
Implements
Inherited Members
Namespace: ApacheMinaSSHD.NET.Wrapper.Abstractions
Assembly: ApacheMinaSSHD.NET.Wrapper.dll
Syntax
public class AMNetAuthorizedKeysAuthenticator : IAMNetAuthorizedKeysAuthenticator
Remarks
This authenticator delegates OpenSSH-style authorized_keys parsing to Apache MINA SSHD while keeping Java types out of the public .NET API.
Constructors
| Edit this page View SourceAMNetAuthorizedKeysAuthenticator(string, string?)
Creates an authorized_keys authenticator configuration.
Declaration
public AMNetAuthorizedKeysAuthenticator(string path, string? allowedBasePath = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | path | The authorized_keys file path used to validate public keys. |
| string | allowedBasePath | Optional base path. When set, the resolved path must be within this directory to prevent path traversal. |
Properties
| Edit this page View SourceAllowedBasePath
Gets the optional base path used to validate the authorized_keys file path. When set, the resolved path must be within this directory.
Declaration
public string? AllowedBasePath { get; }
Property Value
| Type | Description |
|---|---|
| string |
KeysFilePath
Gets the authorized_keys file path used to validate client public keys.
Declaration
public string KeysFilePath { get; }
Property Value
| Type | Description |
|---|---|
| string |
Remarks
Implementations may return a relative path, but the wrapper normalizes built-in configurations to an absolute path before calling Apache MINA SSHD.
Methods
| Edit this page View SourceFromFile(string)
Creates an authorized_keys authenticator configuration from a file path.
Declaration
public static AMNetAuthorizedKeysAuthenticator FromFile(string path)
Parameters
| Type | Name | Description |
|---|---|---|
| string | path | The authorized_keys file path used to validate public keys. |
Returns
| Type | Description |
|---|---|
| AMNetAuthorizedKeysAuthenticator | An authorized_keys authenticator configuration. |