Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HP disconnect issue #14

Open
aesthetic-moreno opened this issue Aug 27, 2020 · 0 comments
Open

HP disconnect issue #14

aesthetic-moreno opened this issue Aug 27, 2020 · 0 comments

Comments

@aesthetic-moreno
Copy link

aesthetic-moreno commented Aug 27, 2020

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant