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
OpenSSH public key not working #36
Comments
You need the BouncyCastle jar in classpath. |
I think you may have closed this issue prematurely, could you please re-open? I do have BouncyCastle jar in classpath. I am using bcprov-jdk16-146.jar. Perhaps I have the wrong jar? However this is the one checked in and working with success on my dev box just not the build server. I tried extracting ALL bouncycastle providers but this didn't help either. I have output more debug info to prove loading of bouncycastle:
|
I switched to Ganymed SSH-2 for Java and that worked without any problems so I suggest there is a bug either in bouncycastle or in sshj |
Actually I don't think Ganymed depends on BouncyCastle so that's a moot point |
Yes I understand that. But Ganymed proves that there is nothing wrong with my ssh key and therefore your sshj+BouncyCastle should work but it doesn't. |
It works in Overthere with SSHJ 0.6.0. What is the private key format you're using. In our unit tests we use a key like: |
Hey Peter, I think this looks like about the same issue as you are having. I'm looking into that. |
Hmm, I still think this is related to bouncy castle detection... the exception message is 'No provider available for OpenSSH key file' So KeyProviderUtil.detectKeyFileFormat() detected an OpenSSH-format[1] key file, but there is no FileKeyProvider for that kind of key registered with the 'Config' object. With the DefaultConfig implementation this only happens if SecurityUtils.isBouncyCastleRegistered() == false. For Krishnan, the error is: 'No provider available for Unknown key file', so the key file format cannot be detected by the detectKeyFileFormat() method. [1] OpenSSH format = PKCS8 encoded private key file, with an unencrypted publickey inside a '.pub' file by the same name. |
This works on my dev box but not on our server.
Here's the output:
The text was updated successfully, but these errors were encountered: