Hi,
i work under linux with apache, php ...
i want to make a script that permit the execution of a command on another machine via SSH.
exec ("ssh -l root 192.168.0.1 cat myfile",$array);
if I execute the ssh command directly on a shell, that works fine... if it's php that executes this line, I found these errors on the error.log of apache:
machine1: ssh_connect: getuid 99 geteuid 0 anon 0
machine1: Connecting to mail.hrnet.fr [ip machine 2] port xx.
machine1: Allocated local port xxxx.
machine1: Connection established.
Could not create directory '//.ssh'.
machine1: Remote protocol version x.x, remote software version x.x.x
machine1: Waiting for server public key.
machine1: Received server public key (768 bits) and host key (1024 bits).
Host key not found from the list of known hosts.
You have no controlling tty. Cannot read confirmation.
Is there anyone who had already this problem?
Perhaps my method is wrong... so if someone could give me tips about how to execute SSH commands in a php script that would be cool!
Thanks!