title: How to set a custom SFTP port with phpseclib
body: <p>I have to connect to SFTP server by using PHP. I am using phpseclib for that. I found some example on Internet, but I am not able to connect to SFTP. I am using a custom port (2222) to connect to SFTP. Please tell me where I can define custom port to connect to SFTP.</p>
  
  <pre><code>&lt;?php
  include('Net/SFTP.php');
  
  $sftp = new Net_SFTP('www.domain.tld');
  if (!$sftp-&gt;login('username', 'password')) {
      exit('Login Failed');
  }
  ?&gt;
  </code></pre>
  
  <p>It is showing "Login Failed".</p>