使用 apache sshd ssh 客户端出现错误“未检测到/配置”IoServiceFactoryFactory

wan*_*kai 6 java ssh apache-mina

我想使用 apache sshd 项目http://mina.apache.org/sshd-project/连接网络交换机:

public void connect(){ 

    try 
    { 
      client = SshClient.setUpDefaultClient(); 
      client.start(); 
      session=client.connect(account, host, port).getSession(); 
      session.addPasswordIdentity(password); 
      session.auth().verify(); 
    } 
    catch (Exception e) 
    { 
       System.out.println(e.getMessage()); 
    } 
}
Run Code Online (Sandbox Code Playgroud)

但出现错误:

使用 apache sshd ssh 客户端出现错误“未检测到/配置”IoServiceFactoryFactory

如何解决?谢谢

我在文档中找不到 apache sshd 项目是否支持 ssh 协议 1.5?此设备使用 ssh 2.0,但我的其他设备使用 ssh 1.5,谢谢