8

I am using "com.hierynomus" % "sshj" % "0.13.0" to transfer a file from local server to sftp server

File is getting tranferred without any problem but I am getting below error on console :

[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]

Code :

      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)

Please suggest me the cause for the same

Rishi
  • 1,279
  • 3
  • 20
  • 37

0 Answers0