Jenkins exécute le script shell sur l'hôte distant à l'aide de ssh
sh'''#!/bin/bash
ssh -i ~/.ssh/core.pem -o StrictHostKeyChecking=no username@targetIP << 'EOF'
#run commands here...
exit
EOF
'''
Biggus Dickus