Arnau Guadall
Arnau Guadall

Reputation: 327

"vagrant up" it stops at SSH auth method: private key

I'm trying to install laravel on my computer with homestead environment. I followed all steps on the official documentation. And when I execute my "vagrant up" my console displays the following error.

vagrant up error.

Stops at SSH auth method. Previously I configured the ssh-keygen with "ssh-keygen -t rsa -b 4096 -C "[email protected]"

I added the host piece at .rb file: Hosts

Even .yaml file. I think I edited properly yaml file

At hosts file I added: "192.168.10.10 administracio.dev" at the bottom of the file.

And then when I let this error crash it shows the following error:

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.

Any suggestions?

Upvotes: 9

Views: 24179

Answers (9)

After a couple of days of trying to solve the problem with "SSH auth method: private key", it was found that windows 10 has a conflict with vagrant.

As a tool to validate the status of virtualization, the program was used: "https://www.intel.com/content/www/us/en/download/12136/28539/intel-processor-identification-utility-windows-version .html "

I show you the capture of the initial state: enter image description here

Fix it by disabling the following windows features: enter image description here

Once the aforementioned features were deactivated and the computer was restarted, I share the new state of the processor where it is evident that virtualization is already working: enter image description here

PS: On saying that you already activate virtualization on the board (bios)

With this solution already vagrant works perfectly for me.

Upvotes: 1

Muhammad Ajmal Khan
Muhammad Ajmal Khan

Reputation: 12

To address the issue you're facing, simply execute the command below. This will clear out all installed Vagrant plugins and reinstall them, which often resolves problems:

vagrant plugin expunge --reinstall

This command is particularly useful for troubleshooting issues related to corrupt or incompatible plugins in Vagrant. By performing this action, you'll ensure that you have clean, up-to-date versions of your plugins, potentially fixing the problem at hand.

Upvotes: 0

Ia Tid
Ia Tid

Reputation: 26

Hope it will work for you as it worked for me. I'm still investigating why, but as a solution it works.

Our case: When we typed in cmd (inside vagrand image directory) vagrant up it opens virtual box VM and is stuck on "default: SSH auth method: private key", as mentioned in question.

So fix by these steps:

  • open manually virtual box (besides what already opened by vagrant up)
  • run the VM that had added to the list (by vagrant up)
  • open CMD
  • type "Vagrant ssh" and it will work.

Hope it helped, best regards.

Upvotes: 0

Diego Giacobbo
Diego Giacobbo

Reputation: 11

the firewall message blocked the box of boot.

step 1

vagrant file:

config.vm.provider "virtualbox" do |vb|
   vb.gui = true
end

step 2

sudo user:

sudo ufw disable

Upvotes: 1

bryan
bryan

Reputation: 190

I had this problem and this is how I got get Vagrant & WSL2 working side by side

I have the following environment:

  • Hardware Virtualization enabled in BIOS

  • Windows 10 (Insider Program with Release Preview Channel)

    -- Windows 10 with WSL 2 Version 10.0.19041 Build 19041

  • VirtualBox 6.1.12

    -- Extension Pack Installed

  • Vagrant 2.2.9

These are the settings that worked for me:

  • Windows Hypervisor Platform: Off
  • Virtual Machine Platform: On
  • Windows Subsystem for Linux: On

enter image description here

Upvotes: 2

rubo77
rubo77

Reputation: 20817

The essential line for me when running Ubuntu 20.04 Focal Fossa (focal64) was

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

I changed my Vagrantfile and added this line:

  config.vm.boot_timeout = 600 # wait max 10 minutes

So it seems, like the default (300 seconds) was not enough on my system to get it up running

Upvotes: 0

Gunnar
Gunnar

Reputation: 759

I had the same issue today and I found that my VirtualBox Settings (Network | Advanced | Cable Connected) were set correctly (that is the checkbox was checked.) I started comparing this VM, which has been stable for months, with some of my other VMs and found the only difference was in the Network Adapters, as Adapter 2 was different than all the rest.

Adapter 1 was set to the following:

Attached To:   NAT
Adapter Type:  Intel PRO/1000 MT Desktop ....

while Adapter 2 was set to the following...

Attached To:   Host-only Adapter
Adapter Type:  PCnet-FAST III ...

I have not changed any of these network settings in VirtualBox, ever. Once I set Adapter 2 Adapter Type to the same settings as Adapter 1 as stated above, I then vagrant halt and vagrant up and back to normal.

Upvotes: 1

06userit
06userit

Reputation: 166

Solution works also for me : When setting in the Bios "Intel Virtualization Technology = Enabled", the "SSH auth method: private key " step is not frozen any more and VM starts normally. When setting back in the Bios "Intel Virtualization Technology = Disabled", the "SSH auth method: private key" step is frozen again.

Motherboard : Asus Z170 Pro Gaming (lga1151), Bios menu : Advanced\Cpu Configuration, Virtual Box : 5.1.22, Vagrant : 1.9.5, Windows 10

Upvotes: 0

halfer
halfer

Reputation: 20420

(Posted on behalf of the OP).

Solution: I activated the Hardware acceleration in the BIOS environment.

Upvotes: 1

Related Questions