<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 5, 2020 at 1:53 PM Bryce Harrington <<a href="mailto:bryce.harrington@canonical.com" target="_blank">bryce.harrington@canonical.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">As followup to our retrospective, this past year I've found and played<br>
with several tools, that I thought might be worth show-and-telling<br>
about, and given our corona-sprint we're in will do so via email:<br>
<br><br>
== LXD Login ==<br>
<br>
I'm always looking for ways to improve my user experience with lxc<br>
containers.  Logging in has always felt a bit baroque, so I've been<br>
scouring for simpler solutions.  I found out that LXD supports<br>
'aliases', and that you can construct a login alias, which works pretty<br>
good.<br>
<br>
  $ lxc alias add login 'exec @ARGS@ --mode interactive -- bash -xac $@bryce - exec /bin/login -p -f '<br></blockquote><div><br></div><div>If you're using system containers with networking, I very much like this ssh config:</div><div><br></div><div># /home/rharper/.ssh/config.defaults<br>Host *.lxd<br>    User ubuntu<br>    IdentityFile /home/rharper/.ssh/id_rsa<br>    StrictHostKeyChecking no<br>    UserKnownHostsFile /dev/null<br>    ProxyCommand nc $(lxc list -c s4 $(basename %h .lxd) | awk '/RUNNING/ {print $4}') %p<br></div><div><br></div><div>With an update to the lxd default profile:</div><div><br></div><div>(neipa) ~ % cat user-data.txt</div><div>#cloud-config<br></div><div>ssh_authorized_keys:<br>- ssh-rsa  <snip></div><div>(neipa) ~ % lxc profile set default user.user-data - < user-data.txt<br></div><div>(neipa) ~ % lxc launch ubuntu-daily:focal f2<br></div>Creating f2<br>Starting f2</div><div class="gmail_quote">(neipa) ~ % ssh f2.lxd <br>Warning: Permanently added 'f2.lxd' (ECDSA) to the list of known hosts.</div><div class="gmail_quote"><snip></div><div class="gmail_quote">ubuntu@f2:~$<br></div><div class="gmail_quote"><br></div><div class="gmail_quote"></div></div>