-
-
Notifications
You must be signed in to change notification settings - Fork 940
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
System.NotSupportedException: Key 'OPENSSH' is not supported. #485
Comments
Please see #496, which adds OPENSSH-Format for ed25519 Keys. The usual default is: |
Ah! I see now. Yeah, the default format was changed. Will see if my PR can be updated to support more than just ed25519 Keys. |
@darinkes Please submit a separate PR for this. |
@drieseng sure! first finish the big one. @mauroa If you want to give it a shot: https://github.com/darinkes/SSH.NET-1/tree/openssh_format_rsa |
@darinkes - cool you are working on openssh; wondering about the status of your changes? will it include Message Authentication Code (HMAC)? perhaps I can help? |
@gojimmypi I'm waiting for upstream to catch up with current PRs, before creating new ones. |
Is there any advancement on this one ? |
Same here, failed to support generated ssh via Edit: Using puttygen and exporting under different format fixed my issue, here is a neat article: |
The same problem. Is there any plan to support OPENSSH keyname? |
Yes, the diff is ready for an PR. But @drieseng is currently busy with other projects. |
@darinkes Please submit a PR for this. If you make sure there's sufficient test coverage, I'll do my best to review it :p |
@darinkes ... and thx! |
@drieseng The diff is based on the Elliptic Curves Branch, cause OPENSSH format was needed there already partially. |
Having the same problem. Could you tell the current status of this issue? |
for me, this lib works in mac but no in windows 2012R2 |
This is now supported in 2020.0.0-beta1. |
I added 2020.0.0-beta1 but now the error is |
the same for me |
The new OpenSSH RSA key format is not supported by the library
… On Nov 20, 2020, at 5:16 PM, Arhisan ***@***.***> wrote:
the same for me Renci.SshNet.Common.SshException: openssh key type: ssh-rsa is not supported
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#485 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAD7IHSZNM5GT52XVBXWR5DSQ3MD5ANCNFSM4GB2MY7A>.
|
Same here... The new-style OpenSSH key format is not supported. This issue is closed, but it should be open. @darinkes I saw your fork from 31-1-2021. Does it support the new key format and will you create a PR for this library? |
@ramondeklein already there #614 |
@ramondeklein Have you tried checking out develop, building it locally, and adding the netstandard2.0 dll as reference to your project? This works for me. I am getting the same error "Renci.SshNet.Common.SshException: 'openssh key type: ssh-rsa is not supported'" when using the latest nuget package 2020.0.1. |
I'm also having this problem (nuget package 2020.0.1). Key generated via |
hi @h0wXD , @jkmyklebust , I've got the same error, but found the quick solution. Just need to convert the key's format from --OPENSSH to --RSA: ssh-keygen -p -P "" -N "" -m pem -f \path\to\key\file This will convert your current key. |
Hey, I am getting the same issue : Renci.SshNet.Common.SshException: openssh key type: ssh-rsa is not supported. Here's how key was generated : ssh-keygen -t rsa -b 4096 Did anybody resolve it? |
Please see my reply above, use ssh-keygen to convert your key. |
Hi all, I hit this issue when using POSH-SSH. Documented in issue: darkoperator/Posh-SSH#388 I worked around this issue by creating my SSH key with the Example: |
A NotSupportedException is thrown when generating SSH keys with the "ssh-keygen" command on a Mac with macOS Mojave 10.14.1. With lower versions it's working fine.
Exception:
System.NotSupportedException: Key 'OPENSSH' is not supported.
at Renci.SshNet.PrivateKeyFile.Open(Stream privateKey, String passPhrase)
at Renci.SshNet.PrivateKeyFile..ctor(String fileName, String passPhrase)
Inspecting the generated private key I can see that the header starts with:
"-----BEGIN OPENSSH PRIVATE KEY-----"
Also, If I inspect a private key generated in a Mac with a lower macOS version, I can see something like:
"-----BEGIN RSA PRIVATE KEY-----"
The following code in this repo tries to match a Regex to detect they key name and act based on it. For this reason, It doesn't recognize "OPENSSH" as a valid private key name and it fails:
SSH.NET/src/Renci.SshNet/PrivateKeyFile.cs
Lines 190 to 273 in bd01d97
Thanks.
The text was updated successfully, but these errors were encountered: