On Sat, Apr 22, 2017 at 6:52 PM, Dan Kegel <d...@kegel.com> wrote: > TL;dr: > > For Ubuntu 16.04 users who have lxd-2.0.9 from xenial-updates, > what is the fast path towards simple lxd container-on-the-lan happiness? > (Extra credit: allow ssh between the host and the guest, also part of > Things Just Working.) >
To SSH from the host to the guest, you can run the command cat ~/.ssh/id_rsa.pub | lxc exec mycontainer -- sudo --login --user ubuntu tee /home/ubuntu/.ssh/authorized_keys It pastes your SSH public key to the ~ubuntu/.ssh/authorized_keys file in the container, making sure the permissions are right. You would not be able to use 'ssh-copy-id' since the 'ubuntu' account in the container does not have a password. Simos > Long version: > > The issue > https://github.com/lxc/lxd/issues/1294 > was closed, but as far as I can tell, is still valid: > lxc users don't care about bridges, they just Want Things To Work. > And so the tutorials for setting up lxd containers that act like > they're on the LAN, e.g. > https://www.stgraber.org/2016/10/27/network-management-with-lxd-2-3/ > https://www.simpleprecision.com/ubuntu-16-04-lxd-networking-simple-bridge/ > leave them cold, leading to questions like > > http://stackoverflow.com/questions/41826430/how-to-setup-lxd-containers-that-communicate-over-the-lan > Note the length of the answer. Users who Just Want Things To Work > don't want to have to learn about bridges. I know, it's their loss, but > that's the way it is. This hinders adoption. > > (Docker probably has similar problems, but has wrappers like weave, > pipework, flannel, and socketplane to smooth things over for users, I hear.) > _______________________________________________ > lxc-users mailing list > lxc-users@lists.linuxcontainers.org > http://lists.linuxcontainers.org/listinfo/lxc-users _______________________________________________ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users