For ssh, there is the ssh2 PECL extension, and then Phing has ssh and scp .
- On Mac, install libssh2 via Homebrew. On Linux, use the package manager.
sudo pecl install pecl.php.net/ssh2-0.12
Now you can do this:
<?xml version="1.0"?>
<project name="test" default="test">
<target name="test">
<ssh username="vagrant" password="vagrant" host="192.168.123.456"
command="pwd" property="pwd" display="false" />
<echo>The current working directory is ${pwd}</echo>
</target>
</project>
source
share