Currently writing a script which uses php and ssh2. It connects to the server and runs the command. What i want it to do is output the command in the browser window, can this be done?
Current test code is
Current test code is
Code:
<?php
$connection = ssh2_connect('REMOVED', 22);
ssh2_auth_password($connection, 'root', 'REMOVED');
$stream = ssh2_exec($connection, ' cd / ; wget ftp://REMOVED/fedora9/RPM-GPG-KEY');
stream_set_blocking($stream, true);
$output = stream_get_contents($stream);
?>