SSH errror on remote-exec

742 views
Skip to first unread message

Ryan Kelley

unread,
Jul 9, 2015, 8:54:09 PM7/9/15
to terrafo...@googlegroups.com

I have ran through this config a ton of times and manually connecting with the key works so i'm wondering what i'm missing. here is the error 

aws_instance.example (remote-exec): Connecting to remote host via SSH...

aws_instance.example (remote-exec):   Host: 54.193.231.51

aws_instance.example (remote-exec):   User: ubuntu

aws_instance.example (remote-exec):   Password: false

aws_instance.example (remote-exec):   Private key: true

aws_instance.example (remote-exec):   SSH Agent: true

aws_instance.example (remote-exec): Connecting to remote host via SSH...

aws_instance.example (remote-exec):   Host: 54.193.231.51

aws_instance.example (remote-exec):   User: ubuntu

aws_instance.example (remote-exec):   Password: false

aws_instance.example (remote-exec):   Private key: true

aws_instance.example (remote-exec):   SSH Agent: true

aws_instance.example: Error: 1 error(s) occurred:


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

Error applying plan:


1 error(s) occurred:


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


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.


https://gist.github.com/rykelley/44a734d3dd078724dd90


there is the main terraform file. no other errors other it can't auth with the SSH connect function. 

Paul Hinze

unread,
Jul 10, 2015, 1:15:41 AM7/10/15
to terrafo...@googlegroups.com
Hi Ryan,

This is an instance of https://github.com/hashicorp/terraform/issues/2614, which will be fixed in 0.6.1.

In the meantime, you can work around it by setting `agent = false` in your connection blocks.

Let me know if this helps!

Paul

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/terraform/issues
IRC: #terraform-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Terraform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to terraform-too...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/247fa974-00e7-4e11-8159-7862bdfc1b1e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ryan Kelley

unread,
Jul 16, 2015, 11:45:56 AM7/16/15
to terrafo...@googlegroups.com
yep that worked. thanks ! 

Ahmed Kamel

unread,
Apr 8, 2017, 3:21:00 PM4/8/17
to Terraform
I am running into a the same issue while using version 0.9.2. I have tried setting "agent = false" in my connection black, but the issue still happens. Any suggestions?

Andrew Langhorn

unread,
Apr 10, 2017, 7:14:59 AM4/10/17
to terrafo...@googlegroups.com
Can you SSH from the box you're running Terraform on?
ssh -vvv -i /path/to/key user@host would be a good starting place.
Reply all
Reply to author
Forward
0 new messages