This content has been marked as final. Show 12 replies
Do I assume you are using either Orion SSH or Ganymed SSH? If so then take a look at the examples that come with the distribution.
Looks like Ganymed to me. The Connection already is in SSH2 mode once you authenticate. You don't say what problems you are having so it is impossible to help you further.
EJP wrote:With the minimal code presented without the imports it is difficult to tell since Orion is a derived from Trilead and
Looks like Ganymed to me.
Ganymed and uses pretty much the same method names for authentication as Ganymed.
Thanks for your replies...
The inSite in my code is an SFTP site xx.xxx.xxx.xxx, and there is a login/username, but no password for this site. Password is blank. And where I was given was an RSA key (a .ppk file)
My problem right now is, using the java code I showed you, I got an error saying there is a problem with login. I wasn't able to login if I run my code.
And I figured it must be the RSA key, since I am not using it when I do the login part, and this private key is needed. So you mentioned that it's going to be in SSH2 mode automatically,
then maybe the reason it's failing is due to the RSA key. But I don't know where to use this key in my Java code.
Should I do something like this?
KeyFactory f = KeyFactory.getInstance("RSA");
Thank you for your help,
Surely the error was considerably more specific than 'problem with login'?
There's nothing to be gained by keeping these things secret.
Thanks for your answer..
There is nothing to keep secret from, But I just didn't get more detailed error message than this:
ORA-29532: Java call terminated by uncaught Java exception: java.io.IOException
I really wish I was able to get more specific error msgs, so that I can better debug the issue.
Do you know if connecting to an SFTP site using SSH2 mode with RSA keys need any special Java libraries?
In other words, maybe I need to Import other java libraries?
These are the ones I'm already importing:
So catch the exception, log it, and post it here.
As for secrets, the message you just provided has absolutely nothing to do with what you claimed before about 'a problem with login'.
1) From the imports you are probably using Orion SSH library and you should not need any other SSH libraries to do SFTP operations.
2) The code you originally posted only authenticates using (username, password) and RSA is not involved. As I said before you need to look at the examples that come with the Orion library. One of the examples uses RSA.
3) I'm pretty sure, but not certain, that the 'ppk' file cannot be used directly by Orion and will need converting to the standard SSH private key format. Putty generates 'ppk' files and you can perform the conversion using Putty.
Thanks for your suggestions and comments..
I looked at the RSA example, and I changed my code to use the RSA key.
And as you said, the ppk doesn't work, I need to convert to PEM format.
After some research, I think I need to use the Java class called CkSshKey ( and I imported the library com.chilkatsoft.*), but the problem is that I can't compile the Java
code, it says this CkSshKey is not found.
My question is do you know which java library I should import in order to support this? Or is this CkSshKey java-version specific?
The only reference to class Java class CkSshKey I can find is http://www.chilkatsoft.com/refdoc/javaCkSshKeyRef.html but I doubt if this is what you want since it is part of a complete Java SSH library which look to involve a native library.
Did you try converting the key using Putty? I haven't done if for some time but I remember it was not difficult.
If I want to use Putty to convert the ppk key file, should I download it ? is Putty an application?
What did Google return on searching for "Putty SSH" ?