diff -ru src/com/jcraft/jsch/HostKeyRepository.java.orig src/com/jcraft/jsch/HostKeyRepository.java --- src/com/jcraft/jsch/HostKeyRepository.java.orig 2006-10-15 13:14:46.000000000 -0400 +++ src/com/jcraft/jsch/HostKeyRepository.java 2008-04-04 16:44:31.000000000 -0400 @@ -36,6 +36,7 @@ int check(String host, byte[] key); void add(HostKey hostkey, UserInfo ui); + void add(String host, byte[] key, UserInfo ui); void remove(String host, String type); void remove(String host, String type, byte[] key); String getKnownHostsRepositoryID(); diff -ru src/com/jcraft/jsch/KnownHosts.java.orig src/com/jcraft/jsch/KnownHosts.java --- src/com/jcraft/jsch/KnownHosts.java.orig 2006-10-15 14:02:31.000000000 -0400 +++ src/com/jcraft/jsch/KnownHosts.java 2008-04-04 16:46:41.000000000 -0400 @@ -205,6 +205,20 @@ //System.err.println("fail!!"); return result; } + + public void add(String host, byte[] key, UserInfo userinfo) + { + try + { + HostKey hostkey = new HostKey(host,key); + add(hostkey, userinfo); + } + catch (Exception e) + { + // this should't get called + } + } + public void add(HostKey hostkey, UserInfo userinfo){ int type=hostkey.type; String host=hostkey.getHost();