New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creating multiple machines with the same SSH key #49
Comments
Hi, the driver attempts to create a remote key corresponding with the local public key. Apparently, hetzner disallows the creation of keys with the same fingerprint; I did not know this until now, perhaps this is worth mentioning in the README. As a workaround, I'd suggest creating the public key manually and refer to it using Of course, we could simply add a heuristic searching for an existing key by fingerprint, if I don't have a good solution for this problem right now, but the workaround of passing the ID should get you up and running for now. |
Thanks for your answer ! I implemented the search for an existing key by fingerprint, then created successfully 2 machines. Attempting to destroy I only changed the Create() function, I will open a WIP pull request so you can see my changes |
Thank you very much for investigating this further; apparently there was some confusion on my side. While I'm positive I've faced some referential integrity issues in the past, either Hetzner changed something or -- most likely -- I got things mixed up. Nonetheless, thank you for pushing for a solution despite my negative and, as it turns out, wrong answer. Your PR looks good in general, but I've added a few comments. You can try and resolve them yourself; don't hesitate to let me know if you need help or want me to make the requested changes. |
Hello,
I'm trying to create multiple machines with the same SSH Key. The first machine is created successfully, but the creation fails for the next machines with the following error:
How to reproduce
I have an already existent SSH keypair:
/home/am/.ssh/id_rsa
and/home/am/.ssh/id_rsa.pub
.I create the first machine with
docker-machine create --driver hetzner --hetzner-api-token $MY_TOKEN --hetzner-existing-key-path /home/am/.ssh/id_rsa machine1
. The machine is created successfully.I try to create the second machine with
docker-machine create --driver hetzner --hetzner-api-token $MY_TOKEN --hetzner-existing-key-path /home/am/.ssh/id_rsa machine2
. The creation failsDetailed log: machine.log
The text was updated successfully, but these errors were encountered: