in reply to Re^3: Net::SSH2::Cisco not working on Cisco XR
in thread Net::SSH2::Cisco not working on Cisco XR

Hi,
Yes, you understand correctly.

I tried as you mentioned above, eliminating each of the constructors, but with no success.
I have a Net::SSH2 script working, yes. But to save my self from rewriting all of my scripts i wanted to use Net::SSH2::Cisco
foreach $up(@hosts) { chomp($up); my $user = "user"; # your account my $ssh2 = Net::SSH2->new(); $ssh2->debug(0); $ssh2->connect($up) or die "Unable to connect host $@ \n"; $ssh2->auth_password($user,$passwd); my $chan = $ssh2->channel(); $chan->exec('sh ver bri'); my $buflen = 3000; my $buf1 = '0' x $buflen; $chan->read($buf1, $buflen); print $up, $buf1; }

Replies are listed 'Best First'.
Re^5: Net::SSH2::Cisco not working on Cisco XR
by VinsWorldcom (Prior) on Mar 04, 2016 at 12:38 UTC

    You'll notice in Net::SSH2::Cisco login(), that the shell() method is used, not exec(). This is so multiple commands can be issue in an interactive fashion.

    Try your above Net::SSH2 script with shell() instead of exec() and see if it still works. That will help narrow down / eliminate anther possibility.