admin管理员组文章数量:1345891
I am trying to run a SSH command from a PHP script using shell_exec or system:
system("ssh [email protected] remote_command");
which used to run fine until the most recent versions of PHP and Cygwin OpenSSH. Now it just hangs indefinitely.
I discovered that if I redirect the command to a file:
system("ssh [email protected] remote_command > output.txt");
The command completes and the output is redirected to the file.
I also did a clean install and in that instant it starts returning output and stalls halfway through.
本文标签: shellExecuting SSH using PHP shellexecsystem gives no output (hangs)Stack Overflow
版权声明:本文标题:shell - Executing SSH using PHP shell_exec, system gives no output (hangs) - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1743819246a2544487.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论