PHP: ssh2_methods_negotiated - Manual

downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

ssh2_publickey_add ssh2_fingerprint

Last updated: Sat, 27 Jan 2007

view this page in

# ssh2_methods_negotiated

(PECL)

ssh2_methods_negotiated -- Return list of negotiated methods

## Description

array 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 "\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";
?>`

See Also: ssh2_connect()

add a note User Contributed Notes
ssh2_methods_negotiated
There are no user contributed notes for this page.
ssh2_publickey_add ssh2_fingerprint

Last updated: Sat, 27 Jan 2007
show source | credits | stats | sitemap | contact | advertising | mirror sites
Copyright © 2001-2007 The PHP Group
All rights reserved.
This mirror generously provided by: Yahoo! Inc.
Last updated: Sat Mar 10 10:36:09 2007 PST