jenkinsci / jenkinsci/ec2-plugin

[JENKINS-62221] EC2 plugin perpetually loops unable to verify key for host

Open
#1,763 3 comments 0 reactions 0 assignees View on GitHub
component:ec2-plugin imported-jira-issue priority:major resolution:unresolved
Dominant language
Java
Stars
292
Forks
709
Avg merge
3d 16h
Merged PRs (30d)
4

Description

I've just upgraded our EC2 plugin to the latest (1.50.2) and have found our nodes are not spinning up.

They perpetually loop with the following logs:

May 08, 2020 4:12:23 PM hudson.plugins.ec2.EC2Cloud INFO: The line with the key doesn't have the required format. Found: "ssh-ed25519 AAAAC3Nzarestofkeygoeshere ". Expected a line with this text: "ALGORITHM THEHOSTKEY", example: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJbvbEIoY3tqKwkeRW/L1FnbCLLp8a1TwSOyZHKJqFFR "

 

Based on this:

https://github.com/jenkinsci/ec2-plugin/blob/master/src/main/java/hudson/plugins/ec2/ssh/verifiers/SshHostKeyVerificationStrategy.java#L139-L146, which says:

String[] parts = line.split(" ");

if (parts.length > 2) {

 

The example will never work:

{{ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJbvbEIoY3tqKwkeRW/L1FnbCLLp8a1TwSOyZHKJqFFR }}

will never split into > 2 pieces as the code says. E.g.: https://repl.it/repls/FoolishCrookedWebsite

Either I'm misunderstanding how this is meant to work, or the error message is unclear.

I've not done anything to change our configuration other than upgrading the plugin.

---
Originally reported by edhgoose, imported from: EC2 plugin perpetually loops unable to verify key for host


  • assignee: mramonleon
  • status: In Review
  • priority: Major
  • component(s): ec2-plugin
  • label(s): ec2-plugin
  • resolution: Unresolved
  • votes: 8
  • watchers: 12
  • imported: 2025-12-06

Raw content of original issue

I've just upgraded our EC2 plugin to the latest (1.50.2) and have found our nodes are not spinning up.

They perpetually loop with the following logs:

May 08, 2020 4:12:23 PM hudson.plugins.ec2.EC2Cloud INFO: The line with the key doesn't have the required format. Found: "ssh-ed25519 AAAAC3Nzarestofkeygoeshere ". Expected a line with this text: "ALGORITHM THEHOSTKEY", example: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJbvbEIoY3tqKwkeRW/L1FnbCLLp8a1TwSOyZHKJqFFR "
 

Based on this:

https://github.com/jenkinsci/ec2-plugin/blob/master/src/main/java/hudson/plugins/ec2/ssh/verifiers/SshHostKeyVerificationStrategy.java#L139-L146, which says:

String[] parts = line.split(" ");
if (parts.length > 2) {
 

The example will never work:

{{ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJbvbEIoY3tqKwkeRW/L1FnbCLLp8a1TwSOyZHKJqFFR }}

will never split into > 2 pieces as the code says. E.g.: https://repl.it/repls/FoolishCrookedWebsite

Either I'm misunderstanding how this is meant to work, or the error message is unclear.

I've not done anything to change our configuration other than upgrading the plugin.

Contributor guide

Open the contributing guide

Research direction

Start in src/main/java/hudson/plugins/ec2/ssh/verifiers/SshHostKeyVerificationStrategy.java at the parsing logic around lines 139-146, then compare it with the logged key format and example message. Reproduce the verification failure and determine whether the parser or its error guidance is inconsistent. Done means the documented key format and verification behavior agree so EC2 nodes no longer loop on this input.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, java
Domain
cloud, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.