Re: [JSch-users] hostKeyRepository.check always returning NOT FOUND
Status: Alpha
Brought to you by:
ymnk
From: <ym...@jc...> - 2013-11-07 07:33:00
|
Hi, +-From: Gerry Reno <gr...@ve...> --- |_Date: Sat, 02 Nov 2013 22:13:09 -0400 __ | |Even if I hardcode and cut and paste the exact key from my known_hosts, the hostKeyRepository.check will only return |NOT_FOUND |int repoHostKeyCheck = hostKeyRepository.check( sessionHost, hostKey.getKey().getBytes() ); At least, a key must be decoded as follows, byte[] key = hostKey.getKey().getBytes(); int repoHostKeyCheck = hostKeyRepository.check(sessionHost, Util.fromBase64(key, 0, key.length)); Sincerely, -- Atsuhiko Yamanaka JCraft,Inc. 1-14-20 HONCHO AOBA-KU, SENDAI, MIYAGI 980-0014 Japan. Tel +81-22-723-2150 Skype callto://jcraft/ Twitter: http://twitter.com/ymnk Facebook: http://facebook.com/aymnk |