(PECL ssh2 >= 0.9.0)
ssh2_shell — Solicita um shell interativo
$session,$termtype = "vanilla",$env = null,$width = 80,$height = 25,$width_height_type = SSH2_TERM_UNIT_CHARSAbre um shell na extremidade remota e aloca um fluxo para ele.
sessiontermtypetermtype deve corresponder a uma das
entradas no arquivo /etc/termcap do sistema de destino.
envenv pode ser passado como um array associativo de
pares nome/valor para definir no ambiente de destino.
widthheightwidth_height_typewidth_height_type deve ser uma das constantes
SSH2_TERM_UNIT_CHARS ou
SSH2_TERM_UNIT_PIXELS.
Exemplo #1 Solicitando um shell interativo
<?php
$connection = ssh2_connect('shell.example.com', 22);
ssh2_auth_password($connection, 'usuario', 'senha');
$stream = ssh2_shell($connection, 'vt102', null, 80, 24, SSH2_TERM_UNIT_CHARS);
?>