Alright this is what I get from the Net::SFTP::Foreign debug:

#38418 1409077155.00000 new: This is Net::SFTP::Foreign 1.77 #38418 1409077155.00000 new: Loaded from /usr/local/lib/perl/5.14.2/Ne +t/SFTP/Foreign.pm #38418 1409077155.00000 new: Running on Perl v5.14.2 for linux #38418 1409077155.00000 new: debug set to -1 #38418 1409077155.00000 new: ~0 is 18446744073709551615 #38418 1409077155.00000 new: Using backend Net::SFTP::Foreign::Backend +::Unix 1.76_03 #38418 1409077155.00000 _queue_msg: queueing msg len: 5, code:1, id:3 +... [1] 00 00 00 05 01 00 00 00 03 + | ......... #38418 1409077155.00000 _get_msg: waiting for message... [1] #38418 1409077155.00000 _do_io: _do_io connected: 1 #38418 1409077155.00000 _do_io: _do_io select(-,-,-, undef) #38418 1409077155.00000 _do_io: _do_io write queue: 9, syswrite: 9, ma +x: 65536, $!: 00 00 00 05 01 00 00 00 03 + | ......... #38418 1409077155.00000 _do_io: _do_io select(-,-,-, undef) #38418 1409077155.00000 _do_io: _do_io read sysread: 9, total read: 9, + $!: 00 00 00 05 02 00 00 00 03 + | ......... #38418 1409077155.00000 _get_msg: got it!, len:5, code:2, id:-, status +: - 02 00 00 00 03 + | ..... #38418 1409077155.00000 _rel2abs: 'sftptest' --> 'sftptest' #38418 1409077155.00000 put: local file size is 17 #38418 1409077155.00000 _rel2abs: 'sftptest' --> 'sftptest' #38418 1409077155.00000 _queue_msg: queueing msg len: 29, code:3, id:0 + ... [1] 00 00 00 1d 03 00 00 00 00 00 00 00 08 73 66 74 70 74 65 73 74 00 00 0 +0 1a 00 00 00 04 00 00 01 | .............sftptest........... ed + | . #38418 1409077155.00000 _get_msg: waiting for message... [1] #38418 1409077155.00000 _do_io: _do_io connected: 1 #38418 1409077155.00000 _do_io: _do_io select(-,-,-, undef) #38418 1409077155.00000 _do_io: _do_io write queue: 33, syswrite: 33, +max: 65536, $!: 00 00 00 1d 03 00 00 00 00 00 00 00 08 73 66 74 70 74 65 73 74 00 00 0 +0 1a 00 00 00 04 00 00 01 | .............sftptest........... ed + | . #38418 1409077155.00000 _do_io: _do_io select(-,-,-, undef) #38418 1409077155.00000 _do_io: _do_io read sysread: 47, total read: 4 +7, $!: 00 00 00 2b 65 00 00 00 00 00 00 00 04 00 00 00 1a 46 6f 6c 64 65 72 2 +0 6e 6f 74 20 66 6f 75 6e | ...+e............Folder not foun 64 3a 20 73 66 74 70 74 65 73 74 00 00 00 00 + | d: sftptest.... #38418 1409077155.00000 _get_msg: got it!, len:43, code:101, id:0, sta +tus: 4 65 00 00 00 00 00 00 00 04 00 00 00 1a 46 6f 6c 64 65 72 20 6e 6f 74 2 +0 66 6f 75 6e 64 3a 20 73 | e............Folder not found: s 66 74 70 74 65 73 74 00 00 00 00 + | ftptest.... #38418 1409077155.00000 _set_status: _set_status code: 4, str: Folder +not found: sftptest #38418 1409077155.00000 _set_error: _set_err code: 2, str: Couldn't op +en remote file 'sftptest': Folder not found: sftptest #38418 1409077155.00000 open: open failed: Folder not found: sftptest Can't put Couldn't open remote file 'sftptest': Folder not found: sftptest at /u +sr/local/nagios/Working/sftp_fresh.pl line 27. #38418 1409077155.00000 DESTROY: Net::SFTP::Foreign=HASH(0x208fe38)->D +ESTROY called (current pid: 38418, disconnect_by_pid: ) #38418 1409077155.00000 disconnect: Net::SFTP::Foreign=HASH(0x208fe38) +->disconnect called (ssh pid: 38422) #38418 1409077155.00000 _conn_lost: _conn_lost #38418 1409077155.00000 disconnect: process 38422 reaped

In reply to Re^6: How to connect to SFTP via OpenSSH by Logic_Bomb421
in thread How to connect to SFTP via OpenSSH by Logic_Bomb421

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.