How do I SSH into the boot2docker host vm that the Vagrant 1.6 Docker Provider sets up?

Vagrant’s boot2docker keeps boot2docker’s ssh username and password.

SSH into VM

$ boot2docker ssh

Boot2Docker auto logs in using the generated SSH key, but if you want to SSH into
the machine manually (or you’re not using a boot2docker managed VM), the credentials are:

user: docker
pass: tcuser

https://github.com/boot2docker/boot2docker#ssh-into-vm

The port is forwarded from the local port 2022 by default. You can verify this:

$ VBoxManage list vms | grep docker
"docker-host_default_1234567890000_1234" {3d66ecf6-4539-47ca-afd2-66f953cd9a3e}
$ VBoxManage showvminfo docker-host_default_1234567890000_1234 | grep ssh
NIC 1 Rule(1):   name = ssh, protocol = tcp, host ip = 127.0.0.1, host port = 2022, guest ip = , guest port = 22

And then login:

$ ssh docker@localhost -p 2022
docker@localhost's password: tcuser
                        ##        .
                  ## ## ##       ==
               ## ## ## ##      ===
           /""""""""""""""""\___/ ===
      ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ /  ===- ~~~
           \______ o          __/
             \    \        __/
              \____\______/
 _                 _   ____     _            _
| |__   ___   ___ | |_|___ \ __| | ___   ___| | _____ _ __
| '_ \ / _ \ / _ \| __| __) / _` |/ _ \ / __| |/ / _ \ '__|
| |_) | (_) | (_) | |_ / __/ (_| | (_) | (__|   <  __/ |
|_.__/ \___/ \___/ \__|_____\__,_|\___/ \___|_|\_\___|_|
boot2docker: 0.8.0
docker@boot2docker:~$ 

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)