流浪者 2.2.7 - 无法流浪:默认值:警告:身份验证失败。重试



这个问题已经在这里描述过:流浪默认:警告:连接重置。重试。但是,它应该在流浪者 1.9.5 中修复,而我正在使用流浪者 2.2.7。

为了简化起见,我只是在 Ubuntu 2.27 LTS 上安装 vagrant 18.04,并尝试使用以下 Vagrant 文件运行它:

Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/trusty64"
end

以下是发生的情况:

nicolas@BEL20:~/ansible$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'ubuntu/trusty64' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
==> default: Loading metadata for box 'ubuntu/trusty64'
default: URL: https://vagrantcloud.com/ubuntu/trusty64
==> default: Adding box 'ubuntu/trusty64' (v20190514.0.0) for provider: virtualbox
default: Downloading: https://vagrantcloud.com/ubuntu/boxes/trusty64/versions/20190514.0.0/providers/virtualbox.box
default: Download redirected to host: cloud-images.ubuntu.com
==> default: Successfully added box 'ubuntu/trusty64' (v20190514.0.0) for 'virtualbox'!
==> default: Importing base box 'ubuntu/trusty64'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'ubuntu/trusty64' version '20190514.0.0' is up to date...
==> default: Setting the name of the VM: ansible_default_1580225223507_34560
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Authentication failure. Retrying...
...

所以虚拟机无法启动,但是,我可以 ssh 到本地主机。将以下行添加到配置中:

config.ssh.password = "vagrant"

一切按预期工作:

nicolas@BEL20:~/ansible$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'ubuntu/trusty64' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
==> default: Loading metadata for box 'ubuntu/trusty64'
default: URL: https://vagrantcloud.com/ubuntu/trusty64
==> default: Adding box 'ubuntu/trusty64' (v20190514.0.0) for provider: virtualbox
default: Downloading: https://vagrantcloud.com/ubuntu/boxes/trusty64/versions/20190514.0.0/providers/virtualbox.box
default: Download redirected to host: cloud-images.ubuntu.com
==> default: Successfully added box 'ubuntu/trusty64' (v20190514.0.0) for 'virtualbox'!
==> default: Importing base box 'ubuntu/trusty64'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'ubuntu/trusty64' version '20190514.0.0' is up to date...
==> default: Setting the name of the VM: ansible_default_1580226061698_99495
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: password
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!
==> default: Checking for guest additions in VM...
default: The guest additions on this VM do not match the installed version of
default: VirtualBox! In most cases this is fine, but in rare cases it can
default: prevent things such as shared folders from working properly. If you see
default: shared folder errors, please make sure the guest additions within the
default: virtual machine match the version of VirtualBox you have installed on
default: your host and reload your VM.
default: 
default: Guest Additions Version: 4.3.40
default: VirtualBox Version: 5.2
==> default: Mounting shared folders...
default: /vagrant => /home/nicolas/ansible
nicolas@BEL20:~/ansible$ 

但我不想通过登录名/密码进行身份验证。这里可能会发生什么?

提前非常感谢任何帮助。

亲切问候

尼古拉斯

在我的情况下,vagrant --version是 2.2.9,box 是ubuntu/focal64(无法使用密码连接到它(。 我还看到一个永远的序列:

default: Warning: Authentication failure. Retrying...

我必须确保StrictHostKeyCheckingno127.0.0.1(或我在vagrant ssh-config中看到的任何内容(。

编辑:使用ubuntu/jammy64我别无选择,只能更新流浪者,并且成功使用vagrant --version2.2.19

相关内容

最新更新