mirror of
https://github.com/danog/tgseclib.git
synced 2024-11-26 20:24:39 +01:00
SSH2: update private key auth example
This commit is contained in:
parent
eddbdcc66c
commit
8a03e90d95
@ -24,9 +24,7 @@
|
|||||||
* <?php
|
* <?php
|
||||||
* include 'vendor/autoload.php';
|
* include 'vendor/autoload.php';
|
||||||
*
|
*
|
||||||
* \phpseclib\Crypt\PublicKeyLoader::load('...');
|
* $key = \phpseclib\Crypt\PublicKeyLoader::load('...', '(optional) password');
|
||||||
* //$key->setPassword('whatever');
|
|
||||||
* $key->load(file_get_contents('privatekey'));
|
|
||||||
*
|
*
|
||||||
* $ssh = new \phpseclib\Net\SSH2('www.domain.tld');
|
* $ssh = new \phpseclib\Net\SSH2('www.domain.tld');
|
||||||
* if (!$ssh->login('username', $key)) {
|
* if (!$ssh->login('username', $key)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user