2011-08-16 11:38:58 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
2009-07-11 09:02:41 +00:00
|
|
|
<!-- $Revision$ -->
|
2007-06-20 22:25:43 +00:00
|
|
|
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.ssh2-methods-negotiated">
|
2007-06-15 00:16:44 +00:00
|
|
|
<refnamediv>
|
|
|
|
<refname>ssh2_methods_negotiated</refname>
|
|
|
|
<refpurpose>Return list of negotiated methods</refpurpose>
|
|
|
|
</refnamediv>
|
2007-06-15 00:16:47 +00:00
|
|
|
|
|
|
|
<refsect1 role="description">
|
|
|
|
&reftitle.description;
|
2007-06-15 00:16:44 +00:00
|
|
|
<methodsynopsis>
|
|
|
|
<type>array</type><methodname>ssh2_methods_negotiated</methodname>
|
|
|
|
<methodparam><type>resource</type><parameter>session</parameter></methodparam>
|
|
|
|
</methodsynopsis>
|
|
|
|
<para>
|
|
|
|
Returns list of negotiated methods.
|
|
|
|
</para>
|
2007-06-15 00:16:47 +00:00
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="parameters">
|
|
|
|
&reftitle.parameters;
|
|
|
|
<para>
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>session</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
An SSH connection link identifier, obtained from a call to
|
|
|
|
<function>ssh2_connect</function>.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="returnvalues">
|
|
|
|
&reftitle.returnvalues;
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
2004-12-30 05:09:31 +00:00
|
|
|
|
2007-06-15 00:16:47 +00:00
|
|
|
<refsect1 role="examples">
|
|
|
|
&reftitle.examples;
|
2007-06-15 00:16:44 +00:00
|
|
|
<para>
|
|
|
|
<example>
|
|
|
|
<title>Determining what methods were negotiated</title>
|
|
|
|
<programlisting role="php">
|
2004-12-30 05:09:31 +00:00
|
|
|
<![CDATA[
|
|
|
|
<?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";
|
2005-01-14 00:00:07 +00:00
|
|
|
echo "\tCrypt: {$methods['client_to_server']['crypt']}\n";
|
|
|
|
echo "\tComp: {$methods['client_to_server']['comp']}\n";
|
|
|
|
echo "\tMAC: {$methods['client_to_server']['mac']}\n";
|
2004-12-30 05:09:31 +00:00
|
|
|
|
|
|
|
echo "Server to Client packets will use methods:\n";
|
2005-01-14 00:00:07 +00:00
|
|
|
echo "\tCrypt: {$methods['server_to_client']['crypt']}\n";
|
|
|
|
echo "\tComp: {$methods['server_to_client']['comp']}\n";
|
|
|
|
echo "\tMAC: {$methods['server_to_client']['mac']}\n";
|
2004-12-30 05:09:31 +00:00
|
|
|
|
|
|
|
?>
|
|
|
|
]]>
|
2007-06-15 00:16:44 +00:00
|
|
|
</programlisting>
|
|
|
|
</example>
|
|
|
|
</para>
|
2007-06-15 00:16:47 +00:00
|
|
|
</refsect1>
|
2004-12-30 05:09:31 +00:00
|
|
|
|
2007-06-15 00:16:47 +00:00
|
|
|
<refsect1 role="seealso">
|
|
|
|
&reftitle.seealso;
|
2007-06-15 00:16:44 +00:00
|
|
|
<para>
|
2007-06-15 00:16:47 +00:00
|
|
|
<simplelist>
|
|
|
|
<member><function>ssh2_connect</function></member>
|
|
|
|
</simplelist>
|
2007-06-15 00:16:44 +00:00
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
</refentry>
|
2004-12-25 01:03:18 +00:00
|
|
|
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
|
|
Local variables:
|
|
|
|
mode: sgml
|
|
|
|
sgml-omittag:t
|
|
|
|
sgml-shorttag:t
|
|
|
|
sgml-minimize-attributes:nil
|
|
|
|
sgml-always-quote-attributes:t
|
|
|
|
sgml-indent-step:1
|
|
|
|
sgml-indent-data:t
|
|
|
|
indent-tabs-mode:nil
|
|
|
|
sgml-parent-document:nil
|
2009-09-25 07:04:39 +00:00
|
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
2004-12-25 01:03:18 +00:00
|
|
|
sgml-exposed-tags:nil
|
|
|
|
sgml-local-catalogs:nil
|
|
|
|
sgml-local-ecat-files:nil
|
|
|
|
End:
|
|
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
|
|
vim: et tw=78 syn=sgml
|
|
|
|
vi: ts=1 sw=1
|
|
|
|
-->
|