note 49976 added to function.ssh2-shell

From: Date: Mon, 14 Feb 2005 13:03:30 +0000
Subject: note 49976 added to function.ssh2-shell
Groups: php.notes 
Request: Send a blank email to php-notes+get-85001@lists.php.net to get a copy of this message
Using ssh_exec, one could execute only one command at a time. However, ssh_shell, offers greater flexibility, Thanks to Sara !. Here is an example: <?php $con=ssh2_connect('192.168.0.1', 22); ssh2_auth_password('$con, "user", "password"); $shell=ssh2_shell($con, 'xterm'); fwrite( $shell, "cd /dir_one"); fwrite( $shell, "ls -la "); fwrite( $shell, "cd /dir_two"); fwrite( $shell, "ls -la "); ?> Thanks Sara for your implementation and your help ! ---- Manual Page -- http://www.php.net/manual/en/function.ssh2-shell.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+49976 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+49976&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+49976&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+49976&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+49976&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+49976&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+49976&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#85001) next »