I am trying to connnect to remote machine using gradle-ssh-plugin(detail here: https://gradle-ssh-plugin.github.io/docs/#_run_the_script). When I am executing the task, I am getting the following error:
Caused by: com.jcraft.jsch.JSchException: java.net.ConnectException: Connection refused: connect
plugins {
id 'org.hidetake.ssh' version '2.0.0'
id 'java'
}
repositories {
mavenCentral()
}
dependencies {
compile 'org.hidetake:gradle-ssh-plugin:2.0.0'
compile 'org.codehaus.groovy:groovy-backports-compat23:2.4.6'
}
remotes {
vesper01 {
host = 'cpt-op-01-load1'
user = 'CPT-OP\\admin'
password = 'password'
}
vesper02 {
host = 'cpt-op-01-load2'
user = 'CPT-OP\\admin'
password = 'password'
}
vesper03 {
host = 'cpt-op-01-load3'
user = 'CPT-OP\\admin'
password = 'password'
}
}
task install_dependencies_on_load_vms << {
logger.info "Running Vesper on remote machine..."
ssh.settings {
knownHosts = allowAnyHosts
}
ssh.run {
session(remotes.vesper01) {
execute "C:/vesper_cpt/vespersetup.exe /S runas 5"
}
}
}
Could any one point me to the right direction?