Terraform: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

Created on 12 Jul 2018  ยท  2Comments  ยท  Source: hashicorp/terraform

Terraform Version

Terraform v0.11.7

  • provider.aws v1.27.0
### Terraform Configuration Files


connection {
user        = "centos"
private_key = "${file("${var.key_path}/${var.key_name}.pem")}"

}

Code below is not working either.

connection {
user        = "centos"
host = "${aws_instance.cdh_server.public_ip}"
agent = false
private_key = "${file("${var.key_path}/${var.key_name}.pem")}"

}

```

Debug Output

DEBUG] plugin.terraform: file-provisioner (internal)
[WARN] ssh: handshake failed: ssh: unable to authenticate, attempted methods
[publickey none], no supported methods remain
[DEBUG] plugin.terraform: file-provisioner (internal)
[WARN] retryable error: ssh: handshake failed: ssh: unable to authenticate,
attempted methods [publickey none], no supported methods remain

1 error(s) occurred:

  • module.cloudera.aws_instance.cdh_server: timeout - last error: ssh: handshake failed: ssh:
    unable to authenticate, attempted methods [none publickey], no supported methods remain

Crash Output

Expected Behavior

Actual Behavior

Steps to Reproduce

Additional Context

References

Most helpful comment

Changed the permission of private key to 600 solved the problem.

All 2 comments

Changed the permission of private key to 600 solved the problem.

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

carl-youngblood picture carl-youngblood  ยท  3Comments

rjinski picture rjinski  ยท  3Comments

c4milo picture c4milo  ยท  3Comments

ronnix picture ronnix  ยท  3Comments

ketzacoatl picture ketzacoatl  ยท  3Comments