2

I am trying to use SSHJ to connect to a SFTP from my Java application. There are a couple of different timeouts that are present but I can't find the difference between them. Even the official docs aren't very helpful. Can someone explain the difference between?

SSHClient.setTimeout()
SSHClient.setConnectTimeout()
SFTPEngine.setTimeoutMs()

Thanks in advance.

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992

1 Answers1

1
  • SSHClient.setConnectTimeout() – It is propagated to Socket.connect – See How to set timeout on client socket connection?
  • SFTPEngine.setTimeoutMs() – How long to wait for a response from the SFTP server. Basically, it seems to be an equivalent of SSHClient.setTimeout(), just on a different OSI level.
Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992