title: PHP shell_exec ssh connection
body: <p>I know this question has been asked before in many different ways but I'm still scratching my head over why I can't get this to work.</p>
  
  <p>Firstly I have two SLES servers setup, these are Server A &amp; Server B which are both running on a small private network which is only accessed by a dedicated team.</p>
  
  <p>Server A is configured as a web server which is running Apache, PHP, MYSQL and ssh all of which are running problem free.</p>
  
  <p>Server B is used to run menial tasks with ssh also installed and activated. </p>
  
  <p>I have created my rsa key on Server A and installed it on Server B which when run at the command line logs me in straight away with out asking for a password. I have repeated this process for both root &amp; nobody accounts on Server A.</p>
  
  <p>I have added this a PHP page to Server A which looks like:</p>
  
  <pre><code>&lt;?php
  shell_exec('ssh root@192.162.0.5 ./StartTest.sh');
  
  header("Location: archive.php?page=home"); 
  ?&gt;
  </code></pre>
  
  <p>But when I run it it does not create my folder. If I run this from the command line it works for both (I think both, I can't recall if I did try this for the nobody account on the cli now) root &amp; the nobody account. I even went as far as adding the nobody account to the root group but still no joy.</p>
  
  <p>Have I missed some thing here. All I would like to do is connect from Server A to Server B via php &amp; ssh to execute one command and redirect to a another page on the web site.</p>
  
  <p>Any help would be graciously appreciated as my paracetamol stock is running low.</p>