huzefa52 has asked for the wisdom of the Perl Monks concerning the following question:
Below are the logs from apache error logs#!/usr/bin/perl use warnings; use strict; use CGI; use Net::OpenSSH; use warnings; our $cgi = new CGI; use Net::OpenSSH; my %opts = ( user => "UNAME", #password => "MYPASSWORD", strict_mode => 0, ); my $ssh = Net::OpenSSH->new("MY SERVER_IP",%opts,master_opts => [-i => + "MY KEY FILE"], async => 1); $ssh->system("/root/test.sh") or die "remote command failed: " . $ssh->error;
[Fri Jun 27 12:11:57 2014] [error] [client localhost] Permission denie +d (publickey,gssapi-keyex,gssapi-with-mic).\r, referer: http://localh +ost/cgi-bin1/test.cgi
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Not able to run remote scipt from perl CGI script
by hippo (Archbishop) on Jun 27, 2014 at 08:39 UTC |