This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Presumably, you're running PHP inside Apache. That means that instead of adding the remote machine to your .ssh/known_hosts file, it wants to add it to Apache's .ssh/known_hosts file.
Just to make it more interesting, the Apache account often isn't set up to be logged in, so it may not have a home directory.
I'm sure that there's ways of handling this. One of them would be to set up a certificate so that Apache is already certified and doesn't even need to use a password to communicate.
Of course, if all you're using ssh for is to interact with a remote file system, you may find it better to mount the files using NFS or Samba and avoid the need for ssh altogether.
An IDE is no substitute for an Intelligent Developer.
Joined: Dec 11, 2008
How to set up the certificate for apache and doesn't ask password to communicate?
Please give steps for set up certificate for apache.
Joined: Dec 11, 2008
Actually i got a error like this while try to connect a remote server. Can you help me?
spawn ssh firstname.lastname@example.org Could not create directory '/.ssh'. The authenticity of host 'x.x.x.x (x.x.x.x)' can't be established. RSA key fingerprint is 45:fb:f7:75:0e:37:31:06:69:dd:11:05:e7:38:0f:ae. Are you sure you want to continue connecting (yes/no)? yes Failed to add the host to the list of known hosts (/.ssh/known_hosts).
rama ilango wrote:Actually i got a error like this while try to connect a remote server. Can you help me?
Could not create directory '/.ssh'. The authenticity of host 'x.x.x.x (x.x.x.x)' can't be established.
The second is not an error, its a warning. It is telling you exactly what the problems are.
While logged in as the user you are running your code under, do the ssh command manually in the shell. Make sure it creates the needed directory, and when it asks if you want to accept the key, enter yes.