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.*;
You can use Apache commons VFS
FileSystemManager fsManager = VFS.getManager(); FileObject remoteFile = fsManager.resolveFile("sftp://myusername:mypassword@somehost/pub/downloads/somefile.tgz" ); InputStream in = remoteFile.getContent().getInputStream();