ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Perevalov" <>
Subject RE: Using Ant with SSH
Date Thu, 26 Jul 2001 15:36:00 GMT
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}${dest.dir} &lt; ${pwd.file}"/>
      <!-- delete password file when we've done -->
	<delete file="${source.dir}/${pwd.file}"/>

Good luck,

Paul Perevalov,

-----Original Message-----
From: Filip Cruz []
Sent: Thursday, July 26, 2001 11:18 AM
Subject: Re: Using Ant with SSH

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?

View raw message