I am writing a php code that connects to a cisco router via ssh. I am facing a problem (returning null) when getting the interfaces' info.
Here is the code that I wrote:
$ssh = new Net_SSH2($ip);
if (!$ssh->login($user, $pass)) {
exit('Login Failed');
}
$ssh->exec('enable');
$ssh->read('Password:');
$ssh->write("password\n");
echo $ssh->read();
$a=$ssh->exec('show run | include interface');
$a (the show command) is returning null.
Any idea?