Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception occurred, " openssh key type: ssh-rsa is not supported" #704

Closed
huobazi opened this issue Jul 12, 2020 · 3 comments
Closed

Exception occurred, " openssh key type: ssh-rsa is not supported" #704

huobazi opened this issue Jul 12, 2020 · 3 comments
Milestone

Comments

@huobazi
Copy link

huobazi commented Jul 12, 2020

When i create a scpclient

var client = new ScpClient("host", 22, "username", new PrivateKeyFile("~/.ssh/id_rsa", "123123"));

I got a exception:

openssh key type: ssh-rsa is not supported

The stack trace:

System.AggregateException: One or more errors occurred. (openssh key type: ssh-rsa is not supported)
 ---> Renci.SshNet.Common.SshException: openssh key type: ssh-rsa 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)

I found the exception source may be came from:

throw new SshException("openssh key type: " + keyType + " is not supported");

┌[mw82@Marble-MacBook-Pro.local]-(~)
└> ssh -Q key
ssh-ed25519
ssh-ed25519-cert-v01@openssh.com
ssh-rsa
ssh-dss
ecdsa-sha2-nistp256
ecdsa-sha2-nistp384
ecdsa-sha2-nistp521
ssh-rsa-cert-v01@openssh.com
ssh-dss-cert-v01@openssh.com
ecdsa-sha2-nistp256-cert-v01@openssh.com
ecdsa-sha2-nistp384-cert-v01@openssh.com
ecdsa-sha2-nistp521-cert-v01@openssh.com
┌[mw82@Marble-MacBook-Pro.local]-(~)

Any response was appreciated

@darinkes
Copy link
Collaborator

There is an PR for those Keys: #614

@theKidOfArcrania
Copy link

Hi, when will there be a release version supporting this PR?

@Rob-Hague
Copy link
Collaborator

Fixed by #614 which is in version 2023.0.0

@WojciechNagorski WojciechNagorski added this to the 2023.0.0 milestone Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants