如题,我现在的项目需要使用到远程连接其他计算机操作指令。不知道如何安装和配置ssh2扩展,有高手能帮助我吗?ssh2php

解决方案 »

  1.   

    使用windows版本的 php_ssh2.dllhttp://windows.php.net/downloads/pecl/releases/ssh2/0.12/
      

  2.   

    现在又有新问题了,我现在采取的措施是用PHP调用本地shell脚本,然后本地脚本中存放了调用远程机中脚本的代码。然后我用PHP调用这个本地脚本,结果本地脚本运行了,但是远程机上的脚本并没有运行。请问这是什么情况?  因为是用shell脚本进行远程,所以我没有在PHP上使用ssh2
      

  3.   

    sudo /usr/bin/ssh -f [email protected] /tmp/test.sh & echo "test.sh is starting"echo "test" >> /tmp/a.txt & echo "ehlo"
      

  4.   

    sudo /usr/bin/ssh -f [email protected] /tmp/test.sh & echo "test.sh is starting"echo "test" >> /tmp/a.txt & echo "ehlo"
      

  5.   

    这是 windows 下的命令吗?
      

  6.   

    不是的,现在抛弃windows了,直接用linux了,shell脚本里的