I have script that using to ssh2 to log into the firewall. I would like to run the commands from the firewall as if I was in the terminal when I add in the command in my script I get Resource id #5.
<?php
$connection = ssh2_connect('192.168.2.5', 22);
ssh2_auth_password($connection, $user, $pass);
$stream = ssh2_exec($connection, 'get hardware cpu',FALSE);
$check=stream_get_contents($stream);
echo $check;
echo $stream;
?>