fix up documentation for virtualbox key pair ssh options

This commit is contained in:
Megan Marsh 2020-09-04 16:55:58 -07:00
parent 61af278b79
commit 94a9beaac6
3 changed files with 8 additions and 11 deletions

View File

@ -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

View File

@ -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'

View File

@ -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: