Re: [JSch-users] [solved] jsch-0.1.54.jar throws com.jcraft.jsch.JSchException: invalid privatekey
Status: Alpha
Brought to you by:
ymnk
From: Tim B. <tb...@al...> - 2016-11-09 02:56:17
|
I'm glad to hear you got it working, though I'm surprised the command you ran, without -t rsa, worked as you described. No matter, if it solved your problem then that's what matters. Tim On Tue, Nov 8, 2016 at 1:21 PM, Erik Wasser <eri...@na...> wrote: > On 08.11.2016 06:39, Tim Bain wrote: > > > This is the 0.1.53 source: > > http://grepcode.com/file/repo1.maven.org/maven2/com. > jcraft/jsch/0.1.53/com/jcraft/jsch/KeyPair.java#KeyPair > > Presumably the 0.1.54 source isn't much different, since the line > > numbers match exactly. > > > > Look at lines 634-665, and in particular lines 638-644. It looks like > > keys in formats DSA, RSA, ECDSA, and SSH are supported, but there's no > > indication that OPENSSH keys are supported. Did you maybe forget the > > "-t rsa" argument when generating the 4096-bit key? I'm not sure why > > the output would include "(RSA)" if that happened, but at the same time > > the content you showed us doesn't appear to be an RSA key... > > Hi. Thanks for the answer. You've pushed me into the right direction. > I've just recreated a new key with the following command: > > > ssh-keygen -b 4096 -f .ssh/foo > > And everything is fine and the first line indicates an RSA. And voilà: > Jsch is working just fine with a 4096 bits/RSA key. > > So my key was just bad, like the error messages indicated it. B-) > > Thanks for the help. > > -- > So long... Erik > > ------------------------------------------------------------ > ------------------ > Developer Access Program for Intel Xeon Phi Processors > Access to Intel Xeon Phi processor-based developer platforms. > With one year of Intel Parallel Studio XE. > Training and support from Colfax. > Order your platform today. http://sdm.link/xeonphi > _______________________________________________ > JSch-users mailing list > JSc...@li... > https://lists.sourceforge.net/lists/listinfo/jsch-users > |