chef/bento

bento/rockylinux-9.1-arm64 doesn't include default vagrant insecure key

banfelder opened this issue · 3 comments

Version

bento/rockylinux-9.1-arm64 box-version 202304.27.0. for Parallels provider

Environment

macOS Ventura 13.3
Vagrant 2.3.6
Parallels Desktop 18 for Mac Pro Edition 18.3.0 (53606)
vagrant-parallels (2.4.0, global)

Scenario

bento/rockylinux-9.1-arm64 box does not play nicely with vagrant. The vagrant default ssh public key seems to be missing from the box.

Steps to Reproduce

vagrant init bento/rockylinux-9.1-arm64
vagrant up

Expected Result

(as works with the bento/ubuntu-20.04-arm64 box)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 10.211.55.11:22
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Connection refused. Retrying...
default:
default: Vagrant insecure key detected. Vagrant will automatically replace
default: this with a newly generated keypair for better security.
default:
default: Inserting generated public key within guest...
default: Removing insecure key from the guest if it's present...
default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!

Actual Result

==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 10.211.55.10:22
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
...
default: Warning: Authentication failure. Retrying...
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.

If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.

If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.

If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.

As a workaround, adding...
config.ssh.password = "vagrant"
...to Vagrantfile allows vagrant to finish starting the box properly.

This is caused by hashicorp/vagrant#12589, tldr is that all el9 derived distros no longer suppert SHA-1 in their standard configuration and vagrant only provides an RSA keypair for their insecure ssh key.

In that linked issue I do recommend a path forward which should be as universally compatible as possible, but it has yet to attract any attention from the maintainers at hashicorp

closing this issue as the vagrant PR to fix this has been merged and will be in the next 2.3.8 release of vagrant.