Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-10-2007, 12:42 PM   #1
LQ Newbie
Registered: Jun 2007
Posts: 6

Rep: Reputation: 0
Arrow Invoking a shell script remotely.


From my ANT build script on Windows machine, I'm trying to invoke a shell script on VMWare installed on the same build machine. The part ANT script and the shell script are pasted below;

ANT Script: (build.xml)

<target name="build">
<echo>cmd /C ${cygwin}</echo>
<echo message="Starting the SSHEXEC operation for using connect script"/>
<sshexec host="vm"
<echo message="Ending the SSHEXEC operation for using connect script"/>

Shell Script: (
echo hello>text.txt
ssh-add /home/username/.ssh/dev_rsa| echo passphrase
cd /home/username/build/application
echo up..
svn update
echo up..
cd ~

The Problem

I'm able to connect the VMWare box and execute other commands like, ifconfig on it. But this shell script requires passphrase for svn. I tried to pipe it in too but no success. Can someone help how can I modify the call from build script or modify the shell script so that when I try to connect svn I should be able to provide the passphrase or the shell script will by itself take care of the passphrase.

Let me know if you need further explnation on the issue.

Any help is highly appreciated.


Last edited by niks27; 10-10-2007 at 12:43 PM.
Old 10-11-2007, 07:22 AM   #2
Registered: Feb 2007
Distribution: RHEL 4, SOLARIS 10
Posts: 91

Rep: Reputation: 15
Its hard to do because you're not really supposed to do it that way

Or at least thats what I read when I was trying to do something similar.

Could you set up public/private keys and do passwordless authentication?

That is much easier to script, though it is "riskier" since it links the two machines quite closely. But a) its a VM so if the server is compromised they have "physical access" to the VM anyway and b) you are saving ssh-keys unencrypted the way you are doing it now anyway, so this is probably more secure.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
bash script--variables have unexpected values on invoking mplayer stairwayoflight Programming 5 07-08-2007 11:17 AM
Choosing which shell starts when logging in remotely Alotau Linux - General 3 10-20-2006 03:58 PM
shell script problem, want to use shell script auto update IP~! singying304 Programming 4 11-29-2005 05:32 PM
Running a shell script remotely via 'ssh <hostname> <command>' davee Linux - General 4 10-09-2005 01:38 AM
How to start a Tcl/Tk script by simply invoking the script file itself ? cyu021 Programming 2 10-10-2004 11:00 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:09 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration