I am trying to prepare PHP script with the new server nginx web server.
Unfortunately, I havent dealt with SSH2 before for php.
Maybe some good forum would be able to help me with this?
I am trying to prepare PHP script with the new server nginx web server.
Unfortunately, I havent dealt with SSH2 before for php.
Maybe some good forum would be able to help me with this?
You can do SSH in PHP with http://phpseclib.sourceforge.net/ . eg.
<?php
include('Net/SSH2.php');
$ssh = new Net_SSH2('www.domain.tld');
if (!$ssh->login('username', 'password')) {
exit('Login Failed');
}
echo $ssh->exec('pwd');
echo $ssh->exec('ls -la');
?>