mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-20 19:08:54 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@189137 c90b9560-bf6c-de11-be94-00142212c4b1
67 lines
1.8 KiB
XML
67 lines
1.8 KiB
XML
<?xml version='1.0' encoding='iso-8859-1'?>
|
|
<!-- $Revision: 1.4 $ -->
|
|
<!-- Generated by xml_proto.php v2.1. Found in /scripts directory of phpdoc. -->
|
|
<refentry id="function.ssh2-tunnel">
|
|
<refnamediv>
|
|
<refname>ssh2_tunnel</refname>
|
|
<refpurpose>
|
|
Open a tunnel through a remote server
|
|
</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>resource</type><methodname>ssh2_tunnel</methodname>
|
|
<methodparam><type>resource</type><parameter>session</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>host</parameter></methodparam>
|
|
<methodparam><type>int</type><parameter>port</parameter></methodparam>
|
|
</methodsynopsis>
|
|
|
|
<simpara>
|
|
Open a socket stream to an arbitrary host/port by way of the
|
|
currently connected SSH server.
|
|
</simpara>
|
|
|
|
<example>
|
|
<title>Opening a tunnel to an arbitrary host</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$connection = ssh2_connect('shell.example.com', 22);
|
|
ssh2_auth_pubkey_file($connection, 'username', 'id_dsa.pub', 'id_dsa');
|
|
|
|
$tunnel = ssh2_tunnel($connection, '10.0.0.101', 12345);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
|
|
<simpara>
|
|
See Also:
|
|
<function>ssh2_connect</function>, and
|
|
<function>fsockopen</function>
|
|
</simpara>
|
|
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<!-- 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
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
|
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
|
|
-->
|