title: SSH connect using PHP
body: <p>I am trying connect to a server via <code>SSH</code> using below code:</p>
  
  <pre><code>include('Net/SSH2.php'); 
  $ssh = new Net_SSH2('mydomain.com'); 
  if (!$ssh-&gt;login('xxxx', 'xxxx')) { 
     exit('Login Failed'); 
  }else{ 
     echo "connected"; 
  } 
  echo $ssh-&gt;exec('pwd');
  </code></pre>
  
  <p>It says <code>connected</code> but it shows no output for the code 
  <code>echo $ssh-&gt;exec('pwd');</code></p>
  
  <p>Why?</p>
  
  <p>LOG MESSAGES</p>
  
  <pre><code>-&gt; NET_SSH2_MSG_CHANNEL_REQUEST (since last: 0.0002, network: 0s)
  00000000  00:00:00:00:00:00:00:04:65:78:65:63:01:00:00:00  ........exec....
  00000010  03:64:69:72                                      .dir
  
  &lt;- NET_SSH2_MSG_CHANNEL_FAILURE (since last: 0.0611, network: 0.0001s)
  00000000  00:00:00:00                                      ....
  </code></pre>