title: "reject HostKey" when connecting to remote host through jumphost with JSch
body: <p>Need to SSH to destination host through jumphost. Had tried the same mentioned in <a href="http://www.jcraft.com/jsch/examples/JumpHosts.java.html" rel="nofollow noreferrer">JSch JumpHosts example</a>.</p>
  
  <pre><code>Session[] sessions = new Session[2];
  Session session = null;
  
  sessions[0] = session = jsch.getSession(getUserName(), "jumphost1.com", 22);
  session.setPassword(getHostPassword());
  UserInfo userInfo = new UserInfo();
  userInfo.setPassword(getHostPassword());
  session.setUserInfo(userInfo);
  Properties prop = new Properties();
  prop.put("StrictHostKeyChecking", "no");
  prop.put("PreferredAuthentications", "publickey,keyboard-interactive,password");
  session.setConfig(prop);
  session.connect();
  
  String host = "host1.com";
  int assignedPort = session.setPortForwardingL(0, host, 22);
  LOGGER.info("Jump host the {} of agent {} and port forwarding {}", i, host, assignedPort);
  
  sessions[i] = session = jsch.getSession(getUserName(), "127.0.0.1", assignedPort);
  session.setPassword(getHostPassword());
  userInfo = new UserInfo();
  userInfo.setPassword(getHostPassword());
  session.setUserInfo(userInfo);
  session.setHostKeyAlias(host);
  session.connect();
  </code></pre>
  
  <p>Getting below exception when connection to destination host:</p>
  
  <pre class="lang-none prettyprint-override"><code>Caused by: com.jcraft.jsch.JSchException: reject HostKey: 127.0.0.1
      at com.jcraft.jsch.Session.checkHost(Session.java:799)
      at com.jcraft.jsch.Session.connect(Session.java:345)
      at com.jcraft.jsch.Session.connect(Session.java:183)
  </code></pre>
  
  <p>I am trying to login to host <code>host1.com</code> through <code>jumphost1.com</code></p>
  
  <ul>
  <li>login to <code>jumphost1.com</code></li>
  <li>then ssh <code>host1.com</code></li>
  <li>execute the commands in the <code>host1</code></li>
  </ul>