Unable to upload cloudinit snippets via ssh #1395
Replies: 1 comment 2 replies
-
Hi @parliament718 👋🏼
The provider needs to know the node's IP address to establish an SSH connection, so it uses a few different techniques to obtain this address, as documented here. However, depending on your particular PVE setup, those methods may not work. You might need to manually configure which IP addresses to use for SSH connections for each PVE node in the cluster. From the provided examples, I think this provider configuration might work for you: provider "proxmox" {
endpoint = "https://78.100.100.10:8006"
api_token = "terraform@pve!provider=<my-api-key>"
insecure = true
ssh {
agent = true
username = "terraform"
node {
name = "pve"
address = "78.100.100.10"
}
}
} However, per your comment:
If your PVE setup requires SSH connections to be made via a jumphost/bastion host, this might not work with the provider. There is an open ticket to add support for this. |
Beta Was this translation helpful? Give feedback.
-
I'm having trouble uploading snippets. First time doing this, please help.
On my Proxmox PVE I created a user & API key:
Now I'm trying to upload cloud-init yamls for each environment (with replacements from a template file)
But when I apply I get the ssh error:
First of all, not sure why the error prints my PVE's internal IP address (192.168.100.10). My provider is set to the external address (78.100.100.10). The only place the internal address is mentioned is at my router level where I forward the external port 22 to the internal address shown in the error. I was surprised to see the internal IP surfaced, but that's probably unrelated.
The thing is, I've already added my jumphost's sshkey to the pve. That is,
ssh-add -L
prints the same key as i have in my pve's~/.ssh/authorized_keys
.My pve users and realms are as follows:
Then I noticed the documentation says this:
Is that what's affecting me? I tried using an alternative provider like:
But it gives the same error.
I can succesfully upload files using
Why can't I upload my snippets?
Beta Was this translation helpful? Give feedback.
All reactions