mwiede / jsch

fork of the popular jsch library
Other
760 stars 144 forks source link

Size of ssh-rsa exception #607

Open Beban9999 opened 3 months ago

Beban9999 commented 3 months ago

com.jcraft.jsch.JSchException: Session.connect: java.security.InvalidAlgorithmParameterException: Prime size must be multiple of 64, and can only range from 512 to 2048 (inclusive).

Is there a way to change acceptable key size?

Thanks in advance

norrisjeremy commented 3 months ago

Hi @Beban9999,

That is a limitation of the JDK version you are using, not JSch.

Thanks, Jeremy

Beban9999 commented 3 months ago

Hi @norrisjeremy Thanks for the quick replay. I did not have this issue in the old JSch version.

Thanks

Beban9999 commented 3 months ago

I built the package using Java 1.9

norrisjeremy commented 3 months ago

Hi @Beban9999,

It's not a JSch issue. Go search Google for the phrase Prime size must be multiple of 64, and can only range from 512 to 2048.

Thanks, Jeremy

Beban9999 commented 3 months ago

Is this the problem of the JDK that I use to build the library or the JDK that I use in the application that is running it?

norrisjeremy commented 3 months ago

Hi @Beban9999,

It is an issue with the version of the JDK you are using to run you application.

Thanks, Jeremy