Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $output = ssh2_exec($sshCon, $sshCommand);
- stream_set_blocking($output, true);
- echo stream_get_contents($output);
- <?php
- include('Net/SSH2.php');
- $ssh = new Net_SSH2('www.domain.tld');
- if (!$ssh->login('username', 'password')) {
- exit('Login Failed');
- }
- echo $ssh->exec($sshCommand);
- ?>
- $output = ssh2_exec($sshCon, $sshCommand);
- stream_set_blocking($output, true);
- while($line = fgets($output)) {
- echo $line;
- }
Add Comment
Please, Sign In to add comment