Shell_exec works correctly in PHP, but when using ssh it does not return any output..
<?php
echo shell_exec("/usr/bin/ssh -i /tmp/key server 'ls'");
?>
The above command works fine in a bash shell and the following displays the proper output in PHP
<?php
echo shell_exec("ls");
?>
I was hoping this could be done without using a third party php library...