title: shell_exec not giving any result, and not doing anything
body: <p>So I have question which in my head should seem very simple to solve.
  I want to ssh to a server, which I have done a ton of times, and then make a shell execute which I have done a ton of times as well, but it is not working.</p>
  
  <p>The code i am using</p>
  
  <pre><code>&lt;?php
              $ip = '1.2.3.4';
              $cmd = "ssh user@".$ip;
              $result = shell_exec($cmd." 'sudo /bin/systemctl stop wildfly.service'");
              echo "&lt;pre&gt;output: $result&lt;/pre&gt;";
              echo "&lt;div class='alert alert-success'&gt;&lt;strong&gt;SUCCESS&lt;/strong&gt;&lt;br&gt;Wildfly node has now restarted&lt;/div&gt;"; 
  ?&gt;
  </code></pre>
  
  <p>Running the command directly from the terminal</p>
  
  <pre><code>ssh user@1.2.3.4 sudo /bin/systemctl stop wildfly.service
  </code></pre>
  
  <p>It works, but running it within php gives me nothing, and it not doing anything.</p>
  
  <p>Can someone maybe guide me to what I am doing wrong with my shell_exec?</p>
  
  <p>Thanks in advance!</p>