title: JSCH: SFTP. Hangs at session.connect() using the port 21
body: <p>I am connecting to FTP server via sftp(JSCH).</p>
  
  <p>Evertime i connect to the FTP server using the port 21, it always hangs at session.connect().</p>
  
  <p>It does not throw any exception. But when i use other ports. It works and it throws exception.</p>
  
  <p>Is there any way i could catch the error?</p>
  
  <p>Here is a sample of my code.</p>
  
  <pre><code>public static void main(String[] args) throws SftpException {
  
      JSch jsch = new JSch();
  
      try {
  
          Session session = jsch.getSession("username", "host", 21);
          session.setConfig("StrictHostKeyChecking", "no");
          session.setPassword("password");
          session.connect();
  
          Channel channel = session.openChannel("sftp");
          channel.connect();
          ChannelSftp channelSftp = (ChannelSftp) channel;
          session.disconnect();
          channelSftp.disconnect();
  
      } catch (JSchException e) {
          log("Cannot make connection to FTP server ");
          e.printStackTrace();
  
      }
  
  }
  </code></pre>