What is PHP's SSH2 extension
PHP ssh2 Extension (hereinafter referred to as PECL/SSH2), allows remote execution of system commands and file transfers in PHP programs, without the need to independently develop and deploy similar agnet "trojan" programs on monitored machines, greatly reducing operation and maintenance costs.
PHP SSH2 Extensions required dependencies
OpenSSL: Cryptographic algorithm set, C language implementation
LIBSSH2:SSH2 Protocol Library, C language implementation
Pecl/ssh2:libssh2 PHP extension that allows PHP programs to call functions in LIBSSH2
Dependencies:pecl/ssh2–> libssh2–> OpenSSL
installation process 1, [LIBSSH2]
Tar vxzf libssh2-1.4.2.tar.gz
CD libssh2-1.4.2
./configure
Make
Make install
2. [OpenSSL]
Tar vxzf ssh2-0.11.3
CD ssh2-0.11.3
Phpize "phpize, generating configuration files and makefile, etc."
./configure--WITH-SSH2
Make
Make install
3, modify PHP. Ini
Php-i |grep ini "view php.ini profile"
Vim php.ini
Extension=ssh2.so "Add"
4. Testing
Php-m|grep SSH2
CENTOS6 php SSH2 Extension installation