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)