Hi, I just wrote a simple SSH perl script in windows, to communicate to a system and execute a command. I installed required perl modules Net::SSH::Perl and Math::GMP. Now i am getting this message when i executing the script,

Reading configuration data /.ssh/config
Reading configuration data /etc/ssh_config
Connecting to <host....>, port 22.
Remote protocol version 2.0, remote software version OpenSSH_5.2
Math::BigInt: couldn't load specified math lib(s), fallback to Math::BigInt::FastCalc at C:/Perl/site/lib/Crypt/DH.pm line 6
Net::SSH::Perl Version 1.34, protocol version 2.0.
The getpwuid function is unimplemented at C:/Perl/site/lib/Net/SSH/Perl/SSH2.pm line 39, <GEN0> line 1.

I am using activeperl 5.10.1. Here is my code:
use strict; use warnings; use Net::SSH::Perl; my $host = shift @ARGV; my $user = shift @ARGV; my $pass = shift @ARGV; my $cmd = shift @ARGV; my $ssh = Net::SSH::Perl->new($host, debug => 1); $ssh->login($user, $pass); my @sV= $ssh->cmd($cmd); .... .... .... $ssh->close();
If the getpwuid function is unimplemented, then how can we make SSH communication in perl script in windows. Or is there any other way to do this... Appreciate your help. Thanks, Thiru

In reply to Net::SSH::Perl script in windows - getpwuid is unimplemented by sthirumalai

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.