[Lxc-users] retrieve guest container's ip address

Marko Anastasov marko.anastasov at gmail.com
Sat Jan 5 12:11:33 UTC 2013


On Sat, Jan 5, 2013 at 1:03 PM, Alan McDuff <alan.mcduff at yahoo.com> wrote:

> Great, thank you, Marko. I had read the thread, but first it didn't make
> sense to me. From Stephanes last reply I found that this is all I need:
>
> user at host:~$ host guest1 10.0.3.1
> Using domain server:
> Name: 10.0.3.1
> Address: 10.0.3.1#53
> Aliases:
> guest0 has address 10.0.3.123
>
> I have one more question (not urgent, but making this work would be
> nice-to-have):
> Connecting using the hostname fails:
> >user at host:~$ ssh ubuntu at guest1
> >ssh: Could not resolve hostname guest1: Name or service not known
> Can you suggest what needs to be configured to make this work?
>
>
If you paste the .lxc part from
http://www.stgraber.org/2012/07/17/easily-ssh-to-your-containers-and-vms-on-ubuntu-12-04-lts/
into
your ~/.ssh/config and start the container, then you should be able to ssh
with "ssh ubuntu at guest1.lxc".

Marko
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20130105/b2891a97/attachment.html>


More information about the lxc-users mailing list