Created
November 15, 2014 03:25
-
-
Save fhferreira/5f8f8ff4d73332354a9a to your computer and use it in GitHub Desktop.
PHP Sec Lib --- SSH Php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//https://github.com/phpseclib/phpseclib | |
include('./Net/SSH2.php'); | |
$host = '127.0.0.1'; | |
$user = 'root'; | |
$port = '22'; | |
$password = 'pass'; | |
$command = "ls -la /srv/users/serverpilot/apps/hadouken"; | |
$ssh = new Net_SSH2($host); | |
if (!$ssh->login($user, $password)) { | |
exit('Login Failed'); | |
} | |
echo $ssh->exec($command); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment