title: "com.jcraft.jsch.JSchException: Auth fail" with working passwords
body: <p>While trying to upload the file to our server, i am getting the following exception</p>
  
  <pre><code>    com.jcraft.jsch.JSchException: Auth fail
          at com.jcraft.jsch.Session.connect(Session.java:464)
          at com.jcraft.jsch.Session.connect(Session.java:158)
          at FtpService.transferFileToReciever(FtpService.java:80)
          at FtpService.transferFileToReciever(FtpService.java:54)
          at FtpService.transferFileToRecievers(FtpService.java:44)
          at FtpService.transferSingeFile(FtpService.java:241)
          at FtpService.main(FtpService.java:26)
      Auth fail
  </code></pre>
  
  <p>The part of function transferFileToReciever from source file is </p>
  
  <pre><code>        JSch jsch = new JSch();
          jsch.addIdentity("/root/.ssh/id_dsa");
          Session session = jsch.getSession(username, host, 22);
  
          session.setUserInfo(serverinfo);
          session.connect(); //geting exception here
  
          boolean ptimestamp = true;
  </code></pre>
  
  <p>The passwords are working, since i can do login using ssh, but using JSCh it doesnt work even provided with key, username and password. 
  Using id_dsa key with java version "1.6.0_25".
  What could be the error?</p>
  
  <p>Found other similar question, but not the answer.
  Thanks in advance.</p>