ssh2_shell
(PECL ssh2 >= 0.9.0)
Request an interactive shell
Description
Open a shell at the remote end and allocate a stream for it.
Parameters
sessionAn SSH connection link identifier, obtained from a call to
ssh2_connect().termtypetermtypeshould correspond to one of the entries in the target system's/etc/termcapfile.envenvmay be passed as an associative array of name/value pairs to set in the target environment.widthWidth of the virtual terminal.
heightHeight of the virtual terminal.
width_height_typewidth_height_typeshould be one ofSSH2_TERM_UNIT_CHARSorSSH2_TERM_UNIT_PIXELS.
Return Values
Returns a stream Resource on success, Falseforfailure.
Examples
Requesting an interactive shell
<?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);
?>