首页 > 解决方案 > How to connect to EC2 instance via Jenkins pipeline?

问题描述

I have configured my EC2 instance via 'adding cloud' in Jenkins and the test connection was successful. I have also added the same 'Publish over SSH key' section. But when I try to SSH to the instance via my pipeline, it's showing authentication failed.

I have also tried creating a separate folder and added the key file and created pipeline in that and tried ssh-add -l to check connectivity. But that is also not connecting.

Could someone tell me how to link or call the added cloud in my Jenkins pipeline? The action I want to perform is connecting to that instance and perhaps performing a touch command to check connectivity through JENKINS PIPELINE.

标签: amazon-web-servicesjenkinsjenkins-pluginsjenkins-pipeline

解决方案


推荐阅读