public String getFingerprint() { return key.getFingerPrint(jsch); }
public String hostId() { return session.getHostKey().getFingerPrint(this.jsch); }
public boolean hasSameFingerprint(String pubkey, String fingerprint) { try { byte[] pubKeyDecoded = Base64.getDecoder().decode(pubkey.getBytes()); HostKey hk; hk = new HostKey(HOST, pubKeyDecoded); String pubkeyFingerprint = hk.getFingerPrint(new JSch()); return fingerprint.equals(pubkeyFingerprint); } catch (JSchException e) { log.warn(e.getMessage()); return false; } }
userInfo.append(this.username); userInfo.append(";fingerprint="); userInfo.append(this.session.getHostKey().getFingerPrint(this.jsch)); userInfo.trimToSize(); return new URI("sftp", userInfo.toString(), this.remoteHostname, this.remotePort, absolutePath.toString(), null,
log.debug("Host keys in {}", hkr.getKnownHostsRepositoryID()); for (HostKey hk : hks) { log.trace("Loaded host key {} {} {}", hk.getHost(), hk.getType(), hk.getFingerPrint(jsch));