I'am trying to connect to a remote server over ssh2 using the lib ch.ethz.ssh2.Connection
connexion = new Connection(host);
connexion.connect();
boolean isOK = connexion.authenticateWithPassword(login, pass);
But I get an IOException in connexion.connect(); with this error message:
Connection closed (Signature sent by remote is wrong!)
I tried to connect to the same server using Putty, I get a message that tells me that the fingerprint is not what it expected, but if I click yes to confirm I can connect.
I read in Java Doc that I can ignore the verification of the key, but it's not recomended (http://www.ganymed.ethz.ch/ssh2/javadoc/ch/ethz/ssh2/Connection.html#connect%28ch.ethz.ssh2.ServerHostKeyVerifier,%20int,%20int%29).
What I'am looking for, is a way to change something in the server so I can connect correctely. I don't want to change the Java code.
Thanks,
Otmane MALIH