hashicorp / packer-plugin-amazon

Packer plugin for Amazon AMI Builder
https://www.packer.io/docs/builders/amazon
Mozilla Public License 2.0
73 stars 110 forks source link

fedora - unable to authenticate #130

Closed hc-github-team-packer closed 2 years ago

hc-github-team-packer commented 3 years ago

This issue was originally opened by @tormodmacleod in https://github.com/hashicorp/packer/issues/11263 and has been migrated to this repository. The original issue description is below.


Hello,

I'm trying to build an image from the fedora base image for eu-west-2 ami-034794b0310a1d8b7 which i got from here

packer version is 1.7.4

i'm using the following commands to build

$ export PACKER_LOG=1
$ packer-io build -on-error=ask -debug -var-file=pkvars/fedora-wireguard.pkrvars.hcl -only amazon-ebs.fedora templates/fedora/

my config files are as below

$ cat templates/fedora/sources.pkr.hcl 
source "docker" "fedora" {
  image       = "fedora"
  commit      = true
  run_command = ["-d", "-i", "-t", "--entrypoint=/bin/bash", "{{.Image}}"]
}

source "amazon-ebs" "fedora" {
  ami_name      = "${var.name}-${local.template_timestamp}"
  instance_type = "t3a.nano"
  region        = "eu-west-2"
  source_ami    = "ami-034794b0310a1d8b7"
  ssh_username  = "fedora"

  launch_block_device_mappings {
    delete_on_termination = true
    device_name           = "/dev/sda1"
    volume_type           = "gp3"
    volume_size           = 12
  }

  run_tags = {
    Name = "packer-build"
  }

  run_volume_tags = {
    Name = "packer-build"
  }

  tags = {
    Name        = "${var.name}-${local.template_timestamp}"
    OS          = "fedora"
  }
}
$ cat templates/fedora/builds.pkr.hcl  
variable "name" {
  type    = string
  default = "fedora-base"
}

variable "app" {
  type    = string
  default = ""
}

locals {
  template_timestamp = formatdate("YYYY-MM-DD-hhmm", timestamp())
}

build {
  sources = [
    "source.docker.fedora",
    "source.amazon-ebs.fedora",
  ]

  provisioner "shell" {
    scripts = [
      "./scripts/fedora/provision-swap.sh",
      "./scripts/fedora/install-session-manager.sh", 
    ]
    only    = ["amazon-ebs.fedora"]
  }

  provisioner "shell" {
    scripts = [
      "./scripts/fedora/install-wireguard.sh",
    ]
  }
}

when i run the build i get errors as below

2021/09/11 16:07:29 packer-io-1-7-4 plugin: [DEBUG] Detected authentication error. Increasing handshake attempts.
2021/09/11 16:07:36 packer-io-1-7-4 plugin: Using host value: 18.170.78.20
2021/09/11 16:07:36 packer-io-1-7-4 plugin: [INFO] Attempting SSH connection to 18.170.78.20:22...
2021/09/11 16:07:36 packer-io-1-7-4 plugin: [DEBUG] reconnecting to TCP connection for SSH
2021/09/11 16:07:36 packer-io-1-7-4 plugin: [DEBUG] handshaking with SSH
2021/09/11 16:07:36 packer-io-1-7-4 plugin: [DEBUG] SSH handshake err: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
2021/09/11 16:07:36 packer-io-1-7-4 plugin: [DEBUG] Detected authentication error. Increasing handshake attempts.
==> amazon-ebs.fedora: Error waiting for SSH: Packer experienced an authentication error when trying to connect via SSH. This can happen if your username/password are wrong. You may want to double-check your credentials as part of your debugging process. original error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
==> amazon-ebs.fedora: Packer experienced an authentication error when trying to connect via SSH. This can happen if your username/password are wrong. You may want to double-check your credentials as part of your debugging process. original error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

however, when i try to authenticate using the key created by packer i can connect no problem

$ ssh -i ec2_fedora.pem fedora@18.170.78.20
The authenticity of host '18.170.78.20 (18.170.78.20)' can't be established.
ECDSA key fingerprint is SHA256:8zyqRohDeWWzIwFNfa/5piEjpQUmMjJuUMn0U9mGzzQ.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
[fedora@ip-172-31-17-213 ~]$ 

i'm unsure whether this is a packer issue or a fedora issue or something daft i'm doing with my config. i have spent a bit of time checking my config to avoid wasting someone else's time but please accept my apologies if it does turn out to be something like that. full log below

$ packer-io build -on-error=ask -debug -var-file=pkvars/fedora-wireguard.pkrvars.hcl -only amazon-ebs.fedora templates/fedora/
2021/09/11 16:05:50 [INFO] Packer version: 1.7.4 [go1.16.6 linux amd64]
2021/09/11 16:05:50 [TRACE] discovering plugins in /usr/local/bin
2021/09/11 16:05:50 [TRACE] discovering plugins in /home/tormod/.packer.d/plugins
2021/09/11 16:05:50 [TRACE] discovering plugins in .
2021/09/11 16:05:50 [INFO] PACKER_CONFIG env var not set; checking the default config file path
2021/09/11 16:05:50 [INFO] PACKER_CONFIG env var set; attempting to open config file: /home/tormod/.packerconfig
2021/09/11 16:05:50 [WARN] Config file doesn't exist: /home/tormod/.packerconfig
2021/09/11 16:05:50 [INFO] Setting cache directory: /home/tormod/git/gitlab.com/tormod.macleod@gmail.com/packer/packer_cache
2021/09/11 16:05:50 [TRACE] validateValue: not active for name, so skipping
2021/09/11 16:05:50 [TRACE] validateValue: not active for app, so skipping
2021/09/11 16:05:50 [TRACE] Starting internal plugin packer-builder-amazon-ebs
2021/09/11 16:05:50 Starting plugin: /usr/local/bin/packer-io-1-7-4 []string{"/usr/local/bin/packer-io-1-7-4", "plugin", "packer-builder-amazon-ebs"}
2021/09/11 16:05:50 Waiting for RPC address for: /usr/local/bin/packer-io-1-7-4
2021/09/11 16:05:50 packer-io-1-7-4 plugin: [INFO] Packer version: 1.7.4 [go1.16.6 linux amd64]
2021/09/11 16:05:50 packer-io-1-7-4 plugin: [INFO] PACKER_CONFIG env var not set; checking the default config file path
2021/09/11 16:05:50 packer-io-1-7-4 plugin: [INFO] PACKER_CONFIG env var set; attempting to open config file: /home/tormod/.packerconfig
2021/09/11 16:05:50 packer-io-1-7-4 plugin: [WARN] Config file doesn't exist: /home/tormod/.packerconfig
2021/09/11 16:05:50 packer-io-1-7-4 plugin: [INFO] Setting cache directory: /home/tormod/git/gitlab.com/tormod.macleod@gmail.com/packer/packer_cache
2021/09/11 16:05:50 packer-io-1-7-4 plugin: args: []string{"packer-builder-amazon-ebs"}
2021/09/11 16:05:50 packer-io-1-7-4 plugin: Plugin address: unix /tmp/packer-plugin249846551
2021/09/11 16:05:50 packer-io-1-7-4 plugin: Waiting for connection...
2021/09/11 16:05:50 Received unix RPC address for /usr/local/bin/packer-io-1-7-4: addr is /tmp/packer-plugin249846551
2021/09/11 16:05:50 packer-io-1-7-4 plugin: Serving a plugin connection...
2021/09/11 16:05:50 packer-io-1-7-4 plugin: [INFO] (aws): No AWS timeout and polling overrides have been set. Packer will default to waiter-specific delays and timeouts. If you would like to customize the length of time between retries and max number of retries you may do so by setting the environment variables AWS_POLL_DELAY_SECONDS and AWS_MAX_ATTEMPTS or the configuration options aws_polling_delay_seconds and aws_polling_max_attempts to your desired values.
2021/09/11 16:05:50 [TRACE] Starting internal plugin packer-provisioner-shell
2021/09/11 16:05:50 Starting plugin: /usr/local/bin/packer-io-1-7-4 []string{"/usr/local/bin/packer-io-1-7-4", "plugin", "packer-provisioner-shell"}
2021/09/11 16:05:50 Waiting for RPC address for: /usr/local/bin/packer-io-1-7-4
2021/09/11 16:05:50 packer-io-1-7-4 plugin: [INFO] Packer version: 1.7.4 [go1.16.6 linux amd64]
2021/09/11 16:05:50 packer-io-1-7-4 plugin: [INFO] PACKER_CONFIG env var not set; checking the default config file path
2021/09/11 16:05:50 packer-io-1-7-4 plugin: [INFO] PACKER_CONFIG env var set; attempting to open config file: /home/tormod/.packerconfig
2021/09/11 16:05:50 packer-io-1-7-4 plugin: [WARN] Config file doesn't exist: /home/tormod/.packerconfig
2021/09/11 16:05:50 packer-io-1-7-4 plugin: [INFO] Setting cache directory: /home/tormod/git/gitlab.com/tormod.macleod@gmail.com/packer/packer_cache
2021/09/11 16:05:50 packer-io-1-7-4 plugin: args: []string{"packer-provisioner-shell"}
2021/09/11 16:05:50 packer-io-1-7-4 plugin: Plugin address: unix /tmp/packer-plugin821404017
2021/09/11 16:05:50 packer-io-1-7-4 plugin: Waiting for connection...
2021/09/11 16:05:50 Received unix RPC address for /usr/local/bin/packer-io-1-7-4: addr is /tmp/packer-plugin821404017
2021/09/11 16:05:50 packer-io-1-7-4 plugin: Serving a plugin connection...
2021/09/11 16:05:50 [TRACE] Starting internal plugin packer-provisioner-shell
2021/09/11 16:05:50 Starting plugin: /usr/local/bin/packer-io-1-7-4 []string{"/usr/local/bin/packer-io-1-7-4", "plugin", "packer-provisioner-shell"}
2021/09/11 16:05:50 Waiting for RPC address for: /usr/local/bin/packer-io-1-7-4
2021/09/11 16:05:50 packer-io-1-7-4 plugin: [INFO] Packer version: 1.7.4 [go1.16.6 linux amd64]
2021/09/11 16:05:50 packer-io-1-7-4 plugin: [INFO] PACKER_CONFIG env var not set; checking the default config file path
2021/09/11 16:05:50 packer-io-1-7-4 plugin: [INFO] PACKER_CONFIG env var set; attempting to open config file: /home/tormod/.packerconfig
2021/09/11 16:05:50 packer-io-1-7-4 plugin: [WARN] Config file doesn't exist: /home/tormod/.packerconfig
2021/09/11 16:05:50 packer-io-1-7-4 plugin: [INFO] Setting cache directory: /home/tormod/git/gitlab.com/tormod.macleod@gmail.com/packer/packer_cache
2021/09/11 16:05:50 packer-io-1-7-4 plugin: args: []string{"packer-provisioner-shell"}
2021/09/11 16:05:50 packer-io-1-7-4 plugin: Plugin address: unix /tmp/packer-plugin146746847
2021/09/11 16:05:50 packer-io-1-7-4 plugin: Waiting for connection...
2021/09/11 16:05:50 Received unix RPC address for /usr/local/bin/packer-io-1-7-4: addr is /tmp/packer-plugin146746847
2021/09/11 16:05:50 packer-io-1-7-4 plugin: Serving a plugin connection...
2021/09/11 16:05:50 Build debug mode: true
2021/09/11 16:05:50 Force build: false
2021/09/11 16:05:50 On error: ask
2021/09/11 16:05:50 Debug enabled, so waiting for build to finish: amazon-ebs.fedora
Debug mode enabled. Builds will not be parallelized.
amazon-ebs.fedora: output will be in this color.

2021/09/11 16:05:50 Starting build run: amazon-ebs.fedora
2021/09/11 16:05:50 Running builder: 
2021/09/11 16:05:50 [INFO] (telemetry) Starting builder 
2021/09/11 16:05:50 packer-io-1-7-4 plugin: [INFO] AWS Auth provider used: "SharedCredentialsProvider"
2021/09/11 16:05:50 packer-io-1-7-4 plugin: Found region eu-west-2
2021/09/11 16:05:50 packer-io-1-7-4 plugin: [INFO] AWS Auth provider used: "SharedCredentialsProvider"
==> amazon-ebs.fedora: Prevalidating any provided VPC information
==> amazon-ebs.fedora: Prevalidating AMI Name: fedora-wireguard-2021-09-11-1505
==> amazon-ebs.fedora: Pausing after run of step 'StepPreValidate'. Press enter to continue. 
2021/09/11 16:05:52 packer-io-1-7-4 plugin: Using AMI Filters {
2021/09/11 16:05:52 packer-io-1-7-4 plugin:   ImageIds: ["ami-034794b0310a1d8b7"]
2021/09/11 16:05:52 packer-io-1-7-4 plugin: }
    amazon-ebs.fedora: Found Image ID: ami-034794b0310a1d8b7
==> amazon-ebs.fedora: Pausing after run of step 'StepSourceAMIInfo'. Press enter to continue. 
==> amazon-ebs.fedora: Pausing after run of step 'StepNetworkInfo'. Press enter to continue. 
==> amazon-ebs.fedora: Creating temporary keypair: packer_613cc5ce-beb1-3a59-5f7f-c28129c07f35
    amazon-ebs.fedora: Saving key for debug purposes: ec2_fedora.pem
==> amazon-ebs.fedora: Pausing after run of step 'StepKeyPair'. Press enter to continue. 
==> amazon-ebs.fedora: Creating temporary security group for this instance: packer_613cc5d4-e2c3-18b1-8f76-17d64ca5a4da
2021/09/11 16:05:56 packer-io-1-7-4 plugin: [DEBUG] Waiting for temporary security group: sg-034a9f24372102332
2021/09/11 16:05:56 packer-io-1-7-4 plugin: [DEBUG] Found security group sg-034a9f24372102332
==> amazon-ebs.fedora: Authorizing access to port 22 from [0.0.0.0/0] in the temporary security groups...
==> amazon-ebs.fedora: Pausing after run of step 'StepSecurityGroup'. Press enter to continue. 
==> amazon-ebs.fedora: Pausing after run of step 'StepIamInstanceProfile'. Press enter to continue. 
==> amazon-ebs.fedora: Pausing after run of step 'StepCleanupVolumes'. Press enter to continue. 
==> amazon-ebs.fedora: Launching a source AWS instance...
==> amazon-ebs.fedora: Adding tags to source instance
    amazon-ebs.fedora: Adding tag: "Name": "packer-build"
    amazon-ebs.fedora: Adding tag: "Name": "packer-build"
    amazon-ebs.fedora: Instance ID: i-0c06e949df68476ba
==> amazon-ebs.fedora: Waiting for instance (i-0c06e949df68476ba) to become ready...
    amazon-ebs.fedora: Public DNS: ec2-18-170-78-20.eu-west-2.compute.amazonaws.com
    amazon-ebs.fedora: Public IP: 18.170.78.20
    amazon-ebs.fedora: Private IP: 172.31.17.213
==> amazon-ebs.fedora: Pausing after run of step 'StepRunSourceInstance'. Press enter to continue. 
2021/09/11 16:06:23 packer-io-1-7-4 plugin: [INFO] Not using winrm communicator, skipping get password...
==> amazon-ebs.fedora: Pausing after run of step 'StepGetPassword'. Press enter to continue. 
==> amazon-ebs.fedora: Pausing after run of step 'StepCreateSSMTunnel'. Press enter to continue. 
2021/09/11 16:06:26 packer-io-1-7-4 plugin: [INFO] Waiting for SSH, up to timeout: 5m0s
==> amazon-ebs.fedora: Using SSH communicator to connect: 18.170.78.20
2021/09/11 16:06:26 packer-io-1-7-4 plugin: Using host value: 18.170.78.20
==> amazon-ebs.fedora: Waiting for SSH to become available...
2021/09/11 16:06:26 packer-io-1-7-4 plugin: [DEBUG] TCP connection to SSH ip/port failed: dial tcp 18.170.78.20:22: connect: connection refused
2021/09/11 16:06:31 packer-io-1-7-4 plugin: Using host value: 18.170.78.20
2021/09/11 16:06:31 packer-io-1-7-4 plugin: [INFO] Attempting SSH connection to 18.170.78.20:22...
2021/09/11 16:06:31 packer-io-1-7-4 plugin: [DEBUG] reconnecting to TCP connection for SSH
2021/09/11 16:06:31 packer-io-1-7-4 plugin: [DEBUG] handshaking with SSH
2021/09/11 16:06:32 packer-io-1-7-4 plugin: [DEBUG] SSH handshake err: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
2021/09/11 16:06:32 packer-io-1-7-4 plugin: [DEBUG] Detected authentication error. Increasing handshake attempts.
2021/09/11 16:06:39 packer-io-1-7-4 plugin: Using host value: 18.170.78.20
2021/09/11 16:06:39 packer-io-1-7-4 plugin: [INFO] Attempting SSH connection to 18.170.78.20:22...
2021/09/11 16:06:39 packer-io-1-7-4 plugin: [DEBUG] reconnecting to TCP connection for SSH
2021/09/11 16:06:39 packer-io-1-7-4 plugin: [DEBUG] handshaking with SSH
2021/09/11 16:06:39 packer-io-1-7-4 plugin: [DEBUG] SSH handshake err: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
2021/09/11 16:06:39 packer-io-1-7-4 plugin: [DEBUG] Detected authentication error. Increasing handshake attempts.
2021/09/11 16:06:46 packer-io-1-7-4 plugin: Using host value: 18.170.78.20
2021/09/11 16:06:46 packer-io-1-7-4 plugin: [INFO] Attempting SSH connection to 18.170.78.20:22...
2021/09/11 16:06:46 packer-io-1-7-4 plugin: [DEBUG] reconnecting to TCP connection for SSH
2021/09/11 16:06:46 packer-io-1-7-4 plugin: [DEBUG] handshaking with SSH
2021/09/11 16:06:46 packer-io-1-7-4 plugin: [DEBUG] SSH handshake err: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
2021/09/11 16:06:46 packer-io-1-7-4 plugin: [DEBUG] Detected authentication error. Increasing handshake attempts.
2021/09/11 16:06:53 packer-io-1-7-4 plugin: Using host value: 18.170.78.20
2021/09/11 16:06:53 packer-io-1-7-4 plugin: [INFO] Attempting SSH connection to 18.170.78.20:22...
2021/09/11 16:06:53 packer-io-1-7-4 plugin: [DEBUG] reconnecting to TCP connection for SSH
2021/09/11 16:06:53 packer-io-1-7-4 plugin: [DEBUG] handshaking with SSH
2021/09/11 16:06:53 packer-io-1-7-4 plugin: [DEBUG] SSH handshake err: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
2021/09/11 16:06:53 packer-io-1-7-4 plugin: [DEBUG] Detected authentication error. Increasing handshake attempts.
2021/09/11 16:07:00 packer-io-1-7-4 plugin: Using host value: 18.170.78.20
2021/09/11 16:07:00 packer-io-1-7-4 plugin: [INFO] Attempting SSH connection to 18.170.78.20:22...
2021/09/11 16:07:00 packer-io-1-7-4 plugin: [DEBUG] reconnecting to TCP connection for SSH
2021/09/11 16:07:00 packer-io-1-7-4 plugin: [DEBUG] handshaking with SSH
2021/09/11 16:07:00 packer-io-1-7-4 plugin: [DEBUG] SSH handshake err: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
2021/09/11 16:07:00 packer-io-1-7-4 plugin: [DEBUG] Detected authentication error. Increasing handshake attempts.
2021/09/11 16:07:07 packer-io-1-7-4 plugin: Using host value: 18.170.78.20
2021/09/11 16:07:07 packer-io-1-7-4 plugin: [INFO] Attempting SSH connection to 18.170.78.20:22...
2021/09/11 16:07:07 packer-io-1-7-4 plugin: [DEBUG] reconnecting to TCP connection for SSH
2021/09/11 16:07:07 packer-io-1-7-4 plugin: [DEBUG] handshaking with SSH
2021/09/11 16:07:07 packer-io-1-7-4 plugin: [DEBUG] SSH handshake err: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
2021/09/11 16:07:07 packer-io-1-7-4 plugin: [DEBUG] Detected authentication error. Increasing handshake attempts.
2021/09/11 16:07:14 packer-io-1-7-4 plugin: Using host value: 18.170.78.20
2021/09/11 16:07:15 packer-io-1-7-4 plugin: [INFO] Attempting SSH connection to 18.170.78.20:22...
2021/09/11 16:07:15 packer-io-1-7-4 plugin: [DEBUG] reconnecting to TCP connection for SSH
2021/09/11 16:07:15 packer-io-1-7-4 plugin: [DEBUG] handshaking with SSH
2021/09/11 16:07:15 packer-io-1-7-4 plugin: [DEBUG] SSH handshake err: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
2021/09/11 16:07:15 packer-io-1-7-4 plugin: [DEBUG] Detected authentication error. Increasing handshake attempts.
2021/09/11 16:07:22 packer-io-1-7-4 plugin: Using host value: 18.170.78.20
2021/09/11 16:07:22 packer-io-1-7-4 plugin: [INFO] Attempting SSH connection to 18.170.78.20:22...
2021/09/11 16:07:22 packer-io-1-7-4 plugin: [DEBUG] reconnecting to TCP connection for SSH
2021/09/11 16:07:22 packer-io-1-7-4 plugin: [DEBUG] handshaking with SSH
2021/09/11 16:07:22 packer-io-1-7-4 plugin: [DEBUG] SSH handshake err: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
2021/09/11 16:07:22 packer-io-1-7-4 plugin: [DEBUG] Detected authentication error. Increasing handshake attempts.
2021/09/11 16:07:29 packer-io-1-7-4 plugin: Using host value: 18.170.78.20
2021/09/11 16:07:29 packer-io-1-7-4 plugin: [INFO] Attempting SSH connection to 18.170.78.20:22...
2021/09/11 16:07:29 packer-io-1-7-4 plugin: [DEBUG] reconnecting to TCP connection for SSH
2021/09/11 16:07:29 packer-io-1-7-4 plugin: [DEBUG] handshaking with SSH
2021/09/11 16:07:29 packer-io-1-7-4 plugin: [DEBUG] SSH handshake err: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
2021/09/11 16:07:29 packer-io-1-7-4 plugin: [DEBUG] Detected authentication error. Increasing handshake attempts.
2021/09/11 16:07:36 packer-io-1-7-4 plugin: Using host value: 18.170.78.20
2021/09/11 16:07:36 packer-io-1-7-4 plugin: [INFO] Attempting SSH connection to 18.170.78.20:22...
2021/09/11 16:07:36 packer-io-1-7-4 plugin: [DEBUG] reconnecting to TCP connection for SSH
2021/09/11 16:07:36 packer-io-1-7-4 plugin: [DEBUG] handshaking with SSH
2021/09/11 16:07:36 packer-io-1-7-4 plugin: [DEBUG] SSH handshake err: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
2021/09/11 16:07:36 packer-io-1-7-4 plugin: [DEBUG] Detected authentication error. Increasing handshake attempts.
==> amazon-ebs.fedora: Error waiting for SSH: Packer experienced an authentication error when trying to connect via SSH. This can happen if your username/password are wrong. You may want to double-check your credentials as part of your debugging process. original error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
==> amazon-ebs.fedora: Packer experienced an authentication error when trying to connect via SSH. This can happen if your username/password are wrong. You may want to double-check your credentials as part of your debugging process. original error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
==> amazon-ebs.fedora: Step "StepConnect" failed
==> amazon-ebs.fedora: [c] Clean up and exit, [a] abort without cleanup, or [r] retry step (build may fail even if retry succeeds)? 
==> amazon-ebs.fedora: Pausing before cleanup of step 'StepCreateSSMTunnel'. Press enter to continue. 
==> amazon-ebs.fedora: Pausing before cleanup of step 'StepGetPassword'. Press enter to continue. 
==> amazon-ebs.fedora: Pausing before cleanup of step 'StepRunSourceInstance'. Press enter to continue. 
==> amazon-ebs.fedora: Terminating the source AWS instance...
==> amazon-ebs.fedora: Pausing before cleanup of step 'StepCleanupVolumes'. Press enter to continue. 
==> amazon-ebs.fedora: Cleaning up any extra volumes...
==> amazon-ebs.fedora: No volumes to clean up, skipping
==> amazon-ebs.fedora: Pausing before cleanup of step 'StepIamInstanceProfile'. Press enter to continue. 
==> amazon-ebs.fedora: Pausing before cleanup of step 'StepSecurityGroup'. Press enter to continue. 
==> amazon-ebs.fedora: Deleting temporary security group...
==> amazon-ebs.fedora: Pausing before cleanup of step 'StepKeyPair'. Press enter to continue. 
==> amazon-ebs.fedora: Deleting temporary keypair...
==> amazon-ebs.fedora: Pausing before cleanup of step 'StepNetworkInfo'. Press enter to continue. 
==> amazon-ebs.fedora: Pausing before cleanup of step 'StepSourceAMIInfo'. Press enter to continue. 
==> amazon-ebs.fedora: Pausing before cleanup of step 'StepPreValidate'. Press enter to continue. 
2021/09/11 16:14:13 [INFO] (telemetry) ending 
2021/09/11 16:14:13 Waiting on builds to complete...
==> Wait completed after 8 minutes 22 seconds
2021/09/11 16:14:13 machine readable: error-count []string{"1"}
==> Some builds didn't complete successfully and had errors:
2021/09/11 16:14:13 machine readable: amazon-ebs.fedora,error []string{"Packer experienced an authentication error when trying to connect via SSH. This can happen if your username/password are wrong. You may want to double-check your credentials as part of your debugging process. original error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain"}
==> Builds finished but no artifacts were created.
2021/09/11 16:14:13 [INFO] (telemetry) Finalizing.
Build 'amazon-ebs.fedora' errored after 8 minutes 22 seconds: Packer experienced an authentication error when trying to connect via SSH. This can happen if your username/password are wrong. You may want to double-check your credentials as part of your debugging process. original error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

==> Wait completed after 8 minutes 22 seconds

==> Some builds didn't complete successfully and had errors:
--> amazon-ebs.fedora: Packer experienced an authentication error when trying to connect via SSH. This can happen if your username/password are wrong. You may want to double-check your credentials as part of your debugging process. original error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

==> Builds finished but no artifacts were created.
2021/09/11 16:14:13 waiting for all plugin processes to complete...
2021/09/11 16:14:13 /usr/local/bin/packer-io-1-7-4: plugin process exited
2021/09/11 16:14:13 /usr/local/bin/packer-io-1-7-4: plugin process exited
2021/09/11 16:14:13 /usr/local/bin/packer-io-1-7-4: plugin process exited
nywilken commented 2 years ago

Thanks for reaching out. I believe this issue was solved in the 1.0.8 release. Try updating to the most recent version of Amazon plugin and let us know if the issue is resolved. thanks!

tormodmacleod commented 2 years ago

can confirm that upgrading the plugin resolved the issue. thanks :slightly_smiling_face: