How to install ssh2 php7 extension. When I tried to install ssh2 php extension with php7 I recieve error pecl/ssh2 requires PHP (version >= 4.0.0, version <= 6.0.0), installed version is 7.0.0RC4.
Step 1 – Update repositories.
Step 2 – Install the packages with the following commands.
root@mail:/# apt-get install php-cli
root@mail:/# apt-get install apache2-utils
root@mail:/# apt-get install php7.0-mysql php7.0-curl php7.0-json php7.0-cgi php7.0
root@mail:/# apt-get install libssh2
root@mail:/# apt-get install curl libcurl3 libcurl3-dev
root@mail:/# apt-get install libssh2–1-dev libssh2–1
root@mail:/# apt-get install autoconfig uzip
Step 3 – You have to Download the source from lib ssh2 official site and install.
Step 4 – Unzip the zip file.
Step 5 – Navigate to php folder.
Step 6 – Prepare build environment for this extension using phpize. It will create all required file and folder structure and configure file for our extension with this command phpize .

Step 7 – Then check configuration with this command ./configure .

Step 8 – Make our extension using with this command sudo make .

Step 9 – Make test with this command sudo make .

Step 9 – Check php version with this command php -v.
