com.jcraft.jsch.Session.getHostKey()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(0.9k)|赞(0)|评价(0)|浏览(127)

本文整理了Java中com.jcraft.jsch.Session.getHostKey()方法的一些代码示例,展示了Session.getHostKey()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Session.getHostKey()方法的具体详情如下:
包路径:com.jcraft.jsch.Session
类名称:Session
方法名:getHostKey

Session.getHostKey介绍

[英]retrieves the host key of the server. This should be invoked after #connect.
[中]检索服务器的主机密钥。这应该在#connect之后调用。

代码示例

代码示例来源:origin: com.intrbiz.bergamot/bergamot-check-ssh

public String hostId()
{
  return session.getHostKey().getFingerPrint(this.jsch);
}

代码示例来源:origin: org.ikasan/ikasan-connector-sftp-classes

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,

代码示例来源:origin: org.apache.airavata/gsissh

HostKey hostKey = session.getHostKey();

相关文章

微信公众号

最新文章

更多