Linux : How to enable php-SSH support in Debian

By | October 10, 2012

PHP SSH support does not come out of the box yet. The shortest and effortless path to get it working is the following procedure.

DISCLAIMER : php-SSH is still beta and not enabled by default. Use only if you know what you’re doing!

1. Install the development components to build the module :

apt-get install php5-dev make

2. Install the dependencies :

apt-get install libssh2-1 libssh2-1-dev

3. Force the module to be installed (php-SSH is still on development) :

pecl install -f ssh2

4. Then, create the file to activate the PHP module :

vi /etc/php5/conf.d/ssh2.ini

And add :

extension=ssh2.so

5. Restart Apache to make this effective :

/etc/init.d/httpd restart