<?php
require_once __DIR__ . '/../vendor/autoload.php';
$executor = new \Jumper\Executor(
array(
'host' => '172.23.36.75',
'authentication' => array(
'class' => 'Ssh\Authentication\PublicKeyFile',
'args' => array(
'root',
'~/.ssh/id_rsa.pub',
'~/.ssh/id_rsa'
)
)
)
);
$array = array(1, 2, 3, 4);
$executor->run(function() use ($array) {rsort($array); return $array;});
$executor->run(function() use ($array) {rsort($array); return $array;});
Throw an error
Warning: ssh2_auth_pubkey_file(): Authentication failed for root using public key: Invalid public key, too short in ./jumper/vendor/herzult/php-ssh/src/Ssh/Authentication/PublicKeyFile.php on line 46
Call Stack:
0.0009 651184 1. {main}() ./jumper/demo/test.php:0
0.2916 5544416 2. Jumper\Executor->run() ./jumper/demo/test.php:21
0.3008 5554784 3. Ssh\Exec->run() ./jumper/src/Jumper/Executor.php:106
0.3008 5555184 4. Ssh\AbstractResourceHolder->getResource() ./jumper/vendor/herzult/php-ssh/src/Ssh/Exec.php:22
0.3008 5555184 5. Ssh\Exec->createResource() ./jumper/vendor/herzult/php-ssh/src/Ssh/AbstractResourceHolder.php:25
0.3008 5555184 6. Ssh\Subsystem->getSessionResource() ./jumper/vendor/herzult/php-ssh/src/Ssh/Exec.php:17
0.3008 5555184 7. Ssh\AbstractResourceHolder->getResource() ./jumper/vendor/herzult/php-ssh/src/Ssh/Subsystem.php:39
0.3009 5555184 8. Ssh\Session->createResource() ./jumper/vendor/herzult/php-ssh/src/Ssh/AbstractResourceHolder.php:25
0.4208 5611280 9. Ssh\Session->authenticate() ./jumper/vendor/herzult/php-ssh/src/Ssh/Session.php:140
0.4208 5611280 10. Ssh\Authentication\PublicKeyFile->authenticate() ./jumper/vendor/herzult/php-ssh/src/Ssh/Session.php:164
0.4208 5611360 11. ssh2_auth_pubkey_file() ./jumper/vendor/herzult/php-ssh/src/Ssh/Authentication/PublicKeyFile.php:46
Fatal error: Uncaught exception 'RuntimeException' with message 'The authentication over the current SSH connection failed.' in ./jumper/vendor/herzult/php-ssh/src/Ssh/Session.php on line 167
RuntimeException: The authentication over the current SSH connection failed. in ./jumper/vendor/herzult/php-ssh/src/Ssh/Session.php on line 167
Call Stack:
0.0009 651184 1. {main}() ./jumper/demo/test.php:0
0.2916 5544416 2. Jumper\Executor->run() ./jumper/demo/test.php:21
bug