|
Последние активные темы форума |
|
ssh2_methods_negotiated
(no version information, might be only in CVS) ssh2_methods_negotiated --
Return list of negotiated methods
Descriptionarray ssh2_methods_negotiated ( resource session ) Returns list of negotiated methods.
Пример 1. Determining what methods were negotiated
<?php
$connection
=
ssh2_connect
(
'shell.example.com'
,
22
);
$methods
=
ssh2_methods_negotiated
(
$connection
);
echo
"Encryption keys were negotiated using:
{
$methods
[
'kex'
]}\n
"
;
echo
"Server identified using an
{
$methods
[
'hostkey'
]}
with "
;
echo
"fingerprint: "
.
ssh2_fingerprint
(
$connection
) .
"\n"
;
echo
"Client to Server packets will use methods:\n"
;
echo
"
\t
Crypt:
{
$methods
[
'client_to_server'
][
'crypt'
]}\n
"
;
echo
"
\t
Comp:
{
$methods
[
'client_to_server'
][
'comp'
]}\n
"
;
echo
"
\t
MAC:
{
$methods
[
'client_to_server'
][
'mac'
]}\n
"
;
echo
"Server to Client packets will use methods:\n"
;
echo
"
\t
Crypt:
{
$methods
[
'server_to_client'
][
'crypt'
]}\n
"
;
echo
"
\t
Comp:
{
$methods
[
'server_to_client'
][
'comp'
]}\n
"
;
echo
"
\t
MAC:
{
$methods
[
'server_to_client'
][
'mac'
]}\n
"
;
?>
|
|
Смотрите также:
ssh2_connect()
|