-
-
Notifications
You must be signed in to change notification settings - Fork 952
Support for ssh-rsa-cert-v01 certificates #479
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
Comments
Hi there, has anybody some stuff regarding the certificate authentication? |
thanks @robertkentish that will be nice, I found also a fork what contains a pretty simple implementation. But yesterday there was to many interruptions, so today i will have a try for that fork. |
@nokinger I've just pushed up my changes so if you still need, feel free to try them. |
i didn't have any knowledge about the ssh-rsa-cert-v01@openssh.com in deep and so on. But when i use your code as it is, it will fail.
Before the "CertificateFile.HostCertificate.Data" has been used. Regards |
I'm no expert on the cert file format either but I'm guessing that somehow a difference in how the original pubkey files were signed means the Base64 data doesn't decode properly to the RsaCertificateData class and therefore doesn't covert to the SshCertificateData class. How are you generating the original keys and how are you signing them? |
i did it like this:
i didn't use the -V attribute in step 3. Therefor the certificate is valid for "forever". There was also a problem with your code, because i got an ArgumentOutOfRangeException (due i did not set an expiration date (in step3). See this commit1. Okay it will be better when the validBefore and validAfter bytes are checked for "0xFF", as just catch the out of range exception and set the date to DateTime.MaxValue... By the way it works :) |
additional i add the PrivateKeyCertAuthenticationMethod.cs and the PublicKeyCertFile.cs as link into the Renci.SshNet.NET35.csproj file. Otherwise the net35 build has not this classes. See this commit |
Any update on this? |
Also curious if there's any update on this? |
Any update on this? |
Looks like the attempt at this was never merged - I see PR still open, from 3.5 years ago: #595 |
I'am also waiting for this. |
The quickest method will be to update, test, and complete PR #595. I guarantee I will test and merge if everything works. |
@robertkentish are you still working ln this PR? |
I have a branch which is not ready for presentation but in theory is feature-complete. https://github.com/Rob-Hague/SSH.NET/tree/certificates Last I remember it had a bunch of errors after merging in the recent analyzer changes, and it needs a bunch of unit and integration tests added. I'll get round to finishing it at some point but @sevensolutions if you are motivated then please feel free to PR into my branch to push it along, and once it's ready we can PR into the main repo. |
Hey @Rob-Hague. |
I've rebased it but I've otherwise not touched it since my last comment. It needs test coverage and motivation |
@Rob-Hague I have a pretty strong interest in seeing this feature happen. I can definitely look at writing some tests, but I'd need time to ramp up. However, I pulled down the branch and tried connecting to my device. It still seems to be preventing the connection, even though I can using I still get The auth failure is |
@kakins Great. Please see Rob-Hague#1. It's quite possible it doesn't work at all, but I think it's close. |
I'd like to implement support for ssh-rsa-cert-v01@openssh.com (and others) type certificate authentication and am looking for some guidance on the best way to implements this.
Looking at the code I propose to create a new PrivateKeyCertAuthenticationMethod class and associated CertificateHostAlgorithm to be used instead of the current PrivateKey/KeyHostAlgorithm classes. This would make the high level connection code something like
What I'm wondering though, is this the best way to structure things or should I create only the CertificateHostAlgorithm and place some switching logic in the PrivateKeyFile class to swap out the HostAlgorithm?
Just looking for a bit of direction before I put through a huge PR that gets rejected... :-)
The text was updated successfully, but these errors were encountered: