hashicorp / hashicorp/packer-plugin-vagrant

Vagrant builder ssh authentication error

Open
#34 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
16
Forks
28
PR merge metrics
No merged PRs in 30d

Description

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

---
When filing a bug, please include the following headings if possible. Any
example text in this template can be deleted.

#### Overview of the Issue

See logs below:

#### Reproduction Steps

```
$ packer build -force qvex-dev.json
vagrant: output will be in this color.

==> vagrant: Creating a Vagrantfile in the build directory...
==> vagrant: Adding box using vagrant box add ...
vagrant: (this can take some time if we need to download the box)
==> vagrant: Calling Vagrant Up (this can take some time)...
==> vagrant: Using SSH communicator to connect: 127.0.0.1
==> vagrant: Waiting for SSH to become available...
==> vagrant: 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
==> vagrant: destroying Vagrant box...
==> vagrant: Deleting output directory...
Build 'vagrant' errored after 2 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 2 minutes 22 seconds

==> Some builds didn't complete successfully and had errors:
--> vagrant: 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
```

### Packer version

From `packer version`

```
$ packer --version
1.7.6
```

### Simplified Packer Template

```
$ cat qvex-dev.json
{
"builders": [
{
"communicator": "ssh",
"source_path": "archlinux/archlinux",
"provider": "virtualbox",
"add_force": true,
"type": "vagrant"
}
],
"provisioners": [
{
"type": "shell",
"script": "install.sh"
}
]
}

```

### Operating system and Environment details

Windows 10 x86_64

### Log Fragments and crash.log files

N/A

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure with qvex-dev.json using `packer build -force` in the stated Windows 10 environment. Start by tracing the Vagrant builder's SSH connection setup and compare it with the authentication details exposed by Vagrant. Done means the build authenticates successfully and proceeds to the shell provisioner without the reported handshake error.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.