Monthly Archives: December 2011

def ant = new AntBuilder()

def command = "./myScript.sh"

ant.sshexec(host: "myHost", username: "myUsername", password: "myPassword", command: command, trust: "true")

For the above you will need the following library:

org.apache.ant
ant-jsch
1.8.2

Code Snippet: Execute shell scripts across ssh using Ant (Groovy)

Tagged , , , ,