2017 © Pedro Peláez
 

library ssh-client

SSH Client

image

hexpang/ssh-client

SSH Client

  • Friday, August 26, 2016
  • by HexPang
  • Repository
  • 1 Watchers
  • 6 Stars
  • 599 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 5 Versions
  • 10 % Grown

The README.md

SSH Client For PHP

SSH Client for PHP., (*1)

Build Status
[Build Status]

Install With Composer

composer require hexpang/ssh-client, (*2)

Namespace

hexpang\Client\SSHClient, (*3)

Require

SSH2, (*4)

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

Method Description Usage
ping Check port $ssh->ping($host,$port,$timeOut)
connect Connect to server $ssh->connect()
authorize Authorize $ssh->authorize()
authorizeWithPK Authorize With Public Key $ssh->authorizeWithPK('id_rsa.pub','id_rsa','passphrase')
cmd Execute command and response result for an array[ Response,Error ] $ssh->cmd($command)
scp_send Send file via SCP Protocol $client->scp_send($local_file,$remote_file,$create_mode = 644)
scp_recv Receive file via SCP Protocol $client->scp_recv($remote_file,$local_file)
disconnect Disconnect $ssh->disconnect()

The Versions

26/08 2016

v0.5.x-dev

0.5.9999999.9999999-dev https://github.com/hexpang/ssh-client

SSH Client

  Sources   Download

MIT

The Requires

  • php >=5.5

 

The Development Requires

by Avatar HexPang

client ssh ssh-client

26/08 2016

v0.5.3

0.5.3.0 https://github.com/hexpang/ssh-client

SSH Client

  Sources   Download

MIT

The Requires

  • php >=5.5

 

The Development Requires

by Avatar HexPang

client ssh ssh-client

26/08 2016

v0.5.2

0.5.2.0 https://github.com/hexpang/ssh-client

SSH Client

  Sources   Download

MIT

The Requires

  • php >=5.5

 

The Development Requires

by Avatar HexPang

client ssh ssh-client

26/08 2016

dev-master

9999999-dev https://github.com/hexpang/ssh-client

SSH Client

  Sources   Download

MIT

The Requires

  • php >=5.5

 

The Development Requires

by Avatar HexPang

client ssh ssh-client

26/08 2016

v0.5.0

0.5.0.0 https://github.com/hexpang/ssh-client

SSH Client

  Sources   Download

MIT

The Requires

  • php >=5.5

 

The Development Requires

by Avatar HexPang

client ssh ssh-client