PHP Ubuntu

Adding SSH support to PHP on Ubuntu

I have previously written a post on how to add SSH support to PHP, but that post is old, and it has now become even easier to get it up and running. And therefore making it much easier to auto upgrade WordPress via SSH. (automatic, yay!)

As root, do the following:

1: apt-get install libssh2-1-dev libssh2-php

2: Check that is installed: php -m |grep ssh2

3: Restart apache: service apache2 restart

And you should now have SSH support in PHP.

2 replies on “Adding SSH support to PHP on Ubuntu”

I like better. Doesn’t require your private key live on the file system, works on more systems (shared hosts, for example, aren’t gonna let you do apt-get install), etc.

Comments are closed.