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


In reply to Net::OpenSSH and Extreme Switch by rdl

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.