bsimonds has asked for the wisdom of the Perl Monks concerning the following question:
This returns:my $ssh = Net::SSH::Perl->new($host,protocol=>2, interactive=>1); $ssh->login($user, $pass, 1); my $cmd = 'some_command ' . $cmd_opt; my($stdout, $stderr, $exit) = $ssh->cmd($cmd); print "OUT:$stdout\n ERR:$stderr\n EXIT:$exit\n";
But, when I ssh to the stratus module and run the command manually, I get:OUT: First Line ERR: EXIT:0
I really need what is returned what is on the second line. (or subsequent lines) Some history: I am using Net::SSH::Perl because using auth keys is not an option. I dont know why, but that was what I was told, so I have to have a solution that passes the username and pw. Thanks, Bbash$ cmd opt First Line Second Line bash$
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net::SSH::Perl and Stratus (VOS)
by tachyon-II (Chaplain) on Jun 12, 2008 at 16:50 UTC | |
by bsimonds (Initiate) on Jun 12, 2008 at 21:40 UTC | |
by tachyon-II (Chaplain) on Jun 13, 2008 at 10:28 UTC |