29th October 2011 - 9 minutes read time
Phing allows the running of SSH commands on servers and the copying of files to servers via SCP. Before you can use SSH and SCP commands in Phing you need to install the PECL extension SSH2. The SSH2 PECL extension requires the libssh2 package, so you need to install that before you can get started. The following install instructions are based on a Linux environment.
Download the libssh2 package from www.libssh2.org and install it by using the following commands. Your package version may vary.
sudo tar -zxvf libssh2-1.3.0.tar.gz
cd libssh2-1.3.0
./configure
make
sudo make install
You'll need the sudo on the last command to allow the make installer access to certain system directories.
Next, you need to install the SSH2 PECL extension, but because it's currently in a beta state you will need to give the full path to the library version along with the normal install command.