ssh2_exec
    (PECL)
ssh2_exec -- 
     リモートサーバ上でコマンドを実行する
    
説明
resource 
ssh2_exec ( resource session, string command [, string pty [, array env [, int width [, int height [, int width_height_type]]]]] )
     コマンドをリモートエンドで実行し、チャネルを割り当てます。
     成功時にストリームを返し、失敗時に FALSE を返します。
    
例 1. コマンドを実行する 
<?php $connection = ssh2_connect('shell.example.com', 22); ssh2_auth_password($connection, 'username', 'password');
  $stream = ssh2_exec($connection, '/usr/local/bin/php -i'); ?>
 |  
  | 
     ssh2_connect(),
     ssh2_shell(),
     ssh2_tunnel()
     も参照ください。