Hello Gerry, when using the addIdentity-Method taking only the private-key-path, the public key is expected to be in the same folder as the private key, having the same name as the private key with an additional suffix ".pub". (See KeyPair.load(JSch, String, String)). You might want to use one of the other addIdentity-Methods provided by the JSch-class to be independent of that default behavior.
-----Ursprüngliche Nachricht----- Von: Gerry Reno [mailto:gr...@verizon.net] Gesendet: Sonntag, 10. November 2013 21:31 An: jsch-users@lists.sourceforge.net Betreff: [JSch-users] addIdentity: on android getting invalid privatekey: [B@428ff138 with known good RSA key Using JSch 1.50 I'm trying to get publickey auth working on arm android. I have password auth working fine already. So I added addIdentity( keypath ) but it always errors even with known good RSA key. I tested the key both on the phone using ConnectBot and on two linux machines using openssh. The key works fine from all three. When I use the addIdentity method and pass the key path I'm always getting an error, invalid privatekey: [B@428ff138 Is there something else I need to add besides addIdentity to make this work? ------------------------------------------------------------------------------ November Webinars for C, C++, Fortran Developers Accelerate application performance with scalable programming models. Explore techniques for threading, error checking, porting, and tuning. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk _______________________________________________ JSch-users mailing list JSch-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jsch-users ------------------------------------------------------------------------------ November Webinars for C, C++, Fortran Developers Accelerate application performance with scalable programming models. Explore techniques for threading, error checking, porting, and tuning. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk _______________________________________________ JSch-users mailing list JSch-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jsch-users