Skip to content

Instantly share code, notes, and snippets.

@bluepapa32
Created May 2, 2011 00:29
Show Gist options
  • Select an option

  • Save bluepapa32/951033 to your computer and use it in GitHub Desktop.

Select an option

Save bluepapa32/951033 to your computer and use it in GitHub Desktop.
Gradle で SSH してみる
configurations { sshexec }
repositories { mavenCentral() }
dependencies { sshexec 'org.apache.ant:ant-jsch:1.8.1' }
task ssh << {
ant {
taskdef(name: 'sshexec',
classname: 'org.apache.tools.ant.taskdefs.optional.ssh.SSHExec',
classpath: configurations.sshexec.asPath)
sshexec(host: host,
port: port,
username: username,
keyfile: keyfile,
command: command)
}
}
@bluepapa32
Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment