Hi wesmat,
I just tested it and able to install ssh2 php extnetion in Rocky Linux 8.
root@rocky ~]# php -m |grep ssh
ssh2
[root@rocky ~]#
I used the below step .
dnf install libssh2-devel.x86_64
pecl search ssh2
pecl install -a ssh2-1.3.1
echo “extension=ssh2.so” > /etc/php.d/40-ssh2.ini
I am using php 7.4
[root@rocky ~]# php -v
PHP 7.4.19 (cli) (built: May 4 2021 11:06:37) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.19, Copyright (c), by Zend Technologies
[root@rocky ~]#