更新时间:2023-02-07 20:59:05
SharpSSH非常愚蠢,无法默认验证主机密钥.
The SharpSSH is stupid enough not to verify the host keys by default.
您将不得不重新实现SshBase.ConnectSession
而不是将StrictHostKeyChecking
设置为no
.
You would have to re-implement SshBase.ConnectSession
not to set StrictHostKeyChecking
to no
.
JSch.getHostKeyRepository().add()
配置所需的主机密钥(或实现HostKeyRepository
接口).UserInfo
接口,尤其是promptYesNo
方法.JSch.getHostKeyRepository().add()
to configure expected host key (or implement HostKeyRepository
interface).UserInfo
interface, particularly the promptYesNo
method.