1、 使用SSHpipeline Steps访问远程机器:
1.1、在jenkins上安装SSHpipeline Step Plugins

1.2、创建pipelinejob

1.3、编写pipeline脚本:
pipeline{
agent any
stages {
stage ('Pipeline configuration') {
agent none
steps {
script {
stage ('Pull & PushImage') {
def remote = [:]
remote.name = 'test'
remote.host ='192.168.248.190'
remote.user = 'root'
remote.password ='password'
remote.allowAnyHosts= true
writeFile file:'jemeter.sh', text: 'cd /ibm \n ls'
sshScript remote: remote,script: "jemeter.sh"
}
}
}
}
}
}