in reply to Re^8: Dependences to install Net::SSH2 for windows
in thread Dependences to install Net::SSH2 for windows

And the exact same script runs fine on linux ? If so, then I guess the problem is either the fact that you're using perl 5.6 or the fact that you're using Windows. Afaik, I don't have any access to a secure shell server, so I'm unable to personally test things properly.

One thing you could try is to grab the Net-SSH2-0.09 test script from cpan (http://search.cpan.org/src/DBROBINS/Net-SSH2-0.09/t/Net-SSH2.t) and give it a run. The first 11 tests should pass ... beyond that I don't really know. Perhaps it might help. But I think the best thing to do would be to update your Windows to perl 5.8.8 and try out Net-SSH2 on that.

If you haven't already, check the Net::SSH::Channel documentation - there might be something in there that helps.

Cheers,
Rob

Update: And how about the example script at http://search.cpan.org/src/DBROBINS/Net-SSH2-0.09/example/read.pl ... does it work for you ?
  • Comment on Re^9: Dependences to install Net::SSH2 for windows

Replies are listed 'Best First'.
Re^10: Dependences to install Net::SSH2 for windows
by shanthiann (Acolyte) on Nov 21, 2006 at 18:22 UTC
    Hi Rob,
    i updated my perl version 5.8.8
    i instlled Net::SSH2
    ppm install http://members.optusnet.com.au/~sisyphus1/ppms/Net-SSH2.ppd
    if iam giving code
    use Net::SSH2; my $ssh2 = Net::SSH2->new(); $ssh2->connect('$hostname') or die "Unable to connect Host $@ \n"; $ssh2->auth_password('ann134','$pass') or die "Unable to login $@ \n"; my $chan2 = $ssh2->channel(); $chan2->shell(); print $chan2 "ls -lrt\n"; print "LINE : $_" while <$chan2>; $chan2->close;
    iam unable to see any out put