Introduction
The ssh2 PECL module install fails and is due to the current version being BETA. In order to work around this, a specific version needs to be installed for now.
The official PECL module website contains release information. Please see the following regarding ssh2: SSH2 PECL Module
Procedure
First, there are a couple of RPMs that should be installed. The following can be used to ensure they are installed.
yum -y install libssh2 libssh2-devel
Then the following can be executed to install the ssh2 PECL module for PHP 7.2
/opt/cpanel/ea-php72/root/usr/bin/pecl install ssh2-1.2
Then the following can be executed to install the ssh2 PECL module for PHP 7.4
/opt/cpanel/ea-php74/root/usr/bin/pecl install ssh2-1.2
and Apache restarted with
/scripts/restartsrv_httpd --hard
When trying to install the PECL module you may see an error similar to:
Warning: popen() has been disabled for security reasons in PEAR/Builder.php
and indicates that a PHP function is disabled. In order to temporarily work around this for pecl to install the PHP module, you can modify
for PHP 7.2
/opt/cpanel/ea-php72/root/usr/bin/pecl
for PHP 7.4
/opt/cpanel/ea-php74/root/usr/bin/pecl
and add the following line after the -d option settings
-d disable_functions=NULL \
Please note that this will not be an issue when the module developer pushes this to a stable version. Then the version will no longer be needed to install or update the ssh2 PECL module.