hexpang/ssh-client

v0.5.3 2016-08-26 19:10 UTC

This package is not auto-updated.

Last update: 2024-12-05 04:15:06 UTC


README

SSH Client for PHP.

Install With Composer

composer require hexpang/ssh-client

Namespace

hexpang\Client\SSHClient

Require

SSH2

Usage

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!";
}

Method