我不想使用"流浪"用户名和密码ssh到我的Vagrant虚拟机上,而是想使用kevin/kevin.
我修改Vagrantfile了包括:
config.ssh.username = "kevin"
然后,我跑了vagrant reload.
以下输出显示:
[default] Waiting for machine to boot. This may take a few minutes...
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. This can
mean a number of things.
Run Code Online (Sandbox Code Playgroud)
但是,我仍然可以使用ssh到我的流浪盒上vagrant/vagrant,但我不能使用kevin/kevin或kevin/vagrant的用户名和密码ssh到盒子上.
请注意,我也尝试了这个答案(/sf/answers/694688571/),但我只能使用用户名ssh到框中vagrant,而不是kevin(尽管在其中指定Vagrantfile).
如何配置我的Vagrantfile以便我可以使用用户名进行ssh kevin?
我正在学习使用Vagrant,我试图从VirtualBox GUI内部启动一个Vagrant机器(以推荐方式构建的ubuntu/trusty64"vagrant init ubuntu/trusty64; vagrant up")(双击Vagrant机器的图标) ).但我无法登录:没有用户名,没有密码.
我是否需要添加特定条款,还是有另一种更简单的方法可以做到这一点?
谢谢.
我很难过.我正在尝试在Windows 8.1上运行vagrant/virtualbox/coreos集群来开发用于在云中运行的集群.我在四台机器上尝试了这一点(所有这些都是带有最新更新的Windows 8.1,并且都配有最新的VirtualBox,Vagrant,Git和Vagrant的相同配置.我正在检查所有4系统上的回购中的Vagrant配置所以我相信每个人的配置是相同的.我获得了2次成功和2次失败.
两台机器成功如下:
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...
Run Code Online (Sandbox Code Playgroud)
流浪的ssh和vagrant都可以在这两个系统上正常工作.
另外两台Windows机器失败如下:
Bringing machine 'core-01' up with 'virtualbox' provider...
==> core-01: Importing base box 'coreos-stable'...
==> core-01: Matching …Run Code Online (Sandbox Code Playgroud) 我已经找到了"Windows中的Vagrant框",并将git bin目录添加到我的Windows PATH中.我通过启动CMD并键入来验证它是有效的ssh,并获得了一条使用消息.(在将git bin目录添加到我的路径之前,CMD抱怨这ssh不是一个有效的命令.)
但是......当我vagrant ssh从MobaXterm 运行时,我得到了与之前相同的错误.(一个充满了对我没用的ruby错误的页面.)当我运行它时VAGRANT_LOG=debug vagrant ssh,我看到:
INFO subprocess: Starting process: ["C:\\Users\\(myname)\\DOCUME~1\\MOBAXT~1\\slash\\bin/ssh.EXE"]
Run Code Online (Sandbox Code Playgroud)
这是错误的ssh可执行文件; 它是安装在MobaXterm中的那个,如果从CMD窗口运行它就不起作用.
我怎样才能开始vagrant ssh工作呢?