-
Notifications
You must be signed in to change notification settings - Fork 462
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
no check for id_ed25519 ssh key (only id_rsa is checked) #1108
Comments
@memetb hi
|
it seems the problem occurs when you do not specify the user in the uri line
then the connection is via ssh |
@mhtr the error message is stating the problem:
This means that it failed to authenticate. If you are seeing that setting the username in the query string works, then either set it in your ~/.ssh/config as per man page (using |
Reporting the same on I'm using the same ed25519 key I would usually use for accessing my libvirt host and normal SSH works fine there, it just doesn't when using this provider. Generating a new RSA key and using that instead works without issue so I assume it's a provider or dependency limitation. |
This worked for me when using an Ed25519 key with a passphrase: cat ~/.ssh/config
AddKeysToAgent yes provider "libvirt" {
uri = "qemu+ssh://user@remote-ip/system?keyfile=/path/to/key/.ssh/id_ed25519&no_verify=1&known_hosts_verify=ignore&sshauth=privkey,agent"
} The |
Linux distribution
Arch Linux
Terraform version
1.9.7
Provider and libvirt versions
provider: 0.8.0
Description of Issue/Question
module only checks for
id_rsa
ssh key, not for other types like the recommend state of the art key typeid_ed25519
Steps to Reproduce Issue
id_rsa
just aid_ed25519
[INFO] provider.terraform-provider-libvirt_v0.8.0: 2024/10/12 19:53:03 [ERROR] Failed to read ssh key '${HOME}/.ssh/id_rsa': open /Users/korncola/.ssh/id_rsa: no such file or directory: timestamp="2024-10-12T19:53:03.332+0200"
[ERROR] provider.terraform-provider-libvirt_v0.8.0: Response contains error diagnostic: tf_req_id=6d164000-3306-e756-43da-748d1f0823de tf_rpc=Configure @caller=github.com/hashicorp/[email protected]/tfprotov5/internal/diag/diagnostics.go:58 diagnostic_detail="" diagnostic_severity=ERROR tf_proto_version=5.6 @module=sdk.proto diagnostic_summary="failed to connect: failed to connect to remote host 'kvm.example.com': ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain" tf_provider_addr=provider timestamp="2024-10-12T19:53:03.373+0200"
The text was updated successfully, but these errors were encountered: