m110 / packer-builder-hcloud

Packer builder plugin for Hetzner Cloud - https://hetzner.cloud
MIT License
25 stars 4 forks source link

ssh_username must be specified #2

Closed fstab closed 6 years ago

fstab commented 6 years ago

When running packer build I get the following error:

1 error(s) occurred:

* An ssh_username must be specified
  Note: some builders used to default ssh_username to "root".

It's very easy to fix: Just add "ssh_username": "root" to the builder configuration and it works.

It would be good if you could either add this to the configuration example in README.md, or implement it as a default that you don't need to configure it.

Thanks for the packer builder!!!

m110 commented 6 years ago

Hey @fstab, thanks for pointing that out. I'm not sure if adding a default value is considered best practice, so I've updated the example config as for now. :)

yaffol commented 5 years ago

Just a note to say that I have run into this - while adapting the packer getting started instructions from aws to hcloud - it took me a couple of tries to work out that I needed to add "ssh_username": "root" to the configuration. Having it listed in the example config, but not as an option in the docs just above that (and an option which you cannot change at that..) is quite confusing.

I was wondering if there were situations where I would want to use another user - I'm inclined to avoid root by instinct, but perhaps it's OK for provisioning only?