2017 © Pedro Peláez
 

library ssh

image

bashkarev/ssh

  • Monday, October 30, 2017
  • by bashkarev
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Native ssh client

status: in progress, (*1)

Build Status, (*2)

Installation

The preferred way to install this extension is through composer., (*3)

Either run, (*4)

composer require bashkarev/ssh

Usage

$client = new \Bashkarev\Ssh\Client('127.0.0.1');
$client
    ->setPort(22)
    ->setUser('ssh_user')
    ->setIdentityFile('path/to/private_key')
    ->setForwardAgent(true);

/**
 * @var \Bashkarev\Ssh\Command $command
 */
$command = $client->exec('php -v', 360, 60);
foreach ($command->getIterator() as $type => $data) {
    if ($command::OUT === $type) {
        echo "\nRead from stdout: " . $data;
    } else { // $command::ERR === $type
        echo "\nRead from stderr: " . $data;
    }
}

$command->getExitCode();

The Versions

30/10 2017

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

  • php >=5.6

 

The Development Requires

by Avatar bashkarev