jSch Exception


Contents


Exception

com.jcraft.jsch.JSchException: UnknownHostKey: mywebsite.com. 
RSA key fingerprint is 22:fb:ee:fe:18:cd:aa:9a:9c:78:89:9f:b4:78:75:b4

http://stackoverflow.com/questions/2003419/com-jcraft-jsch-jschexception-unknownhostkey

Solution 1

Just SSH to the client (using command-line ssh tool), this will add entry to your ~/.ssh/known_hosts file.

Solution 2

Create SSH configuration file ~/.ssh/config with content:

Host *
        StrictHostKeyChecking no

Solution 3

In the jSch code:

java.util.Properties config = new java.util.Properties(); 
config.put("StrictHostKeyChecking", "no");
session.setConfig(config);
Posted on July 03, 2012 05:26 AM by Subhash Chandran
java ssh jsch