Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provisioner did not have AES_256_CBC #12402

Closed
victorpng opened this issue Mar 16, 2020 · 4 comments
Closed

Provisioner did not have AES_256_CBC #12402

victorpng opened this issue Mar 16, 2020 · 4 comments
Labels
service/ec2 Issues and PRs that pertain to the ec2 service.

Comments

@victorpng
Copy link

victorpng commented Mar 16, 2020

Hi,

I faced an issue when using Terraform to spin up and setup EC2 instance.

When running, the following error appears after waiting for 5 min:

Error: Error applying plan:

1 error(s) occurred:

* aws_instance.generator: timeout - last error: ssh: handshake failed: ssh: no common algorithm for client to server cipher; client offered: [[email protected] [email protected] aes128-ctr aes192-ctr aes256-ctr], server offered: [aes256-cbc]

Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.

The following is the config for the provisioner:

provisioner "file"{
    source="test.jar"
    destination = "/home/ec2-user/test.jar"
     connection {
       type = "ssh"
       user = "ec2-user"
       private_key = "${file("/home/ec2-user/aws-access.pem")}"
     }
   }

The version I'm using is as follows:
Terraform v0.11.7

  • provider.aws v2.45.0
  • provider.panos v1.6.2

I think there is an issue with Terraform ssh where it is missing ciphers.
Are there any solution / workaround for this? Thank you.

Best Regards,
Victor

@ghost ghost added the service/ec2 Issues and PRs that pertain to the ec2 service. label Mar 16, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Mar 16, 2020
@bflad
Copy link
Contributor

bflad commented Mar 16, 2020

Hi @victorpng 👋 Thank you for submitting this and sorry you are running into trouble here.

The code that handles provisioners currently lives upstream in the Terraform core repository (e.g. https://github.com/hashicorp/terraform/tree/master/builtin/provisioners) and the maintainers of this repository are not experts on this functionality. Since we cannot automatically transfer issues across GitHub organizations, unfortunately we can only close this issue here, but our best suggestion would be to open a GitHub issue upstream via https://github.com/hashicorp/terraform/issues/new/choose or if its truly a question versus a bug report or feature request to ask in the Terraform community forums where there are more people able to help. 👍

@bflad bflad closed this as completed Mar 16, 2020
@amitmi704
Copy link

FYI - The Crypto SSH module specifically does not support AES-256-CBC, and AES-128-CBC is not a default value due to security concerns. This "fix" would be 2-part: (1) a feature request for the Crypto SSH module to add AES-256-CBC support, and (2) then would require an enhancement to Terraform Core File provisioner to be able to pass the request to use a non-standard cipher.

@victorpng
Copy link
Author

Thank you. I will raise a feature request for the Crypto SSH module to add AES-256-CBC support first.

@ghost
Copy link

ghost commented Apr 15, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 15, 2020
@breathingdust breathingdust removed the needs-triage Waiting for first response or review from a maintainer. label Sep 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/ec2 Issues and PRs that pertain to the ec2 service.
Projects
None yet
Development

No branches or pull requests

4 participants