Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Java proxy problem


I created a java proxy for SFTP using uid pwd authentication and it works fine.

Now we want to use public key authentication , so i have to use a private key file in the java proxy instead of pwd.

The constructor for my SSH session is as follows.

SshParameters params = new SshParameters("host","uid", File privateKey);

but i guess i cant access the private key file in a EJB(the Java proxy) from the file system.

I saw that people usually use getClass.getResourceAsStream() for reading data inside an EJB but the output of that will be a InputStream object , which i can convert to String but i cant cast it to File...

What can i do in such a situtation?

Former Member
Not what you were looking for? View more on this topic or Ask a question