Respected monks,

Its great to use Net::SSH2 module which has really made our work easier over Net::SSH::Perl module.

I was working with Net::SSH2 perl module. I wrote a small script that logs into remote systems and fetch its hostname and it went fine.

Now when I have embedded same script in a CGI page, I was giving me the following error in /var/apache/logs/error_logs file

Can't load '/opt/ActivePerl-5.8/site/lib/auto/Net/SSH2/SSH2.so' for mo +dule Net::SSH2: ld.so.1: perl-static: fatal: libcrypto.so.0.9.8: open + failed: No such file or directory at /opt/ActivePerl-5.8/lib/XSLoade +r.pm line 70. at /opt/ActivePerl-5.8/site/lib/Net/SSH2.pm line 467 Compilation failed in require at /var/apache/cgi-bin/ssh_WebAdmin/test +.cgi line 4. BEGIN failed--compilation aborted at /var/apache/cgi-bin/ssh_WebAdmin/ +test.cgi line 4.

All the files ld.so.1 , libcrypto.so.0.9.8 are present in the respective locations. But i dont uderstand what is the problem when I embedded the script in CGI.

Even if I execute and check for any errors by using

$ perl -wc test.cgi test.cgi syntax OK
And when opened in browser I get
Internal Server Error
Please let me know if am doing any thing wrong.

Thanks in advance.


Sushil Kumar

In reply to Problem with Net::SSH2 when using with CGI programing by msk_0984

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.