I recently released a PHP package that makes executing commands over SSH super simple. You can also upload/download files via SCP.

github.com/DivineOmega/php-ssh