perladdict has asked for the wisdom of the Perl Monks concerning the following question:
as i know we can do this by using system command and as well as Net::Telnet module.
I don't want to hardcode
username and passward,bcz of that i am using Net::SSH
module,can any body help me out to find where i am doing mistake.
after trying the above code i am getting error as below#!/usr/bin/perl -w use Net::SSH::Perl; my $ssh = Net::SSH::Perl->new ("$hostname"); $ssh->login("xxxx","xxxx"); my($stdout, $stderr, $exit) = $ssh->cmd(" hostname"); print "$stdout\n";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Problem to connect remote host
by McDarren (Abbot) on Apr 09, 2007 at 14:59 UTC | |
Re: Problem to connect remote host
by shmem (Chancellor) on Apr 09, 2007 at 14:52 UTC | |
Re: Problem to connect remote host
by ikegami (Patriarch) on Apr 09, 2007 at 14:41 UTC | |
Re: Problem to connect remote host
by ptum (Priest) on Apr 09, 2007 at 14:42 UTC |