net::sftp connection close

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

I have a strange connection problem with sftp.
It seems that connection is establish but when I try to download any
file it return me an error.

Here the code:

eval {

        $sftp = Net::SFTP->new($connessione
                ,password=>$connessione );


print "Cannot connect to sftp $connessione" if ($@);

my $rm_file1 =
my $rm_file2 =
my $rm_file3 =
my $rm_file4 =

my $local_file1 = '/store2/kpi/temp/Nicola/BI_FA2.0001.ok.gz';
my $local_file2 = '/store2/kpi/temp/Nicola/BI_FA1.0001.ok.gz';
my $local_file3 = '/store2/kpi/temp/Nicola/BI_GR.0001.ok.gz';
my $local_file4 = '/store2/kpi/temp/Nicola/BI_SW.0001.ok.gz';

                defined( $sftp->get($rm_file1, $local_file1));   #115
                defined( $sftp->get($rm_file2, $local_file2));
                defined( $sftp->get($rm_file3, $local_file3));
                defined( $sftp->get($rm_file4, $local_file4));

I get the following error message:

Connection closed at ./ line 115

Thanks at all

Site Timeline