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
I was getting this error
ERROR: Message form the remote server : Session.connect: java.security.InvalidAlgorithmParameterException: Prime size must be multiple of 64, and can only range from 512 to 1024 (inclusive)
I was able to solve it by setting the client version as in this line
session.setClientVersion("SSH-2.0-OpenSSH_2.5.3");
The default value that was causing the error is
session.setClientVersion("SSH-2.0-JSCH-0.1.54");