Jenkins SSH Connection EC2 Instance

In CICD Configuration, I'm Using Jenkins as CI Server, Deployment should happen on EC2 Amazon Linux..

I tried adding my SSH configs in Jenkins, I'm getting SSH connection failed..!

The problem here is My EC2 Instance SSH authentication requires PublicKey, Keyboard-interactive..!

I have enabled google authenticator for my EC2 Instance in addition to Key authentication..!

Can someone tell me the way to configure/bypass the keyboard-interactive authentication during deployment via Jenkins


You can use AWS CodeDeploy that has an agent on the instance and can install your artifacts from Jenkins without SSH.

Alternatively you can use AWS Systems Manager, again it’s an agent-based way to execute scripts on the EC2 instance without the need to SSH.

Or disable SSH 2FA for certain users or for connections from the Jenkins IP.

Hope that helps :)