ssh_private_key_file
used for both droplet creation and subsequent connection
#132
Labels
ssh_private_key_file
used for both droplet creation and subsequent connection
#132
Overview of the Issue
Previously I had an issue when providing a private SSH key to connect to my newly created droplet: #19
The fix provided in #20 and shipped with
v1.0.1
fixed my issue and I've been using that version ever since.Now I'm (finally) upgrading to a more recent version and my existing configuration results in a different error.
The private key specified in my config is being used as both the root key when creating the droplet and the ssh key when connecting as a user (which may not be root) to provision the droplet.
In my case, I have a user named
deploy
that already exists on the base image that I want to connect as. Givingroot
the same key asdeploy
is no bueno.I noticed this because I have that key added to DO already separately, and when trying to create the root key it fails since there's a duplicate.
I believe this bug emerged in the following commit: 0462cbc
Versions of the plugin pre-1.2.0 work as expected.
My desired functionality is to be able to specify the root key and the communicator key separately. If I don't specify a root key then the plugin should generate a temporary one for me, but then connect using the supplied communicator user/key.
Reproduction Steps
packer build
Plugin and Packer version
Packer: 1.9.4
Plugin: 1.2.0 and up
Simplified Packer Buildfile
Operating system and Environment details
MacOS 13.6.3
Log Fragments and crash.log files
Full plugin output from my packer run:
The text was updated successfully, but these errors were encountered: