I am using docker-machine to create a develop environment. I want to change the docker-machine default ssh key.
I check the config of my new machine:
docker-machine config develop
--tlsverify --tlscacert="/Users/robe/.docker/machine/machines/develop/ca.pem" --tlscert="/Users/robe/.docker/machine/machines/develop/cert.pem" --tlskey="/Users/robe/.docker/machine/machines/develop/key.pem" -H=tcp://192.168.99.103:2376
when I try to access using the key:
--tlskey="/Users/robe/.docker/machine/machines/develop/key.pem"
With this command:
ssh -i /Users/robe/.docker/machine/machines/develop/key.pem [email protected]
Then I got the prompt to write password. So Why I can't access to my virtual machine using this access key.
Any help please?
The key you're attempting to use is an SSL key used to protect the SSL connection to the remote docker agent. It is not an SSH key (different format).
SSH keys are generated for each machine created. Try the following command to obtain ssh access:
docker-machine ssh development
A more convoluted solution would be:
ssh -i ~/.docker/machine/machines/development/id_rsa docker@$(docker-machine ip development)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With