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

Provider doesn't seem to care if a privatekey has been defined #79

Open
Spezi2u opened this issue Sep 29, 2023 · 8 comments
Open

Provider doesn't seem to care if a privatekey has been defined #79

Spezi2u opened this issue Sep 29, 2023 · 8 comments

Comments

@Spezi2u
Copy link

Spezi2u commented Sep 29, 2023

Need to define a privatekey due to full automation. Provider doesn't seem to care if a privatekey is given. Only if that said privatekey is loaded into the agent will the provider execute.

Is this a bug or did I do something wrong or misunderstood the underlying principle.

Just to make sure I set agent to false when defining the privatekey no reaction.

Pls. advise

@Sharpz7
Copy link

Sharpz7 commented Nov 19, 2023

I am struggling with the same problem. from the logs:

Failed to copy content to remote file narval.computecanada.ca:22:/home/amcarth1/alloc.sh: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none], no supported methods remain

Even though

resource "ssh_resource" "init" {
  host         = "narval.computecanada.ca"
  user         = "user"
  private_key  = var.encoded_ssh_private_key

  when         = "create" # Default

@Spezi2u
Copy link
Author

Spezi2u commented Nov 19, 2023 via email

@Sharpz7
Copy link

Sharpz7 commented Nov 20, 2023

I have my actual key, sorry, bad variable name. So yeah I think it is in a state it should work.

@Sharpz7
Copy link

Sharpz7 commented Nov 20, 2023

Is there a way to get more debugging information?

@Spezi2u
Copy link
Author

Spezi2u commented Nov 20, 2023 via email

@Sharpz7
Copy link

Sharpz7 commented Nov 29, 2023

Hey @Spezi2u , I have tried that and got no new information, any idea on how to proceeed?

@DaBeOps
Copy link

DaBeOps commented Jan 18, 2024

Hi,
I got the same issue.
Here is the content of the debug information:

command: uptime                                                                                                           
done: false                                                                                                               
stdout:                                                                                                                   
                                                                                                                          
stderr:                                                                                                                   
                                                                                                                          
error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

Any idea?


Terraform v1.6.5
Provider version: 2.6.0

@Spezi2u
Copy link
Author

Spezi2u commented Jan 19, 2024 via email

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