B B4JExplorer Active Member Licensed User Longtime User May 29, 2014 #1 Hi, In the B4J wrapper for JSCH, is there a way to specify a private key? In the Java implementation, it's AddIdentity( sPrivateKeyFileName ).
Hi, In the B4J wrapper for JSCH, is there a way to specify a private key? In the Java implementation, it's AddIdentity( sPrivateKeyFileName ).
Erel B4X founder Staff member Licensed User Longtime User May 29, 2014 #2 You can use jReflection library to get access to the internal JSch object. Note that jReflection library will only work in UI applications. B4X: Dim r As Reflector r.Target = SFtp1 r.Target = r.GetField("jsch") r.RunMethod2("AddIdentity", <private key>, "java.lang.String") Upvote 0
You can use jReflection library to get access to the internal JSch object. Note that jReflection library will only work in UI applications. B4X: Dim r As Reflector r.Target = SFtp1 r.Target = r.GetField("jsch") r.RunMethod2("AddIdentity", <private key>, "java.lang.String")
B B4JExplorer Active Member Licensed User Longtime User May 29, 2014 #3 Yeah, I need this in a console app. But that's still useful, for other apps, thanks. Upvote 0