title: Connection health check for sftp with JSch
body: <p>I need to check the health of the SFTP connection using JSch liberary. I have used the following approach. Please correct me if I am wrong.</p>
  
  <pre><code>public boolean checkConnection() throws JSchException {
      try {
          JSch jsch = new JSch();
          Session session = sch.getSession(username, host);
          session.setPort(PORT);   
          session.setPassword(password);
          session.connect();
          return true;
      } catch(Exception ex){
          LOG.error("Error while connecting to SFTP", ex);
      }
      return false
  }
  </code></pre>