Specifying options for Net::SFTP



We are having issues when an automated file transfer process hangs
when using net::SFTP. This causes the whole process to hang and a
whole bunch of headaches ensue. We need to be able to give up on the
connection and carry on. I have tried adding timeout options to the
SFTP connection but they don't appear to be having any effect (The
process was just now hung up for over 32 hours). Can someone confirm
I'm using the parameters correctly?

$sftp=Net::SFTP->new ($site,(user => $username,
password => $password,
debug => 1,
ssh_args => [ options => ["SetupTimeOut
300", "ServerAliveInterval 300", "ServerAliveCountMax 3"]],
)) or die "Problem connecting to SFTP server. $!\n";

If it makes any difference, here is what the debug output of a hung
connection looks like:

Reading configuration data /home/user/.ssh/config
Reading configuration data /etc/ssh_config
Connecting to sftp.server.com, port 22.
Remote version string: SSH-2.0-5.1.0.558 SSH Tectia Server
Remote protocol version 2.0, remote software version 5.1.0.558 SSH
Tectia Server
Net::SSH::Perl Version 1.30, protocol version 2.0.
No compat match: 5.1.0.558 SSH Tectia Server
Connection established.
Sent key-exchange init (KEXINIT), wait response.

And there it hangs.


Any help much appreciated.

Thanks

Rich
--
If you squeeze my lizard
I'll put my snake on you
I'm a romantic adventure
And I'm a reptile too
.



Relevant Pages

  • Office 2003 Products hanging
    ... I recently installed Internet Explorer 7.0.5730.11. ... When I disconnect my dialup connection, ... Often, Outlook hangs as soon as it opens, although if it doesn't, then ... images, it notifies me to OK downloading the images in order to forward ...
    (microsoft.public.office.misc)
  • Re: i.mx31 OS hangs when doing Network load test.
    ... clock in the tray freezes and also the telnet connection can no longer be ... The i.mx31 board hangs after 15 minutes to some hours. ... you may check if the network adapter is requesting ... that request pending, preventing threads with a priority lower than ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Freeze in ADODB.Recordset.Open
    ... be that MDAC installation is corrupted. ... Use Set statement to point to the opened connection. ... Without doing that it hangs forever. ...
    (microsoft.public.data.ado)
  • Re: hangs up on send/receive
    ... > connection to the internet hangs up immediately when OE ... > system file checker of Win98 and it found no problems with ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)