ShaneMcC/phprouter

HP disconnect issue

Opened this issue · 0 comments

Hi, im trying to disconnect from 'remote console' after a conf command, but the session never ends until the time expire.

the code:

<?php
include_once("phprouter/PHPRouter.php");

$r = new HPProcurve('ip','user','pass','ssh');

try {

    
    $r->connect();
    $r->enable('pass', 'manager');
    $r->writeln('conf t');
    $r->writeln('no interface <port> power-over-ethernet');
    $r->writeln('interface <port> power-over-ethernet');
    $r->writeln('end');
    $r->getNextStreamData();

  

    $r->disconnect();


} catch (Exception $e) {
    
    echo 'Crap! ', $e->getMessage(), "\n";
    die(1);
}
?>

The Switch restart, but the session keep open.

What am I doing wrong?