in reply to Re: Net::OpenSSH and Extreme Switch
in thread Net::OpenSSH and Extreme Switch

Salva, thanks for the reply.

When I try your suggestion from the command line, I get no reply (or error) at all.

For the second, I modified the script as you suggested

my $test = $ssh->capture( {stdin_data => "show vlan\n"} );
and I now get the following:
Keyboard-interactive authentication Sending a command Pseudo-terminal will not be allocated because stdin is not a terminal. Operation did not work: child exited with code 255 at ./ssh1.pl line 1 +3. Output is: show vlan

I guess I don't understand why if it works from the command line using OpenSSH, it won't work from the script.

Thanks

Replies are listed 'Best First'.
Re^3: Net::OpenSSH and Extreme Switch
by salva (Canon) on Nov 23, 2009 at 22:24 UTC

      According to Extreme, they officially do not support 1 line ssh commands and do not seem interested in changing that.

      Strike one for Extreme switches

      thanks again!

        Latest update for anybody that may be interested

        Exreme TAC finally fessed up and admitted that this was a bug. It has been fixed in 12.3.3.x code. I tested it with 12.3.3.6 code and it seems to work fine.

      Salva, thanks for the clarification. I believe that I am starting to understand now. Not being big on SSH (Ok, I simply don't like it), I did not understand the two modes. I have a script that I have been using for several years using the Net::Telnet module with great success. I am trying to migrate this script to using SSH but not having a lot of luck. Was hoping that this module would be more of a "drop in" replacement (understanding that specifics would have to change).

      I was hoping to avoid expect, but will look into that option further.

      Thanks again for the support.