Table of Contents

Method FromECDsa

Namespace
SshSharp
Assembly
SshSharp.dll

FromECDsa(ECDsa, string?)

A key that .NET's ECDsa holds, on P-256, P-384 or P-521, used without exporting it, as FromRsa(RSA, string?) does for RSA.

public static SshPrivateKey FromECDsa(ECDsa ecdsa, string? comment = null)

Parameters

ecdsa ECDsa

The key. It stays the caller's: disposing the returned key does not dispose it.

comment string

A comment for the key, often user@host.

Returns

SshPrivateKey

Remarks

The returned key cannot be exported or added to an agent.

Exceptions

ArgumentException

The key is not on one of the NIST curves SSH uses.