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

Encrypted SSH Keys #73

Closed
bobbytables opened this issue Jul 29, 2014 · 10 comments
Closed

Encrypted SSH Keys #73

bobbytables opened this issue Jul 29, 2014 · 10 comments
Labels

Comments

@bobbytables
Copy link

When using key_file to choose which key to use for connection / provisioning on SSH I used a key that was encrypted and the error message was very... cryptic. (pun intended).

Reference: https://code.google.com/p/go/issues/detail?id=6650

Excerpt

ParsePrivateKey fails with an error like this:

asn1: structure error: tags don't match (16 vs {class:1 tag:28 length:11 > isCompound:true}) {optional:false explicit:false application:false defaultValue: tag: > stringType:0 set:false omitEmpty:false} pkcs1PrivateKey

@bobbytables
Copy link
Author

Not sure if you'd want to attack this but it definitely was a big "what?" error.

@mitchellh mitchellh added the bug label Jul 29, 2014
@mitchellh
Copy link
Contributor

Yeah so I tagged this as a bug. I think in the short term we at least want to show a better error. I'm not sure how to handle this well with automation and the hands-off approach Terraform takes. Any ideas?

@michiels
Copy link

@mitchellh I ran into this issue as well. If terraform is run by an actual person, won't using ssh-agent basically solve this problem?

@mitchellh
Copy link
Contributor

@michiels Maybe that is a good solution. Maybe the solution is simply a better error message that says to either unencrypt it for the duration of the run or to use an SSH-agent. I like it!

Thoughts?

@bobbytables
Copy link
Author

I'm a fan of a better error message for now. 👍

@mitchellh
Copy link
Contributor

Fixed

@bobbytables
Copy link
Author

Awesome. Thanks Mitchell.

On Tuesday, August 5, 2014, Mitchell Hashimoto notifications@github.com
wrote:

Closed #73 #73.


Reply to this email directly or view it on GitHub
#73 (comment).

  • Robert Ross

@hh
Copy link

hh commented Feb 11, 2015

I want to make sure I understand:

terraform does not support ssh-agent forwarding or local, or keys with passwords yet

@JeanMertz
Copy link
Contributor

@hh @mitchellh that's my understanding as well. It's a real shame, as I don't use any passwordless private keys.

To clarify: I tried setting agent to true, which resulted in:

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

However, I am able to ssh manually. Of course I could not set key_file, because of the password limitation.

update turns out I left the host field blank, so that was the issue for me.

@ghost
Copy link

ghost commented May 2, 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 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.

@ghost ghost locked and limited conversation to collaborators May 2, 2020
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants