Skip to content

HP disconnect issue #14

Description

@aesthetichermit

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions