mirror of
https://github.com/php/doc-en.git
synced 2026-03-23 23:32:18 +01:00
Completely restructured, although very few content changes (only in http.xml and file.xml) # These need a complete readthrough to remove 'you', inline version notes, # version info, and general updating git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@306233 c90b9560-bf6c-de11-be94-00142212c4b1
275 lines
7.6 KiB
XML
275 lines
7.6 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision: 296080 $ -->
|
|
|
|
<refentry xml:id="wrappers.ssh2" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" role="noversion">
|
|
<refnamediv>
|
|
<refname>ssh2://</refname>
|
|
<refpurpose>Secure Shell 2</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description"><!-- {{{ -->
|
|
&reftitle.description;
|
|
<para>
|
|
<filename>ssh2.shell://</filename>
|
|
<filename>ssh2.exec://</filename>
|
|
<filename>ssh2.tunnel://</filename>
|
|
<filename>ssh2.sftp://</filename>
|
|
<filename>ssh2.scp://</filename>
|
|
PHP 4.3.0 and up (PECL)
|
|
</para>
|
|
|
|
<note>
|
|
<title>This wrapper is not enabled by default</title>
|
|
<simpara>
|
|
In order to use the <filename>ssh2.*://</filename> wrappers you must install
|
|
the <link xlink:href="&url.pecl.package;ssh2">SSH2</link> extension
|
|
available from <link xlink:href="&url.pecl;">PECL</link>.
|
|
</simpara>
|
|
</note>
|
|
|
|
<simpara>
|
|
In addition to accepting traditional URI login details, the ssh2 wrappers
|
|
will also reuse open connections by passing the connection resource in the
|
|
host portion of the URL.
|
|
</simpara>
|
|
</refsect1><!-- }}} -->
|
|
|
|
<refsect1 role="usage"> <!-- {{{ -->
|
|
&reftitle.options;
|
|
<itemizedlist>
|
|
<listitem><simpara><filename>ssh2.shell://user:pass@example.com:22/xterm</filename></simpara></listitem>
|
|
<listitem><simpara><filename>ssh2.exec://user:pass@example.com:22/usr/local/bin/somecmd</filename></simpara></listitem>
|
|
<listitem><simpara><filename>ssh2.tunnel://user:pass@example.com:22/192.168.0.1:14</filename></simpara></listitem>
|
|
<listitem><simpara><filename>ssh2.sftp://user:pass@example.com:22/path/to/filename</filename></simpara></listitem>
|
|
</itemizedlist>
|
|
</refsect1> <!-- }}} -->
|
|
|
|
<refsect1 role="options"><!-- {{{ -->
|
|
&reftitle.options;
|
|
<para>
|
|
<table>
|
|
<title>Wrapper Summary</title>
|
|
<tgroup cols="6">
|
|
<thead>
|
|
<row>
|
|
<entry>Attribute</entry>
|
|
<entry>ssh2.shell</entry>
|
|
<entry>ssh2.exec</entry>
|
|
<entry>ssh2.tunnel</entry>
|
|
<entry>ssh2.sftp</entry>
|
|
<entry>ssh2.scp</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry>Restricted by <link linkend="ini.allow-url-fopen">allow_url_fopen</link></entry>
|
|
<entry>Yes</entry>
|
|
<entry>Yes</entry>
|
|
<entry>Yes</entry>
|
|
<entry>Yes</entry>
|
|
<entry>Yes</entry>
|
|
</row>
|
|
<row>
|
|
<entry>Allows Reading</entry>
|
|
<entry>Yes</entry>
|
|
<entry>Yes</entry>
|
|
<entry>Yes</entry>
|
|
<entry>Yes</entry>
|
|
<entry>Yes</entry>
|
|
</row>
|
|
<row>
|
|
<entry>Allows Writing</entry>
|
|
<entry>Yes</entry>
|
|
<entry>Yes</entry>
|
|
<entry>Yes</entry>
|
|
<entry>Yes</entry>
|
|
<entry>No</entry>
|
|
</row>
|
|
<row>
|
|
<entry>Allows Appending</entry>
|
|
<entry>No</entry>
|
|
<entry>No</entry>
|
|
<entry>No</entry>
|
|
<entry>Yes (When supported by server)</entry>
|
|
<entry>No</entry>
|
|
</row>
|
|
<row>
|
|
<entry>Allows Simultaneous Reading and Writing</entry>
|
|
<entry>Yes</entry>
|
|
<entry>Yes</entry>
|
|
<entry>Yes</entry>
|
|
<entry>Yes</entry>
|
|
<entry>No</entry>
|
|
</row>
|
|
<row>
|
|
<entry>Supports <function>stat</function></entry>
|
|
<entry>No</entry>
|
|
<entry>No</entry>
|
|
<entry>No</entry>
|
|
<entry>Yes</entry>
|
|
<entry>No</entry>
|
|
</row>
|
|
<row>
|
|
<entry>Supports <function>unlink</function></entry>
|
|
<entry>No</entry>
|
|
<entry>No</entry>
|
|
<entry>No</entry>
|
|
<entry>Yes</entry>
|
|
<entry>No</entry>
|
|
</row>
|
|
<row>
|
|
<entry>Supports <function>rename</function></entry>
|
|
<entry>No</entry>
|
|
<entry>No</entry>
|
|
<entry>No</entry>
|
|
<entry>Yes</entry>
|
|
<entry>No</entry>
|
|
</row>
|
|
<row>
|
|
<entry>Supports <function>mkdir</function></entry>
|
|
<entry>No</entry>
|
|
<entry>No</entry>
|
|
<entry>No</entry>
|
|
<entry>Yes</entry>
|
|
<entry>No</entry>
|
|
</row>
|
|
<row>
|
|
<entry>Supports <function>rmdir</function></entry>
|
|
<entry>No</entry>
|
|
<entry>No</entry>
|
|
<entry>No</entry>
|
|
<entry>Yes</entry>
|
|
<entry>No</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
</para>
|
|
|
|
|
|
<!-- FIXME: This should be context.ssh2!!! -->
|
|
<para>
|
|
<table>
|
|
<title>Context options</title>
|
|
<tgroup cols="3">
|
|
<thead>
|
|
<row>
|
|
<entry>Name</entry>
|
|
<entry>Usage</entry>
|
|
<entry>Default</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry><literal>session</literal></entry>
|
|
<entry>Preconnected ssh2 resource to be reused</entry>
|
|
<entry/>
|
|
</row>
|
|
<row>
|
|
<entry><literal>sftp</literal></entry>
|
|
<entry>Preallocated sftp resource to be reused</entry>
|
|
<entry/>
|
|
</row>
|
|
<row>
|
|
<entry><literal>methods</literal></entry>
|
|
<entry>Key exchange, hostkey, cipher, compression, and MAC methods to use</entry>
|
|
<entry/>
|
|
</row>
|
|
<row>
|
|
<entry><literal>callbacks</literal></entry>
|
|
<entry></entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><literal>username</literal></entry>
|
|
<entry>Username to connect as</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><literal>password</literal></entry>
|
|
<entry>Password to use with password authentication</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><literal>pubkey_file</literal></entry>
|
|
<entry>Name of public key file to use for authentication</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><literal>privkey_file</literal></entry>
|
|
<entry>Name of private key file to use for authentication</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><literal>env</literal></entry>
|
|
<entry>Associate array of environment variables to set</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><literal>term</literal></entry>
|
|
<entry>Terminal emulation type to request when allocating a pty</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><literal>term_width</literal></entry>
|
|
<entry>Width of terminal requested when allocating a pty</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><literal>term_height</literal></entry>
|
|
<entry>Height of terminal requested when allocating a pty</entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><literal>term_units</literal></entry>
|
|
<entry>Units to use with term_width and term_height</entry>
|
|
<entry><constant>SSH2_TERM_UNIT_CHARS</constant></entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
</para>
|
|
</refsect1> <!-- }}} -->
|
|
|
|
<refsect1 role="examples"><!-- {{{ -->
|
|
&reftitle.examples;
|
|
<example>
|
|
<title>Opening a stream from an active connection</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$session = ssh2_connect('example.com', 22);
|
|
ssh2_auth_pubkey_file($session, 'username', '/home/username/.ssh/id_rsa.pub',
|
|
'/home/username/.ssh/id_rsa', 'secret');
|
|
$stream = fopen("ssh2.tunnel://$session/remote.example.com:1234", 'r');
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
|
|
</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:"~/.phpdoc/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
|
|
-->
|
|
|