Discussion:
[JSch-users] PassPhrase for privateKey fail
sodiska saw
2014-12-18 11:33:23 UTC
Permalink
Hi,
I have downloaded Jsch version 1.51 and started to using it to connect a remote server using private key which has passphrase. Funny thing is when I use the private key and with the passphrase via a Terminal, it works fine, but when I use a JAVA app that I wrote, it keep asking me to key in passphrase for 3 times, and then reply error message: Auth Fail.
I am pretty sure the private key and the passphrase is correct since I have tested it in a terminal. Anyone has the same experience?
Alan Ezust
2014-12-18 15:03:45 UTC
Permalink
I have noticed this too.
http://sourceforge.net/p/jedit/plugin-bugs/1726/

And in another case, I got "Auth Cancel".
http://sourceforge.net/p/jedit/plugin-bugs/1787/

First, double-check you have JCE unlimited key strength encryption
installed.

But if you do and still have this problem, I believe some very old SSH keys
can not be read by java 1.8+jsch due to new restrictions in crypto. For
example, 2048-bit DSA keys can't be created anymore from current versions
of ssh-keygen but are still recognized by older ssh clients. And also by
jsch + Java 1.7.

However, in my experience, once you start using Java 1.8, some of those old
keys have to be regenned with more current versions of ssh-keygen.
Post by sodiska saw
Hi,
I have downloaded Jsch version 1.51 and started to using it to connect
a remote server using private key which has passphrase. Funny thing is when
I use the private key and with the passphrase via a Terminal, it works
fine, but when I use a JAVA app that I wrote, it keep asking me to key in
passphrase for 3 times, and then reply error message: Auth Fail.
I am pretty sure the private key and the passphrase is correct since I
have tested it in a terminal. Anyone has the same experience?
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
JSch-users mailing list
https://lists.sourceforge.net/lists/listinfo/jsch-users
Loading...