0
我有禁用主機密鑰檢查SSH,但它記錄非法密鑰大小警告如何避免hierynomus SSH非法密鑰大小警告
SSHClient ssh = new SSHClient();
ssh.addHostKeyVerifier(new HostKeyVerifier() {
@Override
public boolean verify(String arg0, int arg1, PublicKey arg2) {
return true;
}});
ssh.connect(hostIP, CommonProperties.SSH_PORT);
ssh.authPassword(serverUserName, serverPassword);