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

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@177175 c90b9560-bf6c-de11-be94-00142212c4b1
82 lines
2.7 KiB
XML
82 lines
2.7 KiB
XML
<?xml version='1.0' encoding='iso-8859-1'?>
|
|
<!-- $Revision: 1.3 $ -->
|
|
<!-- Generated by xml_proto.php v2.1. Found in /scripts directory of phpdoc. -->
|
|
<refentry id="function.ssh2-shell">
|
|
<refnamediv>
|
|
<refname>ssh2_shell</refname>
|
|
<refpurpose>
|
|
Request an interactive shell
|
|
</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>stream</type><methodname>ssh2_shell</methodname>
|
|
<methodparam><type>resource</type><parameter>session</parameter></methodparam>
|
|
<methodparam choice="opt"><type>string</type><parameter>term_type</parameter></methodparam>
|
|
<methodparam choice="opt"><type>array</type><parameter>env</parameter></methodparam>
|
|
<methodparam choice="opt"><type>int</type><parameter>width</parameter></methodparam>
|
|
<methodparam choice="opt"><type>int</type><parameter>height</parameter></methodparam>
|
|
<methodparam choice="opt"><type>int</type><parameter>width_height_type</parameter></methodparam>
|
|
</methodsynopsis>
|
|
|
|
<simpara>
|
|
Open a shell at the remote end and allocate a stream for it.
|
|
<parameter>term_type</parameter> should correspond to one of the entries
|
|
in the target system's <literal>/etc/termcap</literal> file and defaults to <literal>vanilla</literal>.
|
|
<parameter>env</parameter> may be passed as an associative array of name/value pairs
|
|
to set in the target environment.
|
|
</simpara>
|
|
|
|
<simpara>
|
|
<parameter>width</parameter>, and <parameter>height</parameter>
|
|
define the width and height of the virtual terminal allocated for the shell process.
|
|
<parameter>width_height_type</parameter> should be one of
|
|
<constant>SSH2_TERM_UNIT_CHARS</constant> or
|
|
<constant>SSH2_TERM_UNIT_PIXELS</constant>.
|
|
</simpara>
|
|
|
|
<example>
|
|
<title>Executing a command</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$connection = ssh2_connect('shell.example.com', 22);
|
|
ssh2_auth_password($connection, 'username', 'password');
|
|
|
|
$stream = ssh2_shell($connection, 'vt102', null, 80, 24, SSH2_TERM_UNIT_CHARS);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
|
|
<simpara>
|
|
See Also:
|
|
<function>ssh2_exec</function>,
|
|
<function>ssh2_tunnel</function>, and
|
|
<function>ssh2_fetch_stream</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
|
|
-->
|