7

I just installed Ubuntu Core 16 on a Raspberry Pi 2. Before install, I uploaded my ssh key for one of my computers to my Ubuntu SSO account. After installation I had no problems connecting to the Pi using my key and Ubuntu SSO Username. Then I wanted to be able to connect to the Pi from another machine and I generated a new key which I then added to the same account.

The problem is that logging in using this second key does not work.

If I take a look at my authorized_keys file on the Pi, it contains only the first key which explains why login from the second machine doesn't work. How do I get my second key in there? I guess I could do it manually but it seems like the wrong way to do it, given the cloud integration and all.

popstr
  • 173
  • 6
  • 2
    Was going to ask this question. Seems to be related to this posted bug - https://bugs.launchpad.net/snappy/+bug/1646559. Currently there is no automatic refresh but it's not even clear if it's possible to tell the Ubuntu Core to sync with the SSO account to get a 2nd key. – Josh Morel Jan 08 '17 at 14:08
  • Thanks a lot Josh, that explains it. I had really expected this feature to be ready by now. However, I encounter other issues with Ubuntu Core so I ended up going with Ubuntu Mate instead. – popstr Jan 09 '17 at 06:39

1 Answers1

5

The SSH keys are imported once during console-conf into your user's home directory ~/.ssh/. Therefore, if you mount the writable partition on a different Linux machine you can manually append the missing SSH public key(s) to /writable/user-data/username/.ssh/authorized_keys.

This worked on a WDLabs Nextcloud Box running Ubuntu Core 16 and Nextcloud 11.

Lucas
  • 665