ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reinhardt Christiansen <>
Subject Re: How to create remote directory without using ftp?
Date Fri, 28 Nov 2008 15:41:34 GMT

Raffaele wrote:
> Hi all,
> I'm running ANT from Maven, and I would like to create some directory on a
> server.
> I have seen scp task which helped me to do remote file copy, very well.
> Now, I'm not understanding how to create a directory on my server, scp
> doesn't do this, is it right?
> I've tried also with this:
> <sshexec host="myserver"
>              username="user"
> 	     password="pwd"									
> 	    command="mkdir c:/ahyeah"/>
> But it is saying "Connecting..." and it remains blocked indefinetely.
> My server is Windows and I've installed on it OpenSSH.
> Any advices or ideas?
Here is an example from an Ant build that creates a directory on a 
remote Linux server; I don't have an example for creating a remote 
directory on a Windows machine:

<sshexec host="" username="myuserid" trust="true"
        keyfile="C:\Documents and Settings\mykeyfile" 
passphrase="mypassphrase" failonerror="false"
        command="mkdir /home/mysubdir/mysubsubdir/css"/>

I've used literals for all the parameters, just to make it 
straightforward. The Linux server is using a passphrase (stored on the 
local Windows machine) rather than a password but passwords should work, 
too. I assure you that this code works fine.

I hope this helps.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message