From 94a9beaac622b3fbbac73fa5532734f2c2dc61d2 Mon Sep 17 00:00:00 2001 From: Megan Marsh Date: Fri, 4 Sep 2020 16:55:58 -0700 Subject: [PATCH] fix up documentation for virtualbox key pair ssh options --- helper/communicator/config.go | 3 ++- website/pages/docs/builders/virtualbox/iso.mdx | 4 ---- .../partials/builders/virtualbox-ssh-key-pair.mdx | 12 ++++++------ 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/helper/communicator/config.go b/helper/communicator/config.go index 16587f13c..caa26d725 100644 --- a/helper/communicator/config.go +++ b/helper/communicator/config.go @@ -119,7 +119,8 @@ type SSH struct { // The time to wait for SSH to become available. Packer uses this to // determine when the machine has booted so this is usually quite long. // Example value: `10m`. - SSHTimeout time.Duration `mapstructure:"ssh_timeout"` + SSHTimeout time.Duration `mapstructure:"ssh_timeout"` + // Deprecated in favor of SSHTimeout SSHWaitTimeout time.Duration `mapstructure:"ssh_wait_timeout" undocumented:"true"` // If true, the local SSH agent will be used to authenticate connections to // the source instance. No temporary keypair will be created, and the diff --git a/website/pages/docs/builders/virtualbox/iso.mdx b/website/pages/docs/builders/virtualbox/iso.mdx index 086732ac6..411cbe7dd 100644 --- a/website/pages/docs/builders/virtualbox/iso.mdx +++ b/website/pages/docs/builders/virtualbox/iso.mdx @@ -171,10 +171,6 @@ necessary for this build to succeed and can be found further down the page. @include 'helper/communicator/SSH-not-required.mdx' -@include 'helper/communicator/SSH-Temporary-Key-Pair-not-required.mdx' - -@include 'helper/communicator/SSH-Key-Pair-Name-not-required.mdx' - @include 'helper/communicator/SSH-Private-Key-File-not-required.mdx' @include 'helper/communicator/SSH-Agent-Auth-not-required.mdx' diff --git a/website/pages/partials/builders/virtualbox-ssh-key-pair.mdx b/website/pages/partials/builders/virtualbox-ssh-key-pair.mdx index a61ef5e2d..8fc1a78e9 100644 --- a/website/pages/partials/builders/virtualbox-ssh-key-pair.mdx +++ b/website/pages/partials/builders/virtualbox-ssh-key-pair.mdx @@ -1,17 +1,17 @@ ### SSH key pair automation The VirtualBox builders can inject the current SSH key pair's public key into -the template using the following variable: - -- `SSHPublicKey` (_VirtualBox builders only_) - This is the SSH public key - as a line in OpenSSH authorized_keys format. +the template using the `SSHPublicKey` template engine. This is the SSH public +key as a line in OpenSSH authorized_keys format. When a private key is provided using `ssh_private_key_file`, the key's -corresponding public key can be accessed using the above variables. +corresponding public key can be accessed using the above engine. + +@include 'helper/communicator/SSH-Private-Key-File-not-required.mdx' If `ssh_password` and `ssh_private_key_file` are not specified, Packer will automatically generate en ephemeral key pair. The key pair's public key can -be accessed using the template variables. +be accessed using the template engine. For example, the public key can be provided in the boot command as a URL encoded string by appending `| urlquery` to the variable: