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

Hi All,

Background: I'm writing a (yet another) distributed run module that will allow people to run distributed processes to many machines / stress test connections etc. I can either use Net::Telnet & Net::FTP to move stuff around, *or* I can use Net::SSH & Net::SCP to move files around. The security people in the organization would perfer me to use Net::SSH. I was going to par up all of the required modules in to a par...

Question: Net::SSH has large dependencies, since it requires the Crypt:: modules and Math:: modules and some Digest:: modules, which is fine, but I've noticed that some of the modules have at least one .c file... Danger Danger, Will Robinson! If I'm going to distribute a par that contains Net::SSH, it sounds like it wouldn't be cross platform compatible! Is this true or does magic happen here?

If I can't get this to work, I'll have a configuration boolean for instead of telnet use command line ssh -c and scp commands directly...

I will admit that at this point I haven't been able to get Net::SSH up and running yet, (so I haven't been able to create a par yet), because my .cpan file is confused and I haven't spent the time to figure it out so I've been downloading modules manually and doing the make install... I appologize for this, but I figured asking the question here might be simpler, and result in a good discussion...


Thanks and have a great day!

----
Zak

Replies are listed 'Best First'.
Re: par & Net::SSH
by castaway (Parson) on Aug 27, 2003 at 13:51 UTC
    NB: You're talking about Net::SSH, which actually depends on nothing at all apart from that ssh is installed, it's a wrapper. Net::SCP likes to have String::ShellQuote installed as well, nothing that serious.

    You probably meant Net::SSH::Perl, which has a lot of dependencies, as it's pure perl, unlike the other two.

    So, supposing you have ssh installed everywhere, you can use Net::SSH and forget about the dependencies.. (works fine for me anyhow..)

    C.

      Thanks for the clarification between the two modules! Net::SSH & Net::SCP were probbably what I was looking for instead of the Net::SSH::Perl... (Makes the code for Net::SSH & Net::Telnet much similar...) Cool! Thanks dude! When I publish the module && I get blessed from the legal department <cat-grin>, I'll be sure to give ya'll credit.

      ----
      Zak
Re: par & Net::SSH
by RMGir (Prior) on Aug 27, 2003 at 12:31 UTC
    Judging from the PAR docs, I don't think it would handle the cross-platform issue.

    Nothing's keeping you from making 1 PAR file per platform, though, and writing a simple switcher script to invoke the right one... Sorta the way PVM works.

    I think that might be your best bet, if you can't get Net::SSH installed site-wide, which seems unlikely.
    --
    Mike