Bindings to the » libssh2 library which provide access to resources (shell, remote exec, tunneling, file transfer) on a remote machine using a secure cryptographic transport.
Windows binaries may be found at
To install, download php_ssh2.dll to the folder specified
by your php.ini file's
Enable it by adding
to your php.ini and restarting your web server.
Linux, BSD, and other *nix variants can be compiled using the following steps:
openssl_devel, or some variation thereof.
./configure && make all install.
pear install ssh2
ssh2.sofrom the directory indicated by the build process to the location specified in your php.ini file under
extension=ssh2.soto your php.ini
There are currently no
stable versions of PECL/ssh2,
to force installation of the
beta version of PECL/ssh2
pear install ssh2-beta
Rather than using
pear install ssh2 to automatically
download and install PECL/ssh2, you may download the tarball from
From the root of the unpacked tarball, run:
phpize && ./configure --with-ssh2 && make
Once built, continue the installation from step 4 above.
Information for installing this PECL extension may be found in the manual chapter titled Installation of PECL extensions. Additional information such as new releases, downloads, source files, maintainer information, and a CHANGELOG, can be located here: » http://pecl.php.net/package/ssh2.
You will need version 0.4 or greater of the libssh2 library (possibly higher, see release notes).
The constants below are defined by this extension, and will only be available when the extension has either been compiled into PHP or dynamically loaded at runtime.
Table of Contents