title: How To Execute SSH Commands Via PHP
body: <p>I am looking to SSH out via PHP. What is the best/most secure way to go about this? I know I can do:</p>
  
  <pre><code>shell_exec("SSH user@host.com mkdir /testing");
  </code></pre>
  
  <p>Anything better? That feels so 'naughty' :).</p>