For starters, any idea how apache/httpd runs or executes other scripts?
You'll need to look at the http.conf to see what the username and group name are for the web server. ps -ef or ps -aux should also shed some light on the subject.
Once you have this information, then you can su to this user and try ssh <somehost> pwd to see what it says, as this is closer to how the perl script would run it under cgi. It would actually run as this user without a tty, but that is harder to simulate.
If you've generated keys as your userid, you may need to use ssh user@host to ssh to a different account. man ssh would have information on how to do this. Most likely, you'll also need to copy the private keys to the web server account.
Last, mode 777 is evil!. The directories/scripts should be mode 755, as write permission is not needed to run the scripts. Leaving them mode 777 allows anybody with access to that box to change your scripts and files (either maliciously or accidentally).
And, of course, read all the documentation you can find on apache and ssh. Hope this helps you on your way.
In reply to Re: Re: Re: Problem with Apache and SSH: Help needed!
by jeffenstein
in thread Problem with Apache and SSH: Help needed!
by The Crumpet
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |