Random tools I've found interesting
Ryan Harper
ryan.harper at canonical.com
Fri Mar 6 15:46:29 UTC 2020
On Thu, Mar 5, 2020 at 1:53 PM Bryce Harrington <
bryce.harrington at canonical.com> wrote:
> As followup to our retrospective, this past year I've found and played
> with several tools, that I thought might be worth show-and-telling
> about, and given our corona-sprint we're in will do so via email:
>
>
> == LXD Login ==
>
> I'm always looking for ways to improve my user experience with lxc
> containers. Logging in has always felt a bit baroque, so I've been
> scouring for simpler solutions. I found out that LXD supports
> 'aliases', and that you can construct a login alias, which works pretty
> good.
>
> $ lxc alias add login 'exec @ARGS@ --mode interactive -- bash -xac
> $@bryce - exec /bin/login -p -f '
>
If you're using system containers with networking, I very much like this
ssh config:
# /home/rharper/.ssh/config.defaults
Host *.lxd
User ubuntu
IdentityFile /home/rharper/.ssh/id_rsa
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
ProxyCommand nc $(lxc list -c s4 $(basename %h .lxd) | awk '/RUNNING/
{print $4}') %p
With an update to the lxd default profile:
(neipa) ~ % cat user-data.txt
#cloud-config
ssh_authorized_keys:
- ssh-rsa <snip>
(neipa) ~ % lxc profile set default user.user-data - < user-data.txt
(neipa) ~ % lxc launch ubuntu-daily:focal f2
Creating f2
Starting f2
(neipa) ~ % ssh f2.lxd
Warning: Permanently added 'f2.lxd' (ECDSA) to the list of known hosts.
<snip>
ubuntu at f2:~$
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-server/attachments/20200306/063f7ed3/attachment.html>
More information about the ubuntu-server
mailing list