Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NET::SSH module problem 1

Status
Not open for further replies.

netman4u

Technical User
Joined
Mar 16, 2005
Messages
176
Location
US
Hello all,

I have this code that is not working:

Code:
use Net::SSH qw(sshopen2);
foreach my $cmd1 (@cmds) {
        next if ($cmd1 =~ /\s+/);
	sshopen2("$cliuser\@$ip", *READER, *WRITER, "$cmd1") || die "$!";

	while (<READER>) {
	  chomp();
	  print "$_\n";
	}

	close(READER);
	close(WRITER);

}

This code is copied and pasted right out of CPAN. I get this output:

Code:
'ssh' is not recognized as an internal or external command,
operable program or batch file.

Any help is appriciated.

Nick

If at first you don't succeed, don't try skydiving.
 
Try putty

Paul
------------------------------------
Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top