stream浪者“validation失败”期间,但“stream浪ssh”可以得到很好的

我很难过 我试图在Windows 8.1上运行一个vagrant / virtualbox / coreos集群来开发在云中运行的集群。 我已经在四台机器上试了这个(所有的都是Windows 8.1的最新更新,所有最新的VirtualBox,Vagrant,Git和Vagrant的configuration都是一样的。我相信每个configuration都是一样的,我有两个成功,两个失败。

两台机器是这样成功的

Bringing machine 'core-01' up with 'virtualbox' provider... ==> core-01: Checking if box 'coreos-stable' is up to date... (snip) core-01: SSH address: 127.0.0.1:2222 core-01: SSH username: core core-01: SSH auth method: private key core-01: Warning: Connection timeout. Retrying... ==> core-01: Machine booted and ready! ==> core-01: Setting hostname... ==> core-01: Configuring and enabling network interfaces... 

stream浪ssh和stream浪汉暂停这两个系统上工作正常。

另外两台Windows机器也是这样失败的

 Bringing machine 'core-01' up with 'virtualbox' provider... ==> core-01: Importing base box 'coreos-stable'... ==> core-01: Matching MAC address for NAT networking... ==> core-01: Checking if box 'coreos-stable' is up to date... ==> core-01: Setting the name of the VM: coreos-vm-cluster_core-01_1422899531630_88904 ==> core-01: Clearing any previously set network interfaces... ==> core-01: Preparing network interfaces based on configuration... core-01: Adapter 1: nat core-01: Adapter 2: hostonly ==> core-01: Forwarding ports... core-01: 22 => 2222 (adapter 1) ==> core-01: Running 'pre-boot' VM customizations... ==> core-01: Booting VM... ==> core-01: Waiting for machine to boot. This may take a few minutes... core-01: SSH address: 127.0.0.1:2222 core-01: SSH username: core core-01: SSH auth method: private key core-01: Warning: Connection timeout. Retrying... core-01: Warning: Authentication failure. Retrying... core-01: Warning: Authentication failure. Retrying... core-01: Warning: Authentication failure. Retrying... core-01: Warning: Authentication failure. Retrying... core-01: Warning: Authentication failure. Retrying... core-01: Warning: Authentication failure. Retrying... 

注意工作和非工作系统如何经历一个超时连接,但是成功的系统实际上连接并完成启动虚拟机,而不成功的系统只是被authentication重试循环卡住

在authentication失败之后,如果我把它保持超时,或者即使我按Ctrl + C, 我也可以运行“vagrant ssh core-01”,它直接让我直接

 CoreOS (stable) core@localhost ~ $ 

“stream浪汉停顿”也无法在这些系统上build立ssh连接:

 ==> core-01: Attempting graceful shutdown of VM... core-01: Guest communication could not be established! This is usually because core-01: SSH is not running, the authentication information was changed, core-01: or some other networking issue. Vagrant will force halt, if core-01: capable. ==> core-01: Forcing shutdown of VM... 

我可以成功地使用putty或者其他ssh客户端来访问虚拟机,使用insecure_private_key进行authentication ,所以我假设虚拟机本身具有正确的configuration,问题在于Vagrant能够调用ssh来获取。如果“Vagrant up”不能ssh进入,它不能完成VM的启动configuration,所以我想解决这个问题,主要是出于这个原因。

这是sshconfiguration,让我进入其他ssh客户端,我相信应该使用的stream浪汉:

 Host: 127.0.0.1 Port: 2222 Username: core Private key: C:/Users/Mike/.vagrant.d/insecure_private_key 

我也为虚拟机启用了GUI,控制台不显示任何错误; 它一直到login提示一切正常(这也符合我可以ssh和否则使用虚拟机)的事实。

我相信(但不知道如何validation)Vagrant在C:\ Program Files(x86)\ Git \ bin中调用openssh客户端

所有运行的Vagrant版本1.7.2和git 1.9.5。 Ruby 2.0.0p353。

我的%path长度大约是500个字符。 我相信Vagrant会find某种ssh客户端,因为至less会有一两个超时,然后是validation失败。

提前感谢您的任何想法!

更新:在“vagrant up –debug”的输出深处埋藏着这个小小的gem:

 D, [2015-02-02T23:11:10.755468 #3920] DEBUG -- net.ssh.authentication.session[14661cc]: trying publickey E, [2015-02-02T23:11:10.756472 #3920] ERROR -- net.ssh.authentication.key_manager[1473e1c]: could not load public key file `C:/Users/Mike/.vagrant.d/insecure_private_key': Net::SSH::Exception (public key at C:/Users/Mike/.vagrant.d/insecure_private_key.pub is not valid) 

那最后的“ insecure_private_key.pub无效 ”似乎是一个坚实的线索。

我已经尝试修改该文件,以确保它只有LF换行结束以及CRLF,它没有任何区别。 在视觉上看起来很好。 它也是在其他系统上运行的文件的100%字节。 为什么它是无效的? 我已经validation了当前用户对该文件具有完全控制权限,并且还以pipe理员身份试图stream浪。 行为没有变化。 🙁

去掉
C:/Users/Mike/.vagrant.d/insecure_private_key

在下一个vagrant重新启动它将被重新创建(这个时候应该是正确的)

是Puttygen创建的.pub文件(也许是在以Putty格式创建私钥时)? 我这样做,它阻止了流浪者连接到盒子,但我可以连接使用腻子和Puttygen生成的.ppk文件。

改变Putty公钥的扩展名对我来说很合适,大概是因为Vagrant不再使用它了。

当我创建了insecure_private_key文件的PPK文件时,我也习惯性地创建了一个.pub版本。 这似乎导致了这个问题。 像Jon一样,当我删除insecure_private_key.pub文件时,vagrant up能够一直运行。

如果你使用puttygen创建了一个insecure_private_key.pub文件,并且遇到这个问题,我建议删除它。 这对流浪汉来说是不需要的,只会阻碍他们。