In windows, how does one install and configure the ssh2 extension in PHP? For example, my current project needs to use commands to remotely connect to other computers. I don't know how to install and configure the ssh2 extension. Can anyone help me?
Reply to discussion (solution)
Use php_ssh2.dll of windows
Http://windows.php.net/downloads/pecl/releases/ssh2/0.12/
Now there is a new problem. my current measure is to use PHP to call the local shell script, and then the local script stores the code to call the script in the remote machine. Then I use PHP to call this local script. the local script is running, but the script on the remote machine is not running. What is the situation? Because shell scripts are used for remote connection, I did not use ssh2 in PHP.
How did you write your script?
Sudo/usr/bin/ssh-f root@10.4.62.241/tmp/test. sh & echo "test. sh is starting"
Echo "test">/tmp/a.txt & echo "ehlo"
How did you write your script?
Sudo/usr/bin/ssh-f root@10.4.62.241/tmp/test. sh & echo "test. sh is starting"
Echo "test">/tmp/a.txt & echo "ehlo"
Is this a windows command?
Is this a windows command?
No. now I have abandoned windows and used linux directly.
Does php5.6 correspond to ssh2? If you use php5.5 directly, an error is returned.