CoreOS Vagrant Virtual box SSH password

2020-07-24 05:18发布

问题:

I'm trying to SSH into CoreOS Virtual Box using Putty. I know the username appears in the output when I do Vagrant up but I don't know what the password is.

I've also tried overriding it with config.ssh.password settings in Vagrantfile but when I do vagrant up again it comes up with Authentication failure warning and retries endlessly.

How do we use Putty to log into this Box instance?

回答1:

By default there is no password set for the core user, only key-based authentication. If you'd like to set a password this can be done via cloud-config.

Place the cloud-config file in a user-data file within the cloned repository. View user-data.sample for an example.

A better method would be to follow this guide so that you can use vagrant ssh as it was designed.



回答2:

By default for Vagrant:

user: vagrant

password: vagrant

..vagrant up again it comes up with Authentication failure warning and retries endlessly.

I think because it make connect with wrong ssh public key. To change it read this: https://stackoverflow.com/a/23554973/3563993