title: PHP ssh2_exec() not working
body: <p>I want connect and run command on a remote device with SSH from my server. When I try the command in SSH client like Putty, it works flawlessly. But when I write it using a PHP script, the command will not be executed. Any ideas?</p>
  
  <pre><code>&lt;?php
    $host = "192.168.0.184";
    $user = "user";
    $password = "password";
    $cmd = "reboot";
    $ssh = ssh2_connect($host);
    $sshLogin = ssh2_auth_password($ssh, $user, $password);
    $sshExec = ssh2_exec($ssh, $cmd);
  ?&gt;
  </code></pre>
  
  <p>In device log, I can see user is authenticated successfully but nothing else.</p>