Public/Private Key Pairs in SSO Account for first time login to Ubuntu Core

I have a Ubuntu SSO account which has “Viewer” rights on a brand store. I used ubuntu-image to create a Raspberry Pi image including a custom gadget snap. On first boot, at the enter email prompt I entered by SSO account email. Now I realise to ssh in I need a private key. There seems to be a public SSH key already in my account but I don’t know where the private key is for that. Is this the one I should be using? I also added a new public key just now but is it correct to say that I should actually re do the image building step now for the image to include the new public key that I added to my account. Maybe someone can explain the correct sequence to follow.

Hi,

If you’ve lost the private part for your public SSH key on Launchpad, then you will not be able to log into an Ubuntu Core device using SSH.

From here I would recommend removing the existing public key (it’s useless without the private part), and generating, then adding a new SSH key to your Launchpad account. Then, when you sign in on a device, that public key will be imported into the device, and since you now have the corresponding private part, you will be able to log in.

I don’t think you need to rebuild the image, since as you mentioned, the SSO account sign-in is done on first boot, not on image build, but you probably need to reimage the device (you can use the same image you built), so you get a chance to do the “first boot” again.

  • Daniel
1 Like