Loading...
Loading...
### Terraform Version ```shell v0.14.7 ``` ### Terraform Configuration Files ```terraform ...terraform config... ``` ### Debug Output ``` resource "null_resource" "print_hostname" { provisioner "remote-exec" { inline = [ "echo 'Hostname is: $(hostname)'" ] connection { type = "ssh" user = "ec2-user" private_key = file("~/.ssh/my)key.pem") host = "" timeout = "2m" } } triggers = { always_run = timestamp() } } ``` ### Expected Behavior null_resource.print_hostname (remote-exec): Connected! null_resource.print_hostname (remote-exec): Hostname is: $(hostname) null_resource.print_hostname: Creation complete after 0s [id=7980356368681144379] ### Actual Behavior null_resource.print_hostname: Still creating... [2m0s elapsed] 2025/06/20 12:46:43 [WARN] Errors while provisioning null_resource.print_hostname with "remote-exec", so aborting Error: timeout - last error: SSH authentication failed (ec2-user@1:22): ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain ### Steps to Reproduce Against Amazon linux 2023, run "terraform apply" ### Additional Context Notes: Manual SSH test - working with mentioned location PEM format - perfect (-----BEGIN RSA PRIVATE KEY-----) Key permissions - perfect (400) Terraform version - (v0.14.7) ### References _No response_ ### Generative AI / LLM assisted development? _No response_
Click on a version to see all relevant bugs
Terraform Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.