hexpang / ssh-client
SSH客户端
v0.5.3
2016-08-26 19:10 UTC
Requires
- php: >=5.5
Requires (Dev)
- phpunit/phpunit: ^5.5
This package is not auto-updated.
Last update: 2024-09-26 03:22:15 UTC
README
PHP的SSH客户端。
使用Composer安装
composer require hexpang/ssh-client
命名空间
hexpang\Client\SSHClient
要求
用法
require_once 'path_to/vendor/autoload.php';
use hexpang\Client\SSHClient\SSHClient;
$client = new SSHClient($host,$port,$username,$password);
if($client->ping($host,$port,10)){
if($client->connect() && $client->authorize()){
var_dump($client->cmd('ls -l'));
}else{
echo "Oops.";
}
}else{
echo "Ping Timeout!";
}