Tried several techniques given at Stack Overflow and Ask Ubuntu to install ssh2 extension for php but nothing seems to work. Also followed the tutorial at http://php.net/manual/en/ssh2.setup.php but doesn't seems to work.

Any guidance would be appreciated.


Just solved the issue.

The method to install SSH2 for php 7 and 7.1 running on ubuntu 14.04 is below:

  1. Installing the library

For PHP 7:

sudo apt-get install php7.0-ssh2

For PHP 7.1:

sudo apt-get install php7.1-ssh2
  1. Restart Apache2 server

sudo service apache2 restart

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.