Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

SSH and ActiveState

by recon_ice (Initiate)
on May 20, 2004 at 18:45 UTC ( #355046=perlquestion: print w/replies, xml ) Need Help??

recon_ice has asked for the wisdom of the Perl Monks concerning the following question:

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!

Replies are listed 'Best First'.
Re: SSH and ActiveState
by flyingmoose (Priest) on May 20, 2004 at 19:22 UTC

    Just tried this to see if I could help out. ppm install Net-SSH should work fine using the ActiveState copy. It did for me anyhow.

    From there, I was able to "perl -MCPAN -e 'install Net::SFTP' works, even without having any compilers. For the record, this asked me to install Net::SSH::Perl, so it's a pure perl implementation.

    I'd use ppm to install the first and CPAN to install the second. Your mileage may vary, but I was able to get it to work.

    The catch is that Net::SSH::Perl requires a lot of Crypt modules which aren't in the PPM database, so you would probably have to use a private PPM database or you would need VC++ to compile them.


    UPDATE:I have no idea if this is a good site or not, but I found a PPD for Net::SFTP here. Try to install it if you like, ppm install filename.ppd should work and if it works, your problem is solved.

Re: SSH and ActiveState
by Plankton (Vicar) on May 20, 2004 at 20:51 UTC
    What's in your sftp_instructions.txt file? Maybe you are asking for a "function" that is "not available".

    Plankton: 1% Evil, 99% Hot Gas.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://355046]
Approved by calin
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2023-02-03 11:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer not to run the latest version of Perl because:







    Results (24 votes). Check out past polls.

    Notices?