nrayapati on maven
nrayapati on master
Bump assertj-core from 3.24.1 t… (compare)
nrayapati on master
Bump plugin from 4.53 to 4.54 (… (compare)
nrayapati on maven
dependabot[bot] on maven
Bump assertj-core from 3.24.1 t… (compare)
dependabot[bot] on maven
Bump plugin from 4.53 to 4.54 … (compare)
github-actions[bot] on 2.0.65.vd26b_5b_9b_de4d
nrayapati on master
Bump jna-platform from 5.12.1 t… (compare)
nrayapati on maven
Failed command mlops-dev1#56 with status -1: /bin/bash
Command returned exit status -1: /bin/bash
@here : I am tring to execute command remotely via Jenkins Pipeline using sshCommand Step :
sshCommand(remote : remote , command : "/usr/bin/sed -i '/currentURL/c "currentURL" : "https://packages.vmware.com/htb/8d167796-34d5-4899-be0a-6daade4005a3/latest/"' /./etc/applmgmt/appliance/update.conf")
I end up getting error : 'Unknown command: `/usr/bin/sed''
out put as follows :
Executing command on 192.168.9.197[192.168.9.197]: /usr/bin/sed -i '/currentURL/c "currentURL" : "https://packages.vmware.com/htb/8d167796-34d5-4899-be0a-6daade4005a3/latest/"' /./etc/applmgmt/appliance/update.conf;/usr/bin/sed -i '/defaultURL/c "defaultURL": "https://packages.vmware.com/htb/8d167796-34d5-4899-be0a-6daade4005a3/latest/",' /./etc/applmgmt/appliance/update.conf;service-control --restart vlcm; sudo: false
Unknown command: `/usr/bin/sed'
withCredentials([sshUserPrivateKey()]) {
script {
def remote = [:]
remote.name = params.TARGET_HOST
remote.host = params.TARGET_HOST
remote.user = SSH_USERNAME
remote.identity_file = SSH_PRIVATE_KEY
remote.allowAnyHosts = true
sh "ssh -i ${remote.identity_file} ${remote_user}@${remote.host} 'ls -alh'"
sshCommand remote: remote, command: 'ls -alh'
}
}
sh "ssh..."
works fine. However, the sshCommand
exits with an error eg com.jcraft.jsch.JSchException: Auth fail
I think I figured it out, actually, I found my answer in the CHANGELOG
sshCommand with sudo:true param also requires pty:true on remote config with this upgrade. (This is only applicable for few platforms like Linux so apply this accordingly)
Hello all!
I have problem with using SSH Pipeline Step plugin.
Jenkins core version: 2.361.1
SSH Pipeline Steps plugin version: 2.0.39.v831c5e6468b_c
the way that I have created a ssh key pair: "ssh-keygen -m PEM -t rsa -b 4096" (with passphrase)
def remote= [:]
remote.name = test
remote.host = test-mycompony.com
remote.allowAnyHosts = true
node {
withCredentials([sshUserPrivateKey(credentialsId: 'mySSH', keyFileVariable: 'myIdentity', passphraseVariable: 'myPass', usernameVariable: 'userName')]) {
remote.user = userName
remote.identityFile = myIdentity
remote.passphrase = myPass
stage('Post-build: Archive artifacts') {
writeFile file: 'abc.sh', text: 'ls'
sshCommand remote: remote, command: 'for i in {1..5}; do echo -n \"Loop \$i \"; date ; sleep 1; done'
sshPut remote: remote, from: 'abc.sh', into: '.'
sshGet remote: remote, from: 'abc.sh', into: 'bac.sh', override: true
sshScript remote: remote, script: 'abc.sh'
sshRemove remote: remote, path: 'abc.sh'
}
}
}
I'm just getting Auth fail
com.jcraft.jsch.JSchException: Auth fail
Do you have any idea?