问题描述
我想我搞砸了一些简单的事情,通常你应该能够使用 vagrant ssh
立即连接到你的 Vagrant VM.但是,目前我的情况有所不同.
I think I messed up something simple, normally you should be able to instantly connect to your Vagrant VM using vagrant ssh
. However, it's currently different for me.
C:\Users\Sem\Documents\timeline>vagrant ssh
Enter passphrase for key 'C:/Users/Sem/Documents/timeline/.vagrant/machines/default/virtualbox/private_key':
[email protected]'s password:
[email protected]'s password:
[email protected]'s password:
Permission denied (publickey,password).
我发现另一个人有同样的问题:https://github.com/coreos/docs/issues/10#issuecomment-48903893
I found one other person having the same issue: https://github.com/coreos/docs/issues/10#issuecomment-48903893
操作系统:Windows 8.1 专业版
OS: Windows 8.1 Pro
流浪版本:1.7.2
流浪文件:
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/trusty64"
end
我之前确实尝试了多种设置,但是如果我将这个 Vagrantfile 与 vagrant destroy
和 vagrant up
一起使用,问题仍然存在.
I did try multiple settings before, but if I use this Vagrantfile with vagrant destroy
and vagrant up
the problem remains.
如有遗漏,请告知.
推荐答案
即使我在寻找其他东西,我也找到了解决此问题的方法.
Even though I was searching for something else I found the solution to this problem.
我将此添加到我的 Vagrantfile 中:
I Added this to my Vagrantfile:
config.vm.provider "virtualbox" do |v|
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
v.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
end
它还使我的流浪虚拟机中的互联网连接速度超快!:)
It also made the internet connection in my vagrant VM super fast! :)
这篇关于Vagrant SSH 默认密钥密码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!