How do I install ssh2 for PHP?
The package 'ssh2' is actually handled via a PECL (PHP Extension Community Library) and the most simple way to install this is to do so via the command line, or terminal, of the server.
Firstly, please access the server's command line using SSH or WHM's "Terminal" function. Then, ensure that the package for libssh2-devel is installed. To confirm, you can install it using the command:
yum install libssh2-devel
Once that package is installed, you can install the PECL using the command line utility. For example, if you are installing ssh2 for PHP version 7.0, you would use this command:
/opt/cpanel/ea-php70/root/usr/bin/pecl install https://pecl.php.net/get/ssh2-1.2.tgz
To install this PECL for another PHP version, you would change the portion of the command with the "ea-php70" directory. The versions of the ssh2 PECL are mentioned here: https://pecl.php.net/package/ssh2