(PECL ssh2 >= 0.9.0)
ssh2_shell — Demande un shell interactif
$session,$termtype = "vanilla",$env = null,$width = 80,$height = 25,$width_height_type = SSH2_TERM_UNIT_CHARSOuvre un shell sur le serveur distant et lui alloue un flux.
sessiontermtypetermtype doit correspondre à une
des entrées du fichier /etc/termcap du système cible.
envenv doit être passé en tant qu'un tableau associatif
de paire nom/valeur à définir dans l'environnement cible.
widthheightwidth_height_typewidth_height_type doit être soit
SSH2_TERM_UNIT_CHARS, soit
SSH2_TERM_UNIT_PIXELS.
Exemple #1 Exécution d'une commande
<?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);
?>