Ubuntu / Debian: Install PHP-SSH2 ( libssh2-php ) extension

Install PHP-SSH2 ( libssh2-php ) extension

Install Build Dependancies

5 replies
  1. Reynaldo Flores
    Reynaldo Flores says:

    Nice tutorial, worked as expected.

    Only 2 things were incorrect:

    echo e “nn[php-ssh2]n;http://pecl.php.net/package/ssh2nextension=ssh2.sonn >> /etc/php5/modsavailable/ssh2.ini

    As you can see it is wrong, you should be only echoing “extension=ssh2.so”

    And my PHP install required this directory for the symbolic link “/etc/php5/fpm/conf.d/20-ssh2.ini”


    Outside of that it worked great!

  2. Peter Jaffray
    Peter Jaffray says:

    Yess!  This really helped me as I was having issues with WordPress secure (ssh2) updates after upgrading from Ubuntu 14 to 16. After installing as per your description EVERYTHING works fine.  Nice and secure 🙂

    • extremeshok
      extremeshok says:

      Because it would be a waste of time.
      Either one knows they have to use sudo for the commands on their system, or they do su and then run the commands or they are already the superuser.


Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *