title: Jsch certificate based authentication and login Auth cancel
body: <p>Jsch, private.ppk based login.</p>
  
  <p>Currently i have following code to ssh login but getting exception due to does not provide key.</p>
  
  <p>Following is my error i am getting</p>
  
  <pre><code>om.jcraft.jsch.JSchException: Auth cancel
  
  
   JSch jsch = new JSch();
          Session session = jsch.getSession(user_name, host, 22);
  
  
          UserInfo ui = new SSHUserInfo(password, true);
          session.setUserInfo(ui);
          //connect to remove server
          session.connect();
  
          //sudo login bamboo
          if (null != session &amp;&amp; session.isConnected()) {
              session.disconnect();
          }
  </code></pre>