Instructions for installation of PHP extension ssh2.

cd /usr/local/src
wget http://www.libssh2.org/snapshots/libssh2-1.6.1-20160109.tar.gz
tar -zxvf libssh2-1.6.1-20160109.tar.gz
cd libssh2-1.6.1-20160109
./configure --with-php-config=/usr/local/bin/php-config
make
make install
cd /usr/local/src
wget http://pecl.php.net/get/ssh2-0.12.tgz
tar -zxvf ssh2-0.12.tgz
cd ssh2-0.12
phpize
./configure --with-ssh2
make
make install

Activate it in your PHP config file: /usr/local/php/php.ini

extension=ssh2.so

Check if ssh2 extension is loaded

php -m|grep ssh2