I've long wanted a Net::SSH module (one that doesn't just execute the ssh client). So, partly out of desire for such a module, and partly out of interest in SSH, I wrote such a module.

It's not complete by any means. Currently it has the following restrictions (among others that I'm probably forgetting):

What is working? Well, enough that I can do the following:
use Net::SSH; my $ssh = Net::SSH->new($host); $ssh->login($user, $pass); my($out, $err) = $ssh->cmd($cmd);
If you're interested in trying it out, grab it at http://rhumba.pair.com/ben/perl/Net-SSH-0.01.tar.gz.

The installation is relatively tricky; it's described in the README, but part of the trickiness is because it depends on a module (Crypt::CFB) which doesn't seem to be on CPAN (I bundled it with the tarball), and it requires a patch to Math::GMP (patch included).

I'm going to start working on adding support for some other ciphers and more authentication routines.

I'd really love some feedback on the module, though, so please, if you have a chance, do try it out, and if you have any comments, let me know.


In reply to New Module: Net::SSH by btrott

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.