Jim Cheetham wrote:
G Chinnery wrote:
Now web server (apache) needs to ssh to the other 4 servers and logs in as max to read these files and creates data files on its self.
Problem is how do I make keys for apache to be able to ssh to max with the login set to ssh -l max servername and where do I put these keys as apache isn't on the other servers???
Well, you could place the ssh key files in the target user's (max?) .ssh directory, and then use ssh with the -l option as you suggested. Use 'ssh -v' to see which files are being sent/tried.
Or, set up sudo to allow the apache user to run commands as "max", and then use "ssh servername sudo -u max <commands>"
Whats sudo?
Actually, at one level, it doesn't sound like a good idea to have your web server user (apache) doing *anything* except handling the apache server itself. Why not create another "max" user on your webserver, and use that to access the other machines?
The user max is on the web server. But the script only uses the web server to access the other machines.. I didn't write the script I only found it on the net and I have no idea how to program.
-jim
