Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Can't create a class instance of PrivateKeyFile  #728

Copy link
Copy link
@orionplus

Description

@orionplus
Issue body actions

I'm using version 2020.0.0-beta1.
Created the key pair with the command: ssh-keygen -t ecdsa -b 521
During the object creation
PrivateKeyFile keyFile = new PrivateKeyFile("c:..\id_ecdsa_private.key","passphrase")

I'm getting the error:
openssh key type: ecdsa-sha2-nistp521 is not supported
at Renci.SshNet.PrivateKeyFile.ParseOpenSshV1Key(Byte[] keyFileData, String passPhrase)
at Renci.SshNet.PrivateKeyFile.Open(Stream privateKey, String passPhrase)
at Renci.SshNet.PrivateKeyFile..ctor(String fileName, String passPhrase)
at Renci.SshNet.PrivateKeyFile..ctor(String fileName)
at Onboarding.Services.SFTPService.d__7.MoveNext() in C:\Projects...\SFTPService.cs:line 65

The documentation says SSH.NET supports the following host key algorithms:
...
ecdsa-sha2-nistp521
...
Can anyone tell me please what is wrong?
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.