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.