Answer the question
In order to leave comments, you need to log in
Apache and ssh logon to remote machine with public key?
There is a machine, it has LAMP, there is another machine that Apache needs to be able to log in and execute a certain command, for example `ssh [email protected] uname -a | awk '{print $3}'`
Authentication by public key comes to mind, but then where to put the key so that Apache would pick it up and log in? At what on the second machine there is no Apache, and he must log in under a different user, can he specify someone else's public key? I understand that this is a donut hole, but this is for a local network where there is no one to play pranks and everything is closed to the outside.
Answer the question
In order to leave comments, you need to log in
just specify the path to the key:
ssh -t -i /path/to/key [email protected] command
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question