Search your unanswered perl queries
Google

Friday, December 14, 2007

Executing Commands on Remote Machine

Hello Everyone, This time it is not a solution on something. Instead it a a problem which I require a solution to and is related to a critical task at my work. And would require your valuable comments on this.

I want to execute commands on a remote machine via Apache. I will be using the Net::SSH::Perl module to do it. But when I try doing it from shell running the script as root it get executed and the expected results are shown. However when I execute it through CGI with apache as user it doesn't get executed.

After digging it a lot I think it might be the permission issue where apache does not have permissions to execute the script on remote machine. Executing apache script as root will not be secure. SO do you guyz have any comment on this.

No comments: