Install PECL SSH2 Extension on Ubuntu

This took me a short while to work out, so I thought I’d post here how I achieved this to save people some time.

Check if you have the ssh2 extension installed:

php -r "print_r(get_loaded_extensions());"

If so, in the list of extensions, you will see this line:

Array
(
    ...
    [59] => ssh2
    ...
)

If you do not see this line, then you can install the PECL SSH2 extension like this:

sudo apt-get install libssh2-php

Don’t forget to bounce apache:

service apache2 restart

Ubuntu Version?

    Distributor ID:	Ubuntu
    Description:	Ubuntu 11.04
    Release:	11.04
    Codename:	natty

Permalink: http://www.websitefactors.co.uk/other/2012/05/install-pecl-ssh2-extension-on-ubuntu/

This entry was posted in PHP. Bookmark the permalink.

One Response to Install PECL SSH2 Extension on Ubuntu

  1. Pingback: PHP Datafeed Parser / Writer Library

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

Notify me of followup comments via e-mail. You can also subscribe without commenting.