I need help with connection to SFTP server? Does anybody have working code?
I found something like this
package test.JSch;
import com.jcraft.jsch.*;
Here is an earlier question on Stackoverflow, for which the accepted answer suggests using JSch library.
How to retrieve a file from a server via SFTP?
I see that you have tried to connect via JSch and got an error.
I would suggest that the first thing is to check if you can connect to the sftp machine from the client (same machine on which you are testing your program), using a standard sftp client like Filezilla on Windows OR just the sftp
command on a terminal in *nix systems.