[Ssh-sftp-perl-users] Newbie - timedout error
Brought to you by:
dbrobins
From: Beginner <de...@sc...> - 2006-08-25 16:58:22
|
Hi, I am trying to use Net::SFTP but am unable to make an connection. My script appears to hang until I get the error: ...port 22: Connection timed out at /usr/lib/perl5/site_perl/5.8.6/Net/SSH/Perl.pm l208 The error appears to come from Net::SSH::Perl so I imagine there is something wrong with my config. I can make the connection using the command-line sftp. I have tried a number of additional parameters with Net::SSH::Perl but I am not able to get a connection: All of the other potential modules I could use for this task have the same problem, so I expect the problem is with my underlying SSH::Perl module. Can anyone offer any tips/hints/advice? I am a bit stuck. TIA. Dp. ========= use strict; use warnings; use web_config qw($ftp_server $ftp_user $ftp_passwd); use Net::SSH::Perl; #use Net::SFTP; #use Net::SCP; my $ssh = Net::SSH::Perl->new($ftp_server, debug=>1,protocol=>'2,1',cipher=>'IDEA'); print "$ssh->config\n"; $ssh->login($ftp_user,$ftp_passwd) or die "Can't: $@ $!\n"; #my $ftp = Net::SFTP->new($ftp_server, debug=>1, user=>$ftp_user, password=>$ftp_passwd,ssh_args=>[cipher=>'DES3']) # or die "Can't connect to $ftp_server: $@"; #$ftp->quit; #my $scp = Net::SCP->new($ftp_server,$ftp_user); #$scp->put('sftp-test.pl', 'testfile') or die "Can't scp file: $@ $! $?\n"; |