Рекурсивный акроним словосочетания «PHP: Hypertext Preprocessor»
Добро пожаловать на форум PHP программистов!
За последние 24 часа нас посетили 16095 программистов и 1772 робота. Сейчас ищут 1829 программистов ...
ssh2_methods_negotiated - Return list of negotiated methods
Вернуться к: SSH2 Функции
ssh2_methods_negotiated
(PECL ssh2 >= 0.9.0)
ssh2_methods_negotiated — Return list of negotiated methods
Описание
array ssh2_methods_negotiated
( resource
$session
)Returns list of negotiated methods.
Список параметров
-
session
-
An SSH connection link identifier, obtained from a call to ssh2_connect().
Возвращаемые значения
Примеры
Пример #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 "\tCrypt: {$methods['client_to_server']['crypt']}\n";
echo "\tComp: {$methods['client_to_server']['comp']}\n";
echo "\tMAC: {$methods['client_to_server']['mac']}\n";
echo "Server to Client packets will use methods:\n";
echo "\tCrypt: {$methods['server_to_client']['crypt']}\n";
echo "\tComp: {$methods['server_to_client']['comp']}\n";
echo "\tMAC: {$methods['server_to_client']['mac']}\n";
?>
Вернуться к: SSH2 Функции