Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

jenkins execute shell script on remote host using ssh

 sh'''#!/bin/bash
                ssh -i ~/.ssh/core.pem -o StrictHostKeyChecking=no username@targetIP << 'EOF'
                #run commands here...
                exit
                EOF
                '''
 
PREVIOUS NEXT
Tagged: #jenkins #execute #shell #script #remote #host #ssh
ADD COMMENT
Topic
Name
3+6 =