JonasProgrammer / docker-machine-driver-hetzner

Docker machine driver for the new hetzner cloud API
https://jonasprogrammer.github.io/docker-machine-driver-hetzner/
MIT License
431 stars 53 forks source link

SSH Key for debugging? #53

Closed sokraflex closed 3 years ago

sokraflex commented 3 years ago

Greetings,

first of all: Thanks a lot for sharing the code! The driver has been very useful 👍 🥇

I'm currently receiving errors and would like to SSH into the created machine to debug the errors further. Is it possible to add an additional SSH key to the machine? E.g. in hcloud-cli, it's possible to supply multiple ssh-key parameters:

./hcloud server create \
    --name test \
    --image ubuntu-20.04 \
    --type cx11 \
    --ssh-key "debugging" \
    --ssh-key "locally-generated-key"

While it's generally possible to add a fixed SSH key to the machine using hetzner-existing-key-path, it would be incredibly handy to be able to add multiple ssh keys and ssh-keys unknown to the local machine. Using the ssh-key-parameter, it's possible to add a preexistent SSH key only by it's name - without the need to inject the content of the SSH key into the server running the docker-machine-driver-hetzner in the first place. Furthermore, while working in CI/CD environments, having to inject the SSH-key content into the machine (and, for security reasons, potentially passing it through docker-layers or similar) requires much more work than adjusting a CLI-argument.

Kind regards

JonasProgrammer commented 3 years ago

Should work now in 3.1.0