I'm doing SSH deployment using SecureCRT.
SecureCRT has VCP command line utility to transfer files over SSH.
One problem - you can't input password during deployment so I'm providing it
in a password file.
Here is an example of target:
<target name="doSSH" description="Copies file to remote server over SSH.">
<!-- Secure CRT location -->
<property name="vcp.dir" value="C:\Progra~1\Secure~1.0"/>
<property name="pwd.file" value="pwd"/>
<property name="pwd" value="xxxxx"/>
<echo message="Copying ${source.file} to ${dest.dir} at XXXX..."/>
<!-- Create password file -->
<echo message="${pwd}" file="${source.dir}/${pwd.file}"/>
<exec dir="${source.dir}" executable="cmd">
<arg line="/S /C ${vcp.dir}\vcp.exe ${source.file}
[EMAIL PROTECTED]:${dest.dir} < ${pwd.file}"/>
</exec>
<!-- delete password file when we've done -->
<delete file="${source.dir}/${pwd.file}"/>
</target>
Good luck,
Paul Perevalov,
Bridium,Inc.
-----Original Message-----
From: Filip Cruz [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 26, 2001 11:18 AM
To: [EMAIL PROTECTED]
Subject: Re: Using Ant with SSH
Sorry,
I am trying to use Ant to deploy to our production servers through SSH. In
brief I want to be able to deploy the files over SSH to the server from a
task in the Ant build.xml file. I am using a Win2K client and I have SSH
Secure Shell client and SecureCRT.
Is there a way to deploy over SSH from Ant?? If so, how is it done?