Documentation

SSH2.php

Pure-PHP implementation of SSHv2.

PHP version 5

Here are some examples of how to use this library:

login('username', 'password')) { exit('Login Failed'); } echo $ssh->exec('pwd'); echo $ssh->exec('ls -la'); ?> $key = new \phpseclib\Crypt\RSA(); //$key->setPassword('whatever'); $key->loadKey(file_get_contents('privatekey'));

$ssh = new \phpseclib\Net\SSH2('www.domain.tld'); if (!$ssh->login('username', $key)) { exit('Login Failed'); }

echo $ssh->read('username@username:~$'); $ssh->write("ls -la\n"); echo $ssh->read('username@username:~$'); ?>

Tags
category

Net

author

Jim Wigginton terrafrost@php.net

copyright

2007 Jim Wigginton

license

http://www.opensource.org/licenses/mit-license.html MIT License

link
http://phpseclib.sourceforge.net

Interfaces, Classes and Traits

SSH2
Pure-PHP implementation of SSHv2.

Search results