Can't ssh into instance with multinode setup, permission denied (publickey)

Bug #1956158 reported by Theo Hallenius
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
MicroStack
New
Undecided
Unassigned

Bug Description

Hello!
I'm still new to openstack so excuse my rookiness xD
Note that this issue doesn't occur on a single-node setup and only applies to multi-node setup (1 control and 1 compute in my case)
Steps on control node:

wget http://cloud-images.ubuntu.com/minimal/releases/focal/release-20211130/ubuntu-20.04-minimal-cloudimg-amd64.img
sudo microstack.openstack image create --container-format bare --disk-format qcow2 --file ubuntu-20.04-minimal-cloudimg-amd64.img Ubuntu-20.04

sudo microstack.openstack flavor create --public m1.dev --id auto --ram 4096 --disk 10 --vcpus 2 --rxtx-factor 1
sudo microstack.openstack keypair create dev > dev.pem
chmod 600 dev.pem

sudo microstack.openstack server create --image Ubuntu-20.04 --flavor m1.dev --key-name dev --network test dev --availability-zone nova:ubuntu-8gb-compute-node

sudo microstack.openstack floating ip create external
sudo microstack.openstack server add floating ip <new floating ip>

ssh -i dev.pem ubuntu@<new floating ip>
Permission denied (publickey).

Note that this all works fine on a single-node setup, so I'm not sure why ssh public key is not getting injected into the instance. I'd appreciate any help on this issue.
/Theo

Revision history for this message
Paulo Duarte (paduarte) wrote :

Hello,

I'm facing the same issue.

$ ssh -i key.pem ubuntu@10.200.201.234
The authenticity of host '10.200.201.234 (10.200.201.234)' can't be established.
ED25519 key fingerprint is SHA256:hMEmdjHbBWYAAUIi6zMxHyrNC630NX1/ka+DCK2p37Q.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '10.200.201.234' (ED25519) to the list of known hosts.
ubuntu@10.200.201.234: Permission denied (publickey).

Has anyone found a solution or the cause of the problem?

Thanks,

Revision history for this message
Mark Beierl (mbeierl) wrote :

Just a thought to check the console log of the VM and see if it had an error contacting the metadata service. If the instance cannot get the metadata, no key will be injected, and you cannot log in.

Revision history for this message
Tariro Mukute (tariromukute) wrote :

Hi,

I am also facing this issue. The console log show that the metadata is not being read and hence the default metadata is being used. According to this thread https://askubuntu.com/questions/1321968/ubuntu-server-20-04-2-lts-hangs-after-bootup-cloud-init-1781-yyyy-mm-dd-h that's the issue. I am unable to log in using password via the console hence I am not able to execute the the instructions from it. My question is how do I resolve the error of the metadata not being read?

Thanks,

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.