Skip to content

"openssh key type: ecdsa-sha2-nistp256 is not supported" ? #1144

Closed
@deanparkr

Description

@deanparkr

I am using this package to connect to an SFTP server with SSH key. Looking at the package homepage it says under supported host key algorithms that it supports "ecdsa-sha2-nistp256"

However when I use the latest version of this package and connect to an SFTP server using a ecdsa-sha2-nistp256 OpenSSH private key, I get this message:

openssh key type: ecdsa-sha2-nistp256 is not supported

Have I missed something in my understanding here? Should this be supported as according to the package description or is it because of "openssh" type that it is not supported?

 using (var stream = assembly.GetManifestResourceStream(resourceName))
                {
                    if (stream == null)
                    {
                        throw new InvalidOperationException($"Resource '{resourceName}' not found.");
                    }
                    using (var keyFile = new PrivateKeyFile(stream, keyFilePassphrase))
                    {
                        var keyFiles = new[] { keyFile };
                        var methods = new List<AuthenticationMethod> { new PrivateKeyAuthenticationMethod(FTPUsername, keyFiles) };

                        var conInfo = new ConnectionInfo(FTPServer, FTPUsername, methods.ToArray());

                        using (var client = new SftpClient(conInfo))
                        {
                        client.Connect();
                        ....
                        ....
                        ....

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions