title: Running commands via root on SSH2
body: <p>I am developing a control panel in PHP, i have the PHPsecLib libraries installed and am using it to issue commands to the remote servers.</p>
  
  <p>For example;</p>
  
  <pre><code>$ssh-&gt;exec("cd /home/{$user}/{$id}; screen -S {$id} -A -d -m  java -Xmx768M -jar minecraft_server.jar nogui -nojline;"); 
  </code></pre>
  
  <p>Now my question is, because i am issuing the commands as root, is this a security threat, even when all the commands that are ran, are pre-made/hard coded and not from user inputs.</p>
  
  <p>If this is an issue, could anyone advise the best way of doing it?</p>
  
  <p>Thanks,
  Harry </p>