Java: InvalidAlgorithmParameterException Prime size must be multiple of 64

前端 未结 9 1986
北海茫月
北海茫月 2020-12-10 16:01

I implemented a Java program that will connect and execute a command in a remote server using JSCH. The problem is that whenever I tried to connect to the server, I got the

9条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-10 16:35

    I was getting the same error with JGit's use of JSch. I tried a lot of suggestions in this thread to no avail.

    But then recently, I noticed that if I used a slightly newer jre than I used before, the error went away.

    Just for the record, I was using "jsch-0.1.55.jar" and the two jre's I tried were:

    • JRE 1.7.0_80 (experienced the exception)
    • JRE 1.8.0_191 (made the problem go away)

    I can't say for sure whether it was merely the JRE upgrade that resolved the problem or the suggested tweaks from this thread that I made in addition.

    All the same, just wanted to share the experience in case it helps someone else.

提交回复
热议问题