So, first install the necessary packages:
yum install gcc php-devel php-pear openssl openssl-devel httpd-devel make
Now install extensions libssh2, the latest version of which can be found at libssh2.org. At the moment it libssh2-1.4.3.
wget http://libssh2.org/download/libssh2-1.4.3.tar.gz tar vxzf libssh2-1.4.3.tar.gz cd libssh2-1.4.3 ./configure make make install
Next, put the package php-ssh2, which take away from the page http://pecl.php.net/package/ssh2. The latest version is now ssh2-0.12.
wget http://pecl.php.net/get/ssh2-0.12.tgz tar vxzf ssh2-0.12.tgz cd ssh2-0.12 phpize ./configure --with-ssh2 make make install
Check that the folder /usr/lib64/php/modules we have a file ssh2.so.
If all is well, then create a file folder /etc/php.d ssh2.ini and enter into it:
extension=ssh2.so
Now restart the web server command:
service httpd restart
Finally check whether normally have to install the module:
php -m | grep ssh2
It works :)