Help with Net::SSH::Perl

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!


Have any of you run into any issues like the one I am
having running the Net::SSH::Perl module? I installed
it without any issues following recommendations for
pre-requisites. I turned on debugging, and it is
stopping ssh connection at this point:

Connection closed by remote host. at
line 43

The script I have is this:

#!/usr/local/bin/perl -w

@F5 = ( 'devicename' );
@ident = ( '/.root/.ssh2/root_system' );
%args = ( port => 22, protocol => 2, identity_files =>
\@ident, debug => 1);
%sftp_args = ( ssh_args => [%args] );

use Net::SSH::Perl;
use Net::SFTP;

foreach $bigip ( @F5 ) {

   my $conn = Net::SSH::Perl -> new(
"$", %args );
   $conn -> login('root');
   ( $stdout, $stderr, $exit ) = $conn -> cmd('bigpipe
config save /root/backup/
`hostname`-`date +%m%d%y%H%M`');
   print "$stdout: $stdout!\n$stderr:
$stderr!\n$exit: $exit!\n";
   if ( ($stderr =~ m/config save request.../) && (!
$exit ) ) {
      ( $stdout, $stderr, $exit ) = $conn -> cmd('ls
      chomp $stdout;
      $conn -> cmd('exit');
      my $sftp = Net::SFTP -> new("$",
user => 'root', %sftp_ar
      $sftp -> get("/root/backup/$stdout",
      $sftp -> do_remove("/root/backup/$stdout");


I copied the public key from my system to device, I
can ssh from command line to device fine using the
keys, but I am having problem automating the process
via the script above. The script works fine on another
system I inherited (do not know what else could have
been modified, etc).

help is greatly appreciated.


Running Solaris 9 on sparc server

Site Timeline