Jenkins executa o script de shell no 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