Click here to get back home

net::sftp connection close

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
net::sftp connection close gino 05-04-2006
Posted by gino on May 4, 2006, 6:27 am
Please log in for more thread options


Hi,
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
,user=>$connessione
,password=>$connessione );

};

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

my $rm_file1 =
'/home/oriolo_bi/ORIOLO_BI/PWA/2006/03/PWA.2006.03.BI_FA2.0001.ok.gz';
my $rm_file2 =
'/home/oriolo_bi/ORIOLO_BI/PWA/2006/03/PWA.2006.03.BI_FA1.0001.ok.gz';
my $rm_file3 =
'/home/oriolo_bi/ORIOLO_BI/PWA/2006/03/PWA.2006.03.BI_GR.0001.ok.gz';
my $rm_file4 =
'/home/oriolo_bi/ORIOLO_BI/PWA/2006/03/PWA.2006.03.BI_SW.0001.ok.gz';

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 ./scar.pl line 115

Thanks at all


Similar ThreadsPosted
NET::SFTP - how to close connection September 28, 2006, 7:22 am
How do I force a close connection in SOAP January 26, 2006, 1:00 pm
PARI stack overflow during long Net::SFTP connection July 16, 2004, 3:20 am
Help with Net::SFTP when sftp on unix works. September 21, 2004, 11:14 am
No connection using LWP October 27, 2006, 5:30 pm
Net::FTP connection status March 15, 2006, 3:34 am
Using a DBI connection in many places (in the code) August 4, 2008, 4:39 am
Passing a DBI connection between [Unix] processes January 7, 2005, 1:01 pm
How to include a connection file in perl December 2, 2006, 3:11 pm
Need to handle the NNTP connection timeout in my code February 8, 2007, 4:51 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap