Compile and install libssh and ssh2
How to compile and install libssh (1.10.0) and ssh2 (1.3.1) in Ubuntu 18, 20, 22, and Centos 7, 8?
1. Download required packages:
root@gateway ~]# wget https://libssh2.org/download/libssh2-1.10.0.tar.gz
root@gateway ~]# wget https://pecl.php.net/get/ssh2-1.3.1.tgz
2. Compile and install libssh 1.10.0
root@gateway ~]# tar vxzf libssh2-1.10.0.tar.gz
root@gateway ~]# cd libssh2-1.10.0
root@gateway ~]# ./configure
root@gateway ~]# make
root@gateway ~]# make install
3. Compile and install ssh2 1.3.1
root@gateway ~]# tar vxzf ssh2-1.3.1.tgz
root@gateway ~]# cd ssh2-1.3.1
root@gateway ~]# phpize
root@gateway ~]# ./configure --with-ssh2
root@gateway ~]# make
root@gateway ~]# make install