on 04-01-2009 5:54 PM
Hi,
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?
closed
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
using getClass().getResourceAsStream u can also access the file
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.