In windows, how does one install and configure the ssh2 extension in PHP?

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.