I have an application that runs on multiple platforms (windows, linux, solaris, aix, hpux). and uses SFTP to send files to our host server.
I needed a 64bit windows version, but the underlying libs for SFTP are not ported to 64bit windows (math::Pari, etc)..
so I rewrote the function to use SFTP:Foreign and use SSH2.
all works ok so far.. today I received a trouble report, the ftp send fails, leaving a 0 length file on the server.
I am trying to figure out how to debug this..
my $ssh2 = Net::SSH2->new();
$ssh2->debug($debugFlag eq $true ? 1:0);
or die "Connect failed!\n";
or die "password auth failed\n";
$ftp = Net::SFTP::Foreign->new(ssh2 => $ssh2,
backend => 'Net_SSH2');
$ftp = Net::SFTP::Foreign->
new(host => $ftpSecureServer,
backend => 'Net_SSH2',
user => $ftpUser,
password => $ftpPW);
both use this code to actually send
$ftp->put( $zipFileName, $ftpDir."/" . $newname );
if ( !$@ )
$rc = $true;
printl("file $zipFileName upload failed, try later\n");
the 32 SFTP version does
$ftp->put( $zipFileName, $newname );
if ( !$error )
setting SSH2 debug gets me the gory details, but nothing really useful
libssh2_channel_open_ex(ss->session, pv_channel_type, len_channel_type
ize, packet_size, ((void *)0) , 0 ) -> 0x47dc418
Net::SSH2::Channel::read(size = 4, ext = 0)
- read 4 bytes
- read 4 total
Net::SSH2::Channel::read(size = 5, ext = 0)
- read 5 bytes
- read 5 total
anyone have any suggestions?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
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:
Outside of code tags, you may need to use entities for some characters:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] |