面向对象的SSH for PHP

dev-master 2012-10-16 08:12 UTC

This package is not auto-updated.

Last update: 2024-09-14 17:31:51 UTC


README

OOSSH 是php SSH2库的封装。

警告

OOSSH 不稳定

基本用法

$con = new OOSSH\SSH2\Connection('host', 22);
$con->connect()
    ->authenticate(new PasswordAuthentication('foo', 'bar'))
    ->exec('cd /home/foo')
    ->exec('ls -al', function($stdio, $stderr) { echo $stdio; })
    ->begin()
      ->exec('cd /var/www')
      ->exec('mv foo bar')
      ->exec('rm -rf cache/*')
      ->exec('exit')
    ->end();

待办事项

  • 文件处理(SCP)
  • 重构
  • 测试

贡献

发送邮件给我 yohan@giarelli.org ;)