Cannot connect to SFP sever using key file with JSch and Java 8 -


i trying connect sftp server using 2048 bit rsa key file. works fine running against version 7r45 of jre using jsch follow exception when running against version 8r31 of jre.

com.jcraft.jsch.jschexception: session.connect: java.security.invalidalgorithmparameterexception: prime size must multiple of 64, , can range 512 2048 (inclusive).

it's not issue limited java security policy have tried , without unlimited strength jars both versions of java.

i have seen other references exception suggesting replacing default java jce provider bouncycastle one, why there difference between java 7 , java 8? did try running security.addprovider(new bouncycastleprovider()); @ program start doesn't seem make difference.

the problem in our case seems fixed/worked around removing diffie-hellman-group-exchange-sha1 before calling session.connect()

string kex = session.getconfig("kex"); system.out.println("old kex:" + kex); kex = kex.replace(",diffie-hellman-group-exchange-sha1", ""); session.setconfig("kex", kex); system.out.println("new kex:" + session.getconfig("kex")); session.connect(); 

[we control client, not server failing connect to.]


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -