loafoe/terraform-provider-ssh

Allow the use of the ssh agent for credentials

Closed this issue · 2 comments

To improve security, I would rather not have my credentials known in any way to Terraform, and it would be great if this library allows the use of the SSH agent for credentials. According to https://github.com/appleboy/easyssh-proxy/blob/master/example/ssh/ssh.go#L15 this is already implemented in your proxy library, so this seems to be possible simply in the provider. For example, you could add a flag use_agent to explicitly enable this scenario and still give an error when a user unintentionally does not give either a password or private key.

Thanks for the suggestion, agree the default should be to use SSH agent to prevent the private key from making it into the state. I'll create a PR shortly

@FWest98 implemented in v0.3.0, if you can test that would be appreciated. Thanks!