net.schmizz.sshj.transport.TransportException:运输中断;遇到了EOF

时间:2016-04-14 11:44:36

标签: scala exception sftp file-transfer

我使用"com.hierynomus" % "sshj" % "0.13.0"将文件从本地服务器传输到sftp服务器

文件正在转移没有任何问题,但我在控制台上收到以下错误:

[error] n.s.s.t.TransportImpl - Dying because - {}
net.schmizz.sshj.transport.TransportException: Broken transport; encountered EOF
    at net.schmizz.sshj.transport.Reader.run(Reader.java:58) ~[sshj-0.13.0.jar:na]

代码:

      val ssh = new SSHClient()
      ssh.addHostKeyVerifier(new PromiscuousVerifier())
      ssh.connect(props.host)
      ssh.authPassword(props.username, props.password)
      val client=ssh.newSFTPClient()
      client.put(localDirectory + fileName, remoteDirectory)

请告诉我相同的原因

0 个答案:

没有答案