3
votes

I'm having trouble figuring out what a commandResource actually looks like. The only example i've seen is listed below for Apache's page (not very helpful)

<sshexec host="somehost"
    username="dude"
    keyfile="${user.home}/.ssh/id_dsa"
    commandResource="to_run"/>

So my peice looks like this

<sshexec host="${host}" 
     trust="yes"
     username="${username}"
     password="${password}"
     commandResource="Commands.txt"/>

How do I design the format of Commands.txt? What i'd like to do is the following:

Command 1: sudo user runscript.sh

Command 2: "${password}" (password needs to be entered in the script as well)

1

1 Answers

2
votes

An example can be found in the relevant bug

Commands.txt:             
touch 1.txt
mv 1.txt 2.txt
mv 2.txt 3.txt

Each line has to contain a command, that has to be executed.

What you are trying to do won't work. You can't set the password that way, this would not be a command but a console input.

Maybe you should just give the user the sudo rights to execute this script.