How to SSH into a Docker Machine
While you can use
docker-machine ssh <machine_name>
to ssh into a machine, I was wondering how to use vanilla ssh to achieve the same. I stumbled across a Docker Github issue that had a very useful snippet by emilingerslev:
machine=machine_name; ssh -i ~/.docker/machine/machines/$machine/id_rsa docker@$(docker-machine ip $machine)
That’s all there is to it!