It sounded like that to me as well. I had the same problem, and found a bug listed for it on Net::SSH::Perl's rt bugs.
But no answer. Asked around the perl irc community, and someone suggested Math::BigInt::GMP was required, or he had the same problem. He explained to me in depth why it caused the problem, but I do not recall it. I did updated the rt bug with the suggestion as it helped me, I should have added the why as well, but I would have been attempting to paraphrase someone else who understood a topic much better than I did. I just know it worked for me. YMMV > -----Original Message----- > From: Kelvin Wu [mailto:[EMAIL PROTECTED] > Sent: Tuesday, Jun 13, 2006 1:30 AM > To: Perl > Subject: Re: Using Net::SSH::Perl to execute a set of commands > > Sorry I didn't get you, why it is related to Math::BigInt::GMP? > To me it sounds like a SSH interactive issue... > > > On 30/05/06, Oyler, Nathan <[EMAIL PROTECTED]> wrote: > > > > Have you installed Math::BigInt::GMP? > > > > Might not be it, but I was having a somewhat similar problem that it > > fixed. > > > > > > > -----Original Message----- > > > From: Kelvin Wu [mailto:[EMAIL PROTECTED] > > > Sent: Monday, May 29, 2006 19:44 PM > > > To: Perl > > > Subject: Using Net::SSH::Perl to execute a set of commands > > > > > > Hi, > > > > > > I was trying to use Net::SSH::Perl to log into a remote box and > > execute a > > > program with pre-defined commands, something like: > > > > > > > > > #!/usr/bin/perl > > > > > > use strict; > > > use Net::SSH::Perl; > > > > > > my $ssh = Net::SSH::Perl->new("ip", debug => 0); > > > $ssh->login("name", "password"); > > > my ($return) = $ssh->cmd("minicom -S mini_script_vpn.force"); > > > print $return; > > > > > > minicom is a program, and mini_script_vpn.force is a script which > > defined > > > a > > > set of commands sent to minicom > > > > > > The terminal output should be something like: (if run the program > > manually > > > from shell) > > > > > > > minicom -S mini_script_vpn.force > > > minicom: WARNING: please don't run minicom as root when not > > maintaining > > > it (with the -s switch) since all changes to the > > > configuration will be GLOBAL !. > > > > > > Welcome to minicom 1.83.1 > > > > > > OPTIONS: History Buffer, F-key Macros, Search History Buffer, I18n > > > Compiled on May 3 2001, 22:36:07. > > > > > > Press CTRL-A Z for help on special keys > > > > > > Logging in.. > > > > > > c_fw>enable > > > Password:**** > > > c_fw#Resetting VPN > > > configure terminal > > > c_fw(config)#Clear ipsec > > > clear crypto ipsec sa > > > c_fw(config)#Clear isakmp > > > clear crypto isakmp sa > > > c_fw(config)#Logging out and leaving... > > > Killed > > > > > > But when I was running this command via the Perl Script above, > > > > > > shell: RSA authentication failed: Can't load public key. > > > shell: Doing challenge response authentication. > > > shell: No challenge presented. > > > shell: Trying password authentication. > > > shell: Sending command: minicom -S mini_script_vpn.force > > > shell: Entering interactive session. > > > > > > It quits immediately after sending command. > > > > > > Any suggestion? > > > > > > Thanks > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>