1
0
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:
terrafrost 2019-09-07 17:06:51 -05:00
parent eddbdcc66c
commit 8a03e90d95

View File

@ -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)) {