I am trying to sftp to Linux server from Windows environment using JSCH API. It is failing with this error message.
com.jcraft.jsch.JSchException: Auth fail
at com.jcraft.jsch.Session.connect(Unknown Source)
at com.jcraft.jsch.Session.connect(Unknown Source)
I am trying to sftp to Linux server from Windows environment using JSCH API. It is failing with this error message.
com.jcraft.jsch.JSchException: Auth fail
at com.jcraft.jsch.Session.connect(Unknown Source)
at com.jcraft.jsch.Session.connect(Unknown Source)
try {
JSch jsch = new JSch();
session = jsch.getSession("username", "host", 22);
session.setPassword("password");
}catch(Exception ex)
{
e.printStaclTrace();
}
Sftp to this server works with WinSCP and FileZilla clients.
Any help/ideas would be greatly appreciated.
Thanks,
Jyothi