ssh-import-id kirkland

gh:dustinkirkland

$ lxc profile edit default

config: user.vendor-data: | #cloud-config users: - name: root ssh-import-id: gh:dustinkirkland shell: /bin/bash description: Default LXD profile devices: eth0: name: eth0 nictype: bridged parent: lxdbr0 type: nic name: default

$ lxc launch ubuntu:x Creating amazed-manatee Starting amazed-manatee

$ lxc list +----------------+---------+----------------------+----------------------------------------------+------------+-----------+ | NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS | +----------------+---------+----------------------+----------------------------------------------+------------+-----------+ | amazed-manatee | RUNNING | 10.163.22.135 (eth0) | fdce:be5e:b787:f7d2:216:3eff:fe1c:773 (eth0) | PERSISTENT | 0 | +----------------+---------+----------------------+----------------------------------------------+------------+-----------+

$ ssh ubuntu@10.163.22.135 $ ssh -6 ubuntu@fdce:be5e:b787:f7d2:216:3eff:fe1c:773

Just another reason why LXD is so awesome...You can easily configure your own cloud-init configuration into your LXD instance profile.In my case, I wantto automatically, to fetch my keys from Launchpad. Alternatively, I could useto fetch my keys from Github.Here's how!First, edit your default LXD profile (or any other, for that matter):Then, add the config snippet, like this:Save and quit in your interactive editor, and then launch a new instance:Find your instance's IP address:And now SSH in!Enjoy!:-Dustin