generated from hashicorp/packer-plugin-scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump packer-plugin-sdk to address legacy SSH key algorithms in SSH co…
…mmunicator (#218) * Bump github.com/hashicorp/packer-plugin-sdk with latest x/crypto/ssh fix * Add acceptance test case for rsa-sha2 bug
- Loading branch information
Showing
6 changed files
with
91 additions
and
15 deletions.
There are no files selected for viewing
This file contains 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
File renamed without changes.
40 changes: 40 additions & 0 deletions
40
builder/ebs/test-fixtures/ssh-keys/rsa_sha2_only_server.pkr.hcl
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
OpenSSH migrated the ssh-rsa key type, which historically used the ssh-rsa | ||
signature algorithm based on SHA-1, to the new rsa-sha2-256 and rsa-sha2-512 signature algorithms. | ||
Golang issues: https://github.com/golang/go/issues/49952 | ||
See plugin issue: https://github.com/hashicorp/packer-plugin-amazon/issues/213 | ||
*/ | ||
|
||
data "amazon-ami" "autogenerated_1" { | ||
filters = { | ||
name = "ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-*" | ||
root-device-type = "ebs" | ||
virtualization-type = "hvm" | ||
} | ||
most_recent = true | ||
owners = ["099720109477"] | ||
region = "us-east-1" | ||
} | ||
|
||
locals { timestamp = regex_replace(timestamp(), "[- TZ:]", "") } | ||
|
||
source "amazon-ebs" "basic-example" { | ||
ami_description = "Ubuntu 22.04 GoldenImage" | ||
ami_name = "ubuntu-22.04-${local.timestamp}" | ||
instance_type = "t3.micro" | ||
region = "us-east-1" | ||
source_ami = "${data.amazon-ami.autogenerated_1.id}" | ||
ssh_username = "ubuntu" | ||
skip_create_ami = true | ||
} | ||
|
||
build { | ||
sources = ["source.amazon-ebs.basic-example"] | ||
|
||
provisioner "shell" { | ||
inline = ["echo Successful login"] | ||
} | ||
|
||
} |
File renamed without changes.
This file contains 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
This file contains 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