hashicorp / hashicorp/packer-plugin-openstack
SSH hadnshake failure in packer 1.8.6
- Dominant language
- Go
- Stars
- 29
- Forks
- 26
- PR merge metrics
- No merged PRs in 30d
Description
I previously reported a similar bug here hashicorp/packer#11656 but since I couldn't comment there , I am opening up a new issue here.
Packer version: 1.8.6
Tested with: CentOS Stream 9 and Ubuntu 22.04
**Error:**
`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`
**Packer log:**
```
2023/04/25 12:12:55 ui: ==> openstack: Using SSH communicator to connect: xx.xx.xx.xx
2023/04/25 12:12:55 packer-builder-openstack plugin: [INFO] Waiting for SSH, up to timeout: 5m0s
2023/04/25 12:12:55 ui: ==> openstack: Waiting for SSH to become available...
2023/04/25 12:12:55 packer-builder-openstack plugin: [DEBUG] Using floating IP xx.xx.xx.xx to connect
2023/04/25 12:12:57 packer-builder-openstack plugin: [DEBUG] TCP connection to SSH ip/port failed: dial tcp xx.xx.xx.xx:22: connect: connection refused
2023/04/25 12:13:02 packer-builder-openstack plugin: [DEBUG] Using floating IP xx.xx.xx.xx to connect
2023/04/25 12:13:02 packer-builder-openstack plugin: [DEBUG] TCP connection to SSH ip/port failed: dial tcp xx.xx.xx.xx:22: connect: connection refused
2023/04/25 12:13:07 packer-builder-openstack plugin: [DEBUG] Using floating IP xx.xx.xx.xx to connect
2023/04/25 12:13:07 packer-builder-openstack plugin: [DEBUG] TCP connection to SSH ip/port failed: dial tcp xx.xx.xx.xx:22: connect: connection refused
2023/04/25 12:13:12 packer-builder-openstack plugin: [DEBUG] Using floating IP xx.xx.xx.xx to connect
2023/04/25 12:13:12 packer-builder-openstack plugin: [INFO] Attempting SSH connection to xx.xx.xx.xx:22...
2023/04/25 12:13:12 packer-builder-openstack plugin: [DEBUG] reconnecting to TCP connection for SSH
```
**Workaround:**
Adding the following in builder template works:
`"temporary_key_pair_type": "ed25519"`
Contributor guide
Research direction
Start with the OpenStack builder's SSH connection path and reproduce the supplied Packer 1.8.6 log on CentOS Stream 9 or Ubuntu 22.04. Compare the default builder template with the reported temporary_key_pair_type value; done means the default configuration authenticates successfully without the workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100