packer does not deploy authorized_keys to image
Closed this issue · 3 comments
When calling make infrastructure BOOTSTRAP=true
, the machines bootstrap01
, ignition01
and master01
are being created.
After waiting for the SSH connection to be available, the SSH connection fails with Permission denied (publickey)
.
After investigating, I couldn't find any place where the SSH key would be set in the base image by packer during make hcloud_image
.
Can anybody tell me what I am missing?
One step further:
I found that http://169.254.169.254/hetzner/v1/userdata
should return in some form the public keys set up in the hcloud project. But that endpoint does not return anything for me, only HTTP 200 with Content-Length: 0
.
http://169.254.169.254/hetzner/v1/metadata
works though...
Hi,
your ssh key is not part of the terraform manifests. The key is defined in the ignition config, generated by the openshift-install cli command. It is defined in your install-config.yaml. How does your install-config.yaml look like? Are you using the core user for the SSH connection?
An exception is the ignition host btw. This machine will receive all ssh keys in your project (via terraform).
Sorry for all the confusion, I cleaned my "thinking notes" up :)
I think I got it now:
userdata
is empty, as it is can only be seen inside the machines deployed by Terraform.
My problem seems to be that I created a separate ssh identity on my first, dedicated management machine, the public key of which was not set up in the Hetzner Cloud Console.