Jenkins ejecuta script shell en host remoto usando ssh

 sh'''#!/bin/bash
                ssh -i ~/.ssh/core.pem -o StrictHostKeyChecking=no username@targetIP << 'EOF'
                #run commands here...
                exit
                EOF
                '''
Biggus Dickus