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

Terraform Run fails on Terraform Cloud #60

Open
yurikoval opened this issue Jun 26, 2024 · 5 comments
Open

Terraform Run fails on Terraform Cloud #60

yurikoval opened this issue Jun 26, 2024 · 5 comments
Assignees

Comments

@yurikoval
Copy link

yurikoval commented Jun 26, 2024

Error:

Error: Unable to establish SSH connection
with provider["registry.terraform.io/aliksend/dokku"]
on main.tf line 21, in provider "dokku":
provider "dokku" {
Unable to establish SSH connection. ssh: handshake failed: open /home/tfc-agent/.tfc-agent/component/terraform/runs/run-yfzfd5ufoxnacRZY/.ssh/known_hosts: no such file or directory

image

@aliksend
Copy link
Owner

Hi. This error goes from goph and from ssh library.

Pleas recheck your configuration, did you specify correct ssh_host, ssh_port and ssh_user? Can you do ssh ssh_user@ssh_host -p ssh_port version and get something like dokku version 0.32.0? If no, then your configuration isn't valid.

@aliksend aliksend self-assigned this Jun 26, 2024
@yurikoval
Copy link
Author

I am able to deploy manually to dokku, and ssh command above works and returns dokku version 0.30.7.

@aliksend
Copy link
Owner

I’m working on a solution to this problem.

@aliksend
Copy link
Owner

@yurikoval Can you please check v1.0.16? I've added ssh_host_key attribute to set server public key explicitly and not rely on known_hosts file.

You need to get public key of your server using ssh-keyscan YOURSERVER. You can get multiple keys and, I'll be honest, I don't really know what key you should use. You can try every key locally to find the right one.

This key allows to validate that you use the server you expect, not the fake one (for example during man-in-the-middle attack).

@toanalien
Copy link
Contributor

Hi @aliksend,

I have created a new pull request to add a feature that allows skipping the known host check. Please review it at your earliest convenience. #66

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants