ssh2_methods_negotiated

(PECL ssh2 >= 0.9.0)

ssh2_methods_negotiatedReturn list of negotiated methods

说明

ssh2_methods_negotiated ( resource $session ) : array

Returns list of negotiated methods.

参数

session

An SSH connection link identifier, obtained from a call to ssh2_connect().

返回值

范例

Example #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";

?>

参见

相关文章
php cubrid mysql 兼容性函数 return the name of the table of the specified fieldphp cubrid mysql 兼容性函数 return an array with the list of all existing cubrid databasesphp cubrid mysql 兼容性函数 return the value of a specific field in a specific rowphp enchant 函数 will return a list of values if any of those pre conditions are not metphp hash 函数 return a list of registered hashing algorithms suitable for hash hmacphp firebird/interbase 函数 return error messagesphp ingres 函数 get the return value from a procedure callphp odbc 函数 get the list of table names stored in a specific data sourcephp posix 函数 return the real user id of the current processphp pspell 函数 determine whether to save a replacement pairs list along with the wordlistphp snmp 函数 return all values that are enums with their enum value instead of the raw integerphp ssh2 函数 execute a command on a remote serverphp ssh2 函数 return list of negotiated methodsphp ssh2 函数 list currently authorized publickeysphp ssh2 函数 return the target of a symbolic linkphp ssh2 函数 remove a directoryphp uopz 函数 provide a return value for an existing functionphp win32service 函数 define or return the exit code for the current running servicephp hyperwave api 函数 returns a list of all logged in usersphp sdo das relational 函数 executes an sql query passed as a prepared statement with a list of values to substitute for placeholders and return the results as a normalised data graph
关注编程学问公众号