Talk:PHP Secure the shell
From LXF Wiki
Installing the ssh2 extension is an absolute nightmare as all the comments in the following link are testament to:
http://kevin.vanzonneveld.net/techblog/article/make_ssh_connections_with_php/
And then, even assuming you can install it, you're still going to have problems with ssh2_exec().
phpseclib - the pure-PHP SSH implementation - resolves all of these problems:

