title: SFTP connection error ( transport protocol disconnected)
body: <p>I have a problem when i try to connect to the (Windows) SFTP Server. SFTP Server's name is Secure Bridge (for Windows). 
  It is strange because it looks work correctly sometime but not work sometime also. It shows error like below sometime. 
  My source is below.  Could you help me?  Why does this error occur? </p>
  
  <pre><code>[Error]
  
          java.io.IOException: The transport protocol disconnected
          com.sshtools.j2ssh.transport.TransportProtocolCommon.readMessage(Unknown Source)
          com.sshtools.j2ssh.transport.TransportProtocolCommon.sendNewKeys(Unknown Source)
          com.sshtools.j2ssh.transport.TransportProtocolCommon.beginKeyExchange(Unknown Source)
          com.sshtools.j2ssh.transport.TransportProtocolCommon.onMsgKexInit(Unknown Source)
      com.sshtools.j2ssh.transport.TransportProtocolCommon.startBinaryPacketProtocol(Unknown Source)
       com.sshtools.j2ssh.transport.TransportProtocolCommon.run(Unknown Source)
      java.lang.Thread.run(Unknown Source)
  
  
  
  
  private SshClient client = null;
  private PasswordAuthenticationClient auth = null;
  private SftpClient sftp = null;
  
  public boolean connect(String server,
                         int port,
                         String user,
                         String pwd) throws Exception {
  
      try {
  
          if (server == null || user == null || pwd == null) {
              logger.error("Parameter is null!");
              throw new Exception("Parameter is null!");
          }
  
          SshConnectionProperties params = new SshConnectionProperties();
          params.setHost(server);
          params.setPort(port);
  
          HostKeyVerification key = new HostKeyVerification() {
  
              @Override
              public boolean verifyHost(String arg0,
                                        SshPublicKey arg1) throws TransportProtocolException {
  
                  return true;
              }
          };
  
          client = new SshClient();
          client.setSocketTimeout(10000);
          client.connect(params, key);
  
          auth = new PasswordAuthenticationClient();
          auth.setUsername(user);
          auth.setPassword(pwd);
  
          int result = client.authenticate(auth);
  
          if (result != AuthenticationProtocolState.COMPLETE) {
              throw new Exception("Login to " + server + ":" + port + " " + user + "/" + pwd + " failed");
          }
  
          sftp = client.openSftpClient();
  
      } catch (Exception e) {
          logger.error(e);
          logout();
          return false;
      }
  
      return true;
  }
  </code></pre>