http://www.perlmonks.org?node_id=808912

rdl has asked for the wisdom of the Perl Monks concerning the following question:

Hello,

I am attempting to use Net::OpenSSH to connect to an Extreme Ethernet switch.

As a test, I am using the following code:

#!/usr/local/bin/perl use strict; use warnings; use Net::OpenSSH; my $ssh = Net::OpenSSH->new( "auto_config\@management", passwd => "myp +asswd", ssh_cmd => '/usr/local/bin/ssh' ); $ssh->error and die "Unable to open ssh connection: " . $ssh->error; print "Sending a command\n"; my $test = $ssh->capture( "show vlan" ); $ssh->error and warn "Operation did not work: " . $ssh->error; print "Output is: \n"; print $test;

When this is run, I get the following output:

Keyboard-interactive authentication Sending a command channel_by_id: 0: bad id: channel free channel_input_status_confirm: 0: unknown Operation did not work: child exited with code 255 at ./ex_ssh.pl line + 12. Output is:

I am able to use OpenSSH from the command line to get to the same box using the same username/passwd from the same server/user. The same script used to run a command on a Sun box works fine.

Thanks, and sorry in advance if I did not post this correctly. I am new here