in reply to Re^4: Net::SSH::Perl script in windows - getpwuid is unimplemented
in thread Net::SSH::Perl script in windows - getpwuid is unimplemented

Cygwin implements getpwuid. If you are using ActiveState, which doesn't implement getpwuid, then you'll probably have to go into the source at C:/Perl/site/lib/Net/SSH/Perl/SSH2.pm with your editor and change sub _proto_init to this
sub _proto_init { my $ssh = shift; my $home = $ENV{HOME} || $ENV{USERNAME}; unless ($ssh->{config}->get('user_known_hosts')) { defined $home or croak "Cannot determine home directory, pleas +e set the environment variable HOME"; $ssh->{config}->set('user_known_hosts', "$home/.ssh/known_host +s2"); }
my $home should read:
my $home = $ENV{HOME} || $ENV{USERNAME};

Replies are listed 'Best First'.
Re^6: Net::SSH::Perl script in windows - getpwuid is unimplemented
by Anonymous Monk on Feb 26, 2010 at 07:24 UTC
      Hi thanks for the help. now i am able to run the script. This time, it is stopping at the login method... leaving me at
      ... ... Computing shared secret key. Verifying server signature. Waiting for NEWKEYS message. Send NEWKEYS. Enabling encryption/MAC/compression. Sending request for user-authentication service. Service accepted: ssh-userauth. Trying empty user-authentication request. Trying password authentication. Authentication methods that can continue: publickey,gssapi-with-mic,pa +ssword. Next method to try is publickey. Next method to try is password. Permission denied at win32.pl line 11
      I am able to connect to target system through putty ssh interface. but with script im stopped at this login... Any comments why this is happening... Appreciate your help. Thanks, Thiru