Skip to content
Discussion options

You must be logged in to vote

I solved the issue. You need to create the authorized_keys file in the user's directory /home/opentofu/.ssh on the Proxmox server and copy the user's public SSH key into it. This should be done on each node. My mistake was that I copied the public SSH keys of the opentofu user into the /etc/pve/priv/authorized_keys file – I thought this file was shared, but it is only for the root user.

provider "proxmox" {
endpoint = var.api_url
#username = var.pm_user
#password = var.pm_password
api_token = "opentofu@pam!provider=secret-opentofu-token"
insecure = true // necessary because of self-signed certificates

ssh {
agent = true
username = "opentofu"

private_key = file("~/.ssh/opentofu/id_rsa")

}
}

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@bpg
Comment options

bpg Aug 19, 2025
Maintainer

Comment options

You must be logged in to vote
0 replies
Answer selected by testdcpractice
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants