【发布时间】:2018-07-03 17:40:35
【问题描述】:
我需要从 php/nginx (www-data) 运行这个命令
shell_exec("ssh -o StrictHostKeyChecking=no root@$host 'ps axo pid,cmd'")
但是得到这个错误
Failed to add the host to the list of known hosts (/root/.ssh/known_hosts).
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,password).
【问题讨论】:
-
创建此目录并使其归
www-data所有。