I'm using Jsch for executing ssh commands. When I pass private key it works well, but I need it to work without private key passing (it was already copied there).
So in console I can ssh to this server without anything. But Jsch throws Auth Fail. How can I do it ?
Session session = jSch.getSession(server);
session.setConfig("StrictHostKeyChecking", "no");
session.setConfig("UserKnownHostsFile", "/dev/null");
session.connect(connectTimeout);