(PECL ssh2 >= 0.9.0)
ssh2_shell — Demande un shell interactif
$session,$term_type = "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.
sessionUn identifiant de connexion SSH, obtenu depuis la fonction ssh2_connect().
term_type
       term_type doit correspondre à une
       des entrées du fichier /etc/termcap du système cible.
      
env
       env doit être passé en tant qu'un tableau associatif
       de paire nom/valeur à définir dans l'environnement cible.
      
widthLargeur du terminal virtuel.
heightHauteur du terminal virtuel.
width_height_type
       width_height_type doit être soit
       SSH2_TERM_UNIT_CHARS, soit
       SSH2_TERM_UNIT_PIXELS.
      
   Retourne un flux de ressource en cas de succès,  ou false si une erreur survient.
  
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);
?>