How to ssh into docker-machine VirtualBox instance? How to ssh into docker-machine VirtualBox instance? docker docker

How to ssh into docker-machine VirtualBox instance?


You can log into docker-machine hosts by just running

docker-machine ssh default

(Using the "default" host here)

The identity files should be stored under ~/.docker/machine/machines. If you want to log into a container (as opposed to the host), use docker exec as suggested by user2915097.


if you really need to do it via ssh, this is working with docker 1.8.2

init docker:

eval "$(docker-machine env default)"

get the IP from your default docker machine:

docker-machine ip default

this prints something like this out: 192.168.99.100

ssh docker@192.168.99.100

password is tcuser but you can also use the identity file, see other answer


Finally, I found an answer :

I'm on Windows with Docker Toolbox (Docker Machine).

If I docker-machine -D ssh default, I find that the SSH parameters should be :

Host : localhost
Port : 51701
User : docker
Key : .docker\machine\machines\default\id_rsa

When I change my Putty/MobaXterm settings to match, voila, I can SSH into the container.