SPUG: Net::SFTP Connection

Dave O cxreg at pobox.com
Mon Mar 16 11:09:32 PDT 2009


If it turns out to be the DNS issue, you may able to solve it by turning
off GSSAPIAuthentication in sshd_config

On Mon, 16 Mar 2009, Paul Goracke wrote:

>
> On Mar 16, 2009, at 5:36 AM, Phil Kirsch wrote:
>
>> my $logn = "$user" . "\@" . $host;
>> my $sftp = Net::SFTP->new("$logn", password=>"$pass", debug=>1);
>> 
> I haven't used Net::SFTP before, but is "user at host" a valid first param? The 
> POD looks like the first param should simply be $host, and $user should be 
> passed in the trailing hash with the key 'user'.
>> At this point there is a long pause, followed 15 or 20 seconds later by:
>> 
>> Connection closed by remote host. at 
>> /usr/perl5/site_perl/5.8.4/Net/SSH/Perl/Kex/DH1.pm line 41
>> 
>> Because the word "Done" does not print, I am quite certain that the script 
>> is simply dying at this point. Does anyone have any ideas for 
>> troubleshooting this problem?
>
> I usually encounter these ssh-related "long pause, then disconnect" when the 
> auth is invalid, or in bizarre cases when the remote host can't do reverse 
> DNS against the script host.
>
> First, try removing the script and module from the equation: Can you make the 
> connection manually from the script host to remote host?
>
> Second, umm...not sure, many paths.
>
> pg
>
> _____________________________________________________________
> Seattle Perl Users Group Mailing List
>   POST TO: spug-list at pm.org
> SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list
>  MEETINGS: 3rd Tuesdays
>  WEB PAGE: http://seattleperl.org/
>
>


More information about the spug-list mailing list