Score:0

How to force synchronization of SSH autherized keys from Ubuntu One account to Ubuntu Core IoT device

uz flag

I added a few more SSH keys to the Ubuntu One account (https://login.ubuntu.com/ssh-key).

Now, I want to make sure that these key are now sent down to the IoT devices that have Ubuntu Core installed on it. I can see the keys on the Ubuntu Core IoT devices by running the following command:

cat ./.ssh/authorized_keys

How or what is the procedure of getting the new keys send down to the IoT devices?

waltinator avatar
it flag
Read `man -k inotify`. You can monitor a file/directory, and trigger a script/command when it changes. And read `man ssh-copy-id`.
user535733 avatar
cn flag
Does this answer your question? [Can't login to Ubuntu Core 16 using a second ssh key](https://askubuntu.com/questions/865334/cant-login-to-ubuntu-core-16-using-a-second-ssh-key). Note that there is no mechanism to *reload* ssh keys from Ubuntu One.
karel avatar
sa flag
Does this answer your question? [Can't login to Ubuntu Core 16 using a second ssh key](https://askubuntu.com/questions/865334/cant-login-to-ubuntu-core-16-using-a-second-ssh-key)
Score:0
cn flag

There is no mechanism to reload ssh keys from Ubuntu One. (Unless you reset/wipe-and-reinstall the system)

After you have access to your Ubuntu Core system, you place additional keys directly instead of via Ubuntu One. Append the new key to the /writable/user-data/username/.ssh/authorized_keys file.

  • NOTE that directory is different from every other flavor of Ubuntu. It applies to Ubuntu Core only.

Ubuntu One is merely a link in the chain of trust for the user's first login.

  • After a successful first login, the core system does NOT check with Ubuntu One again. It doesn't need to: It has a working key now.
  • There are alternatives to the Ubuntu One key download: Cloud-Init and System User Assertions. These methods, like the Ubuntu Core method, create new users and their associated keys. These methods also cannot be used to reset/update/reload keys of existing users.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.