我希望使用kevin/kevin而不是"vagrant"用户名和密码登录我的Vagrant虚拟机。
我修改了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.
然而,我仍然可以使用 vagrant/vagrant
登录到我的 Vagrant Box,但是我无法使用用户名和密码为 kevin/kevin 或 kevin/vagrant 登录到该 Box。
请注意,我还尝试了这个答案(https://dev59.com/p2kw5IYBdhLWcg3wdKMv#9924122),但我只能使用用户名 vagrant
登录到该 Box,而不能使用 kevin
(即使在 Vagrantfile
中已经指定了)。
如何配置我的 Vagrantfile,以便我可以使用用户名 kevin
进行 SSH 登录?