This content has been marked as final. Show 12 replies
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,
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:
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.