Class AMNetSshServerConfig
Provides .NET-friendly server settings for authentication limits, sessions, keep-alives, re-keying, and SSH algorithm selection.
Inherited Members
Namespace: ApacheMinaSSHD.NET.Wrapper
Assembly: ApacheMinaSSHD.NET.Wrapper.dll
Syntax
public sealed class AMNetSshServerConfig
Properties
| Edit this page View SourceAUTH_METHODS
AUTH_METHODS ("auth-methods"): Configures multi-step authentication. It accepts a space-separated list of comma-separated method names. For example, "publickey,password" requires both methods to succeed sequentially.
Declaration
public string AUTH_METHODS { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
AUTH_TIMEOUT
AUTH_TIMEOUT ("auth-timeout"): Maximum time allowed to complete authentication.
Declaration
public TimeSpan AUTH_TIMEOUT { get; set; }
Property Value
| Type | Description |
|---|---|
| TimeSpan |
CIPHERS
Comma-separated list of allowed symmetric ciphers.
Declaration
public string CIPHERS { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
HEARTBEAT_INTERVAL
HEARTBEAT_INTERVAL ("heartbeat-interval"): Server keep-alive interval.
Declaration
public TimeSpan HEARTBEAT_INTERVAL { get; set; }
Property Value
| Type | Description |
|---|---|
| TimeSpan |
HOST_KEY_ALGORITHMS
Comma-separated list of allowed signature/host-key algorithms.
Declaration
public string HOST_KEY_ALGORITHMS { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
IDLE_TIMEOUT
IDLE_TIMEOUT ("idle-timeout"): Closes inactive sessions after this duration.
Declaration
public TimeSpan IDLE_TIMEOUT { get; set; }
Property Value
| Type | Description |
|---|---|
| TimeSpan |
KEX_ALGORITHMS
Comma-separated list of allowed key exchange algorithms.
Declaration
public string KEX_ALGORITHMS { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
MACS
Comma-separated list of allowed message authentication codes.
Declaration
public string MACS { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
MAX_AUTH_REQUESTS
MAX_AUTH_REQUESTS ("max-auth-requests"): Limits authentication attempts per session.
Declaration
public int MAX_AUTH_REQUESTS { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
MAX_CONCURRENT_CHANNELS
MAX_CONCURRENT_CHANNELS ("max-concurrent-channels"): Limits channels within one SSH session.
Declaration
public int MAX_CONCURRENT_CHANNELS { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
MAX_CONCURRENT_SESSIONS
MAX_CONCURRENT_SESSIONS ("max-concurrent-sessions"): Limits active sessions per username.
Declaration
public int MAX_CONCURRENT_SESSIONS { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
REKEY_BYTES_LIMIT
REKEY_BYTES_LIMIT ("rekey-bytes-limit"): Data volume before key renegotiation.
Declaration
public long REKEY_BYTES_LIMIT { get; set; }
Property Value
| Type | Description |
|---|---|
| long |
REKEY_TIME_LIMIT
REKEY_TIME_LIMIT ("rekey-time-limit"): Elapsed time before key renegotiation.
Declaration
public TimeSpan REKEY_TIME_LIMIT { get; set; }
Property Value
| Type | Description |
|---|---|
| TimeSpan |
SERVER_IDENTIFICATION
SERVER_IDENTIFICATION ("server-identification"): Optional server identification override.
Declaration
public string SERVER_IDENTIFICATION { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
WELCOME_BANNER
WELCOME_BANNER ("welcome-banner"): Optional message displayed to clients upon connection.
Declaration
public string WELCOME_BANNER { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
| Edit this page View SourceApplyModernAlgorithmDefaults()
Applies a modern algorithm preference order, filtered to the algorithms supported by the current Apache MINA SSHD runtime.
Declaration
public void ApplyModernAlgorithmDefaults()
ApplyProductionDefaults()
Applies conservative baseline limits for SFTP/SCP services. Authentication, authorization, host-key management, storage policy, and deployment hardening remain application decisions.
Declaration
public void ApplyProductionDefaults()
GetConfiguredAuthenticationMethods()
Gets the configured authentication method chains in evaluation order.
Declaration
public IReadOnlyList<IReadOnlyList<string>> GetConfiguredAuthenticationMethods()
Returns
| Type | Description |
|---|---|
| IReadOnlyList<IReadOnlyList<string>> |
GetConfiguredCiphers()
Gets the configured cipher algorithm names in preference order.
Declaration
public IReadOnlyList<string> GetConfiguredCiphers()
Returns
| Type | Description |
|---|---|
| IReadOnlyList<string> |
GetConfiguredHostKeyAlgorithms()
Gets the configured host key/signature algorithm names in preference order.
Declaration
public IReadOnlyList<string> GetConfiguredHostKeyAlgorithms()
Returns
| Type | Description |
|---|---|
| IReadOnlyList<string> |
GetConfiguredKeyExchangeAlgorithms()
Gets the configured key exchange algorithm names in preference order.
Declaration
public IReadOnlyList<string> GetConfiguredKeyExchangeAlgorithms()
Returns
| Type | Description |
|---|---|
| IReadOnlyList<string> |
GetConfiguredMacs()
Gets the configured MAC algorithm names in preference order.
Declaration
public IReadOnlyList<string> GetConfiguredMacs()
Returns
| Type | Description |
|---|---|
| IReadOnlyList<string> |
GetSupportedCiphers()
Gets cipher algorithm names supported by the current runtime.
Declaration
public IReadOnlyList<string> GetSupportedCiphers()
Returns
| Type | Description |
|---|---|
| IReadOnlyList<string> |
GetSupportedHostKeyAlgorithms()
Gets host key/signature algorithm names supported by the current runtime.
Declaration
public IReadOnlyList<string> GetSupportedHostKeyAlgorithms()
Returns
| Type | Description |
|---|---|
| IReadOnlyList<string> |
GetSupportedKeyExchangeAlgorithms()
Gets key exchange algorithm names supported by the current runtime.
Declaration
public IReadOnlyList<string> GetSupportedKeyExchangeAlgorithms()
Returns
| Type | Description |
|---|---|
| IReadOnlyList<string> |
GetSupportedMacs()
Gets MAC algorithm names supported by the current runtime.
Declaration
public IReadOnlyList<string> GetSupportedMacs()
Returns
| Type | Description |
|---|---|
| IReadOnlyList<string> |
SetAuthenticationMethodGroups(params IEnumerable<string>[])
Sets the authentication method policy using one or more required method groups.
Declaration
public void SetAuthenticationMethodGroups(params IEnumerable<string>[] authenticationMethodGroups)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<string>[] | authenticationMethodGroups | Each group contains methods that must all succeed in order. The outer set represents alternative groups. |
SetAuthenticationMethods(IEnumerable<string>)
Sets the authentication method policy using one or more pre-built method chains.
Declaration
public void SetAuthenticationMethods(IEnumerable<string> authenticationChains)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<string> | authenticationChains | Authentication chains such as PublicKey or values returned by RequireAll(params string[]). |
SetAuthenticationMethods(params string[])
Sets the authentication method policy using one or more pre-built method chains.
Declaration
public void SetAuthenticationMethods(params string[] authenticationChains)
Parameters
| Type | Name | Description |
|---|---|---|
| string[] | authenticationChains | Authentication chains such as PublicKey or values returned by RequireAll(params string[]). |
SetCiphers(IEnumerable<string>)
Sets allowed cipher algorithms in preference order.
Declaration
public void SetCiphers(IEnumerable<string> ciphers)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<string> | ciphers | Cipher names such as values from AMNetSshAlgorithms.Ciphers. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | Thrown when any requested cipher is not supported. |
SetCiphers(params string[])
Sets allowed cipher algorithms in preference order.
Declaration
public void SetCiphers(params string[] ciphers)
Parameters
| Type | Name | Description |
|---|---|---|
| string[] | ciphers | Cipher names such as values from AMNetSshAlgorithms.Ciphers. |
SetHostKeyAlgorithms(IEnumerable<string>)
Sets allowed host key/signature algorithms in preference order.
Declaration
public void SetHostKeyAlgorithms(IEnumerable<string> hostKeyAlgorithms)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<string> | hostKeyAlgorithms | Host key names such as values from AMNetSshAlgorithms.HostKeys. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | Thrown when any requested host key algorithm is not supported. |
SetHostKeyAlgorithms(params string[])
Sets allowed host key/signature algorithms in preference order.
Declaration
public void SetHostKeyAlgorithms(params string[] hostKeyAlgorithms)
Parameters
| Type | Name | Description |
|---|---|---|
| string[] | hostKeyAlgorithms | Host key names such as values from AMNetSshAlgorithms.HostKeys. |
SetKeyExchangeAlgorithms(IEnumerable<string>)
Sets allowed key exchange algorithms in preference order.
Declaration
public void SetKeyExchangeAlgorithms(IEnumerable<string> keyExchangeAlgorithms)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<string> | keyExchangeAlgorithms | Key exchange names such as values from AMNetSshAlgorithms.KeyExchange. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | Thrown when any requested key exchange algorithm is not supported. |
SetKeyExchangeAlgorithms(params string[])
Sets allowed key exchange algorithms in preference order.
Declaration
public void SetKeyExchangeAlgorithms(params string[] keyExchangeAlgorithms)
Parameters
| Type | Name | Description |
|---|---|---|
| string[] | keyExchangeAlgorithms | Key exchange names such as values from AMNetSshAlgorithms.KeyExchange. |
SetMacs(IEnumerable<string>)
Sets allowed MAC algorithms in preference order.
Declaration
public void SetMacs(IEnumerable<string> macs)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<string> | macs | MAC names such as values from AMNetSshAlgorithms.Macs. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | Thrown when any requested MAC is not supported. |
SetMacs(params string[])
Sets allowed MAC algorithms in preference order.
Declaration
public void SetMacs(params string[] macs)
Parameters
| Type | Name | Description |
|---|---|---|
| string[] | macs | MAC names such as values from AMNetSshAlgorithms.Macs. |