Reputation: 164
root@ssd:~/vagrant-docker# vagrant up
Bringing machine 'default' up with 'docker' provider...
==> default: Creating the container...
default: Name: vagrant-docker_default_1127288133
default: Image: phusion/baseimage
default: Volume: /home/ming/vagrant-docker:/vagrant
default: Port: 2222:22
default:
default: Container created: e66a757c034fa644
==> default: Starting container...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 172.17.0.53:22
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Connection refused. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
Upvotes: 2
Views: 767
Reputation: 582
You are using a private key to ssh into the guest machine with user name vagrant. Check your vagrantfile to make sure you are using the right private key (config.ssh.private_key_path
). I see you are using phusion/baseimage, did you enable insecure key? If so, you can use phusion insecure key (just copy the phusion private key from git to your local .ssh directory). Docker uses user root, try root instead of vagrant.
config.vm.provider :docker do |d|
d.cmd = ["/sbin/my_init", "--enable-insecure-key"]
d.image = "phusion/baseimage"
d.name = "baseimage"
d.has_ssh = true
end
config.ssh.username = "root"
config.ssh.private_key_path = "~/.ssh/phusion.key"
Or you can use config.ssh.password
if you know the pwd - This sets a password that Vagrant will use to authenticate the SSH user.
Upvotes: 1