Vagrant的新副本不会创建SSH私钥

我正在尝试为本地主机工作设置一台新的工作计算机,并且我们正在切换为使用Vagrant和VirtualBox而不是Ubuntu(以便在所有开发人员计算机之间更加一致)。我使用https://www.sitepoint.com/getting-started-vagrant-windows/作为构建localhost服务器的基础,但是它总是在'default:SSH auth method:private key'行中中断并超时。

我试图在Windows上使用VirtualBox 6.0.14,Vagrant 2.2.6和putty-64bit-0.73进行安装,同时加载Ubuntu Server 14.04(也已通过16.04测试)。

我尝试按照上面链接中提供的说明进行操作。经过一些研究,我也尝试设置

config.ssh.private_key_path = [“ C:/Users/Me/.vagrant.d/insecure_private_key”]

在Vagrant文​​件中并设置

config.ssh.insert_key = false

按照Can't ssh to vagrant VMs using the insecure private key (vagrant 1.7.2)

在新旧工作计算机上安装时,结果相同。

C:\Users\Me\Documents\vagrant_test>vagrant init ubuntu/trusty64
A `Vagrantfile` has been placed in this directory. You are now ready to `vagrant up` your first virtual environment! Please read the comments in the Vagrantfile as well as documentation on `vagrantup.com` for more information on using Vagrant.

C:\Users\Me\Documents\vagrant_test>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' (v20190429.0.1) for provider: virtualbox
    default: Downloading: https://vagrantcloud.com/ubuntu/boxes/trusty64/versions/20190429.0.1/providers/virtualbox.box
    default: Download redirected to host: cloud-images.ubuntu.com
    default:
==> default: Successfully added box 'ubuntu/trusty64' (v20190429.0.1) for 'virtualbox'!
==> default: Importing base box 'ubuntu/trusty64'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'ubuntu/trusty64' version '20190429.0.1' is up to date...
==> default: Setting the name of the VM: vagrant_test_default_1572996714007_64150
==> default: Clearing any previously set forwarded ports...
Vagrant is currently configured to create VirtualBox synced folders with the `SharedFoldersEnableSymlinksCreate` option enabled. If the Vagrant guest is not trusted,you may want to disable this option. For more information on this option,please refer to the VirtualBox manual:

  https://www.virtualbox.org/manual/ch04.html#sharedfolders

This option can be disabled globally with an environment variable:

  VAGRANT_DISABLE_VBOXSYMLINKCREATE=1

or on a per folder basis within the Vagrantfile:  config.vm.synced_folder '/host/path','/guest/path',SharedFoldersEnableSymlinksCreate: false
==> 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
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.

唯一的错误是超时错误,根本没想到。

让我知道是否需要进一步的信息

wewewe22 回答:Vagrant的新副本不会创建SSH私钥

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3155202.html

大家都在问