Skip to content

Configuring LXC/LXD ssh keys on Ubuntu 16.04

Adding Authorized Keys to the LXD Default Profile is easy but not really! 🙂

Adding your key is as simple as:

$ lxc profile edit default

You will then need to modify the contents from:

config: {}


  user.user-data: |
     - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDPUdIskr4iSVZnPylV+5QsvHjoh63CbF1Q2bw3ptJZpa2x2UoMT7ikhaXiEVxfOavC4JPYgcPv3hzgZlM6PHfG3mm7vVyL/8CkYiFugjLyL8OQP/dyss7TzrQrE0px9Li+7OyMc3bF3z1SmjooZ1xWFS7QDYRNbb00dXyZ9jdT5H+H8Qt/IfNy7qLRluRCLDQ4VYD6kBjgMCQ+ZIqRiTaGtVLZIhwxenKIpPEfjNwDWFjsq8nEoM6CIsah79SnPnpaeM0
description: Default LXD profile

Where the ssh_authorized_key is your public key, probably identified by cat ~/.ssh/

Posted in Knowledge Base.

Tagged with , , .

0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

Some HTML is OK

or, reply to this post via trackback.