After establishing connection to a remote ftp
or sftp
server programmatically using java is it possible to read the files of /home/www-data/content/
without writing to a file in local system. Basically i want to extract metadata of files using Apache Tika from that path without downloading.
UPDATE :
I have tried to connect with JSch which is an implementation of SSH2
.
JSch jsch = new JSch();
session = jsch.getSession(SFTPUSER,SFTPHOST,SFTPPORT);
session.setPassword(SFTPPASS);
java.util.Properties config = new java.util.Properties();
config.put("StrictHostKeyChecking", "no");
session.setConfig(config);
session.connect();