title: phpseclib always produces login failed
body: <p>I'm not sure if this is me doing something wrong or whether the server just doesn't support phpseclib or what, but I am trying to connect to an FTP server that will only accept secure FTP connections, and only from certain IP addresses. Now I know that the FTP server accepts a connection from my VPS server as I have remotely connected into my VPS via SSH and manually connected to the FTP server from the command line successfully.</p>
  
  <p>However when I try the following with phpseclib it always hits the exit point.</p>
  
  <pre><code>set_include_path(get_include_path() . PATH_SEPARATOR . 'phpseclib');
  include 'Net/SFTP.php';
  
  $sftp = new NET_SFTP('***');
  if(!$sftp-&gt;login('***', '***')) {
      $sftp-&gt;getSFTPErrors();
      exit('Login Failed'); // &lt;-- Code always gets to this point
  }
  
  echo $sftp-&gt;pwd();
  </code></pre>
  
  <p>I am unsure on how to even begin debugging this problem. I have <a href="http://www.frostjedi.com/phpbb3/viewtopic.php?f=46&amp;t=168858&amp;p=392293" rel="nofollow">asked a question on their forum</a> as well to try and get help. I have tried to enable logging with <code>define('NET_SFTP_LOGGING', NET_SFTP_LOG_COMPLEX);</code> and then output <code>echo $sftp-&gt;getSFTPLog();</code> just above the exit, but that doesn't output anything.</p>
  
  <p>On the page I have just <code>Login Failed</code>, so I'm not getting any errors from <code>$sftp-&gt;getSFTPErrors();</code>.</p>
  
  <p>I am completely new to using a secure FTP connection in PHP and don't know what I am doing wrong. Can someone please help me debug the issue?</p>