SSH2.php
Pure-PHP implementation of SSHv2.
PHP version 5
Here are some examples of how to use this library:
$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
Interfaces, Classes and Traits
- SSH2
- Pure-PHP implementation of SSHv2.