aaP_4rukadi
The following is my ssh2 installation method, for reference only, please backup files and hard disk snapshots before operation.
Test server Centos 7 php7.4 (this needs to be changed according to your php version and system)
https://pecl.php.net/package/ssh2 Here you can find the ssh2 installation package you need
yum install libssh2 libssh2-devel
https://pecl.php.net/get/ssh2
wget http://pecl.php.net/get/ssh2-1.3.tgz
tar -zxvf ssh2-1.3.tgz
cd ssh2-1.3
/www/server/php/74/bin/phpize
./configure --with-php-config=/www/server/php/74/bin/php-config
make && make install
echo "extension=/www/server/php/74/lib/php/extensions/no-debug-non-zts-20190902/ssh2.so" >> /www/server/php/74/etc/php.ini
/etc/init.d/php-fpm-74 restart