I need help with getting sftp2 to work in WindowsXP from a Perl Script. I can call the commande with

 system "sftp2 -v -B \"c:\\inetpub\\sftp_instructions.txt\" user\@server.domain.com";

I can run the command from a DOS command like, and it works just fine, but when run from a Perl script, it gives me the following error:

SshFileCopy: Making local connection. SshFileXferClient: ext_name `newline@vandyke.com', data: 00000000: 0d0a .. SshFileCopy: Connection to local, ready to serve requests. Sftp2: Connection ready. FATAL: E:\m-ssh2-b33\lib\sshutil\sshsysutil\win32\sshwinstdiostream.c: +480 SshStdioStream (function name unavailable) Precondition failed: s +rc

I know this is more of an SSH question, but there HAS to be a way to get this to work.

I have tried to get Net::SFTP installed, but it fails (So does Net:SSH for that matter)

I can't get either module installed on either Unix, or Windows, using CPAN, so I just gave up and tried to run the command from a batch called from Perl.
(NOTE*** Typing curse-words on the CPAN command line does not help!!!)

Has anyone seen this SSH error before? Sounds like it might be an ENV problem..???

Please Help!

In reply to SSH and ActiveState by recon_ice

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.