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>