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 ( ...  => 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
Distributor ID: Ubuntu Description: Ubuntu 11.04 Release: 11.04 Codename: natty