feat(builder): dump ssh private key during debug#87
Merged
Conversation
When Packer debug mode is enabled and a temporary SSH key pair was generated, this plugin will now dump the SSH private key to a file so that users can SSH into the instance for debugging. ``` > packer build -debug . Debug mode enabled. Builds will not be parallelized. oxide-instance.example: output will be in this color. ==> oxide-instance.example: Fetching Oxide image metadata ==> oxide-instance.example: Fetched Oxide image: feb2c8ee-5a1d-4d66-beeb-289b860561bf ==> oxide-instance.example: Pausing after run of step 'stepImageView'. Press enter to continue. ==> oxide-instance.example: Creating temporary ED25519 SSH key for instance... ==> oxide-instance.example: Pausing after run of step 'StepSSHKeyGen'. Press enter to continue. ==> oxide-instance.example: Saving key for debug purposes: oxide-packer-plugin-example.pem ==> oxide-instance.example: Pausing after run of step 'StepDumpSSHKey'. Press enter to continue. ==> oxide-instance.example: Creating Oxide SSH public key ==> oxide-instance.example: Created Oxide SSH public key: 1585fc7b-031b-433d-beb9-70dd41bbb218 ==> oxide-instance.example: Pausing after run of step 'stepSSHKeyCreate'. Press enter to continue. Cancelling build after receiving interrupt ==> oxide-instance.example: Deleting Oxide SSH public key: 1585fc7b-031b-433d-beb9-70dd41bbb218 ==> oxide-instance.example: No image_id or image_name. Skipping artifact creation. Build 'oxide-instance.example' finished after 39 seconds 385 milliseconds. ==> Wait completed after 39 seconds 385 milliseconds Cleanly cancelled builds after being interrupted. ``` Closes SSE-130.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When Packer debug mode is enabled and a temporary SSH key pair was generated, this plugin will now dump the SSH private key to a file so that users can SSH into the instance for debugging.
Closes SSE-130.