My first post. Few hours ago my customer told me to sFTP a file instead of ftp.
I stumbled upon Jsch library and wrote the following code
private void sftpToDestination() throws JSchException, SftpException
JSch jsch = new JSch();
Session session = jsch.getSession(sftpUser, sftpAddress, sftpPort);
Channel channel = session.openChannel("sftp");
ChannelSftp c = (ChannelSftp) channel;
Everything is fine except that I wonder where do I pass the password to establish a connection. Or does sFTP use something else instead of a password which I am missing here.
I don't know much about sFTP protocol or Jsch