ragnar0k - 2014-05-10

I have some code that works without issues on linux but on FreeBSD (account works) gives me:

[javax.servlet.ServletException: com.jcraft.jsch.JSchException: Auth cancel] with root cause
com.jcraft.jsch.JSchException: Auth cancel on freeBSD...

Code is:

public String[] execCMDnLogin (String host, String user, String password, String cmd) throws JSchException {
StringBuilder outputBuffer = new StringBuilder();
JSch jsch=new JSch();
Session session = jsch.getSession(user, host, 22);
session.setConfig("StrictHostKeyChecking", "no");

On BSD I also see:
Received disconnected from [IP]: com.jcraft.jsch.JSchException: Auth cancel [Preauth]

Anybody that can help? I am quite stuck...