How To Install PHP SSH2 Extension for WordPress updates.

If you are running WordPress on Ubuntu 16.04 or above you will need this to allow you to update securely over SSH. If you are not yet running on php7.0 then skip installing php7.0-cli  as it will probably break your install, but SSH should still work on the older version with nothing else added.

It’s pretty simple, all you need to do is update apt repositories.

sudo apt-get update

then

sudo apt-get install php7.0-cli -y

and

sudo apt-get install libssh2-1 php-ssh2 -y

And that’s it.

For a guide on setting up your ssh keys go here for instructions on that.