Good morning. I have a test CGI script to create and debug SFTP connections. It runs on a Windows host. Briefly, it looks like:

#!/usr/bin/perl -w

use strict;

use CGI;
use Net::SFTP;

my $host = '<remote host>';
my $login = '<username>';
my $password = '<password>';
my $port = <remote port>;

. . .

my $sftp = Net::SFTP->new($host,
   user => $login,
   password => $password,
   debug => 1,
   ssh_args => port => $port
);

When I attempt to run the script for one particular remote host it appears as if the script successfully connects but then:
   snapple: sftp: Sending SSH2_FXP_INIT
   Use of uninitialized value in numeric gt (>) at D:/Perl/site/lib/Net/SSH/Perl/Channel.pm line 82.
   Use of uninitialized value in pack at D:/Perl/site/lib/Net/SSH/Perl/Buffer.pm line 105.
   Connection closed at D:\Web\NPG\admin\cgi-bin\NetSFTPTest.pl line 24

Is anyone familiar with this? Any ideas on where to look or what to change?

Thanks in advance.

dcoleman


In reply to Net::SFTP issue -- uninitialized value in Net/SSH/Perl by dcoleman

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.