gregor-e,

Just to point out what you probably already know, I compared the 'good' and 'bad' outputs you provided, and 'bad' shows that you received 'channel 1: rcvd eof' from the remote server. Someone more familiar with Net::SFTP may give a hint on why the remove server is acting differently on 'cron' or 'at now'.

. . . lxdenvmap162: channel 1: open confirm rwindow 0 rmax 32768 lxdenvmap162: sftp: Sending SSH2_FXP_INIT lxdenvmap162: sftp: Remote version: 3 lxdenvmap162: sftp: Sent message T:11 I:0 lxdenvmap162: sftp: Sent message T:12 I:1 lxdenvmap162: sftp: Received reply T:104 I:1 lxdenvmap162: sftp: Received 11 SSH2_FXP_NAME responses lxdenvmap162: sftp: Sent message T:12 I:2 lxdenvmap162: sftp: Received reply T:101 I:2 . . .
. . . lxdenvmap162: channel 1: open confirm rwindow 0 rmax 32768 lxdenvmap162: sftp: Sending SSH2_FXP_INIT lxdenvmap162: sftp: Remote version: 3 lxdenvmap162: sftp: Sent message T:11 I:0 lxdenvmap162: channel 1: rcvd eof #### <<<<<< lxdenvmap162: channel 1: output open -> drain lxdenvmap162: channel 1: obuf empty . . .

I use 'rsync' with public/private keys and 'ssh' to encrypt the session. It's not a pure-Perl solution, but has worked for years. Maybe answer this post on Monday, when it may be picked up in RAT, and more monks are available. Things that you could look into:

Good Luck!

"Well done is better than well said." - Benjamin Franklin


In reply to Re: Net::SFTP disconnect by flexvault
in thread Net::SFTP disconnect by gregor-e

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.