Terraform: unsupported key type "OPENSSH PRIVATE KEY"

Created on 17 Feb 2016  ยท  7Comments  ยท  Source: hashicorp/terraform

Remote execution fails if you have a "new-format private key". This means you're not able to protect your private key with a KDF, which is a Good Thing to do.

Output received:

Error applying plan:

1 error(s) occurred:

* Failed to parse key file "[XXX PRIVATE KEY DATA XXX]": ssh: unsupported key type "OPENSSH PRIVATE KEY"

The OpenSSH man page section about KDF support:

     -a rounds
             When saving a new-format private key (i.e. an ed25519 key or any
             SSH protocol 2 key when the -o flag is set), this option speci-
             fies the number of KDF (key derivation function) rounds used.
             Higher numbers result in slower passphrase verification and
             increased resistance to brute-force password cracking (should the
             keys be stolen).
enhancement provisioneremote-exec

Most helpful comment

This should be reopened given the change was reverted.

All 7 comments

Hi @brainsik - this is a good idea, but I'm not sure if crypto/ssh supports it.

If we can figure out how to make this happen in Go - happy to add it as a feature!

Any update on Go's underlying library updating?

Closed via #9661

This should be reopened given the change was reverted.

Note you can work around this by setting agent = true in the connection block.

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