mirror of
https://github.com/php/pecl-networking-ssh2.git
synced 2026-03-23 22:52:06 +01:00
Since these all need a test ssh server to connect to,
you'll need to set some environment variables.
TEST_SSH2_HOSTNAME - Where to connect to
TEST_SSH2_PORT - Port (default: 22)
TEST_SSH2_USER - Login as (default: getenv('USER'))
TEST_SSH2_AUTH - Mode of authentication ('none', 'password', 'agent')
TEST_SSH2_PASS - Password to authenticate with
TEST_SSH2_TEMPDIR - Where to store temporary files on the remote filesystem
(default: /tmp )
12 lines
283 B
PHP
12 lines
283 B
PHP
--TEST--
|
|
ssh2_auth_FOO() - Attempt to authenticate to a remote host
|
|
--SKIPIF--
|
|
<?php require('ssh2_skip.inc'); ssh2t_needs_auth(); ?>
|
|
--FILE--
|
|
<?php require('ssh2_test.inc');
|
|
|
|
$ssh = ssh2_connect(TEST_SSH2_HOSTNAME, TEST_SSH2_PORT);
|
|
var_dump(ssh2t_auth($ssh));
|
|
--EXPECT--
|
|
bool(true)
|