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 = \phpseclib3\Crypt\PublicKeyLoader::load('...', '(optional) password');

$ssh = new \phpseclib3\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

Table of Contents

Classes

SSH2
Pure-PHP implementation of SSHv2.

        
On this page

Search results