[Lxc-users] Unable to SSH to the containers.
Kumar L Srikanth-B22348
B22348 at freescale.com
Tue Feb 9 11:03:45 UTC 2010
Hi Daniel,
Sorry for the delay while replying.
I am able to SSH from container to Host machine, but not able to do the
same from Host to container.
Please find the requested information below.
[root at localhost ~]# ifconfig
br0 Link encap:Ethernet HWaddr 00:50:BF:27:AA:60
inet addr:172.16.1.10 Bcast:172.16.1.255 Mask:255.255.255.0
inet6 addr: fe80::250:bfff:fe27:aa60/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:32 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:3501 (3.4 KiB)
eth0 Link encap:Ethernet HWaddr 00:50:BF:27:AA:60
inet6 addr: fe80::250:bfff:fe27:aa60/64 Scope:Link
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:72 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:6709 (6.5 KiB)
Interrupt:21 Base address:0x1140
eth1 Link encap:Ethernet HWaddr 00:16:76:4B:91:DC
inet addr:192.168.1.10 Bcast:192.168.1.255
Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
eth2 Link encap:Ethernet HWaddr 00:11:95:FC:8D:62
inet addr:10.232.113.80 Bcast:10.232.113.255
Mask:255.255.254.0
inet6 addr: fe80::211:95ff:fefc:8d62/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:211053 errors:0 dropped:0 overruns:0 frame:0
TX packets:29512 errors:15 dropped:0 overruns:0 carrier:15
collisions:5347 txqueuelen:1000
RX bytes:35973925 (34.3 MiB) TX bytes:4844805 (4.6 MiB)
Interrupt:22 Base address:0x6000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:28747 errors:0 dropped:0 overruns:0 frame:0
TX packets:28747 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4244853 (4.0 MiB) TX bytes:4244853 (4.0 MiB)
veth0_28444 Link encap:Ethernet HWaddr 7A:58:90:CF:A4:33
inet6 addr: fe80::7858:90ff:fecf:a433/64 Scope:Link
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
RX packets:6 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:384 (384.0 b) TX bytes:384 (384.0 b)
[root at localhost ~]# brctl show
bridge name bridge id STP enabled interfaces
br0 8000.0050bf27aa60 no eth0
veth0_28444
Regards,
Srikanth.
-----Original Message-----
From: Daniel Lezcano [mailto:daniel.lezcano at free.fr]
Sent: Friday, February 05, 2010 6:55 PM
To: Kumar L Srikanth-B22348
Cc: lxc-users at lists.sourceforge.net
Subject: Re: [Lxc-users] Unable to SSH to the containers.
Kumar L Srikanth-B22348 wrote:
>
>
> -----Original Message-----
> From: Daniel Lezcano [mailto:daniel.lezcano at free.fr]
> Sent: Friday, February 05, 2010 5:51 PM
> To: Kumar L Srikanth-B22348
> Cc: lxc-users at lists.sourceforge.net
> Subject: Re: [Lxc-users] Unable to SSH to the containers.
>
> Kumar L Srikanth-B22348 wrote:
>
>>
>> Hi Daniel,
>> Please see my inline comments.
>>
>> Regards,
>> Srikanth
>>
>> -----Original Message-----
>> From: Daniel Lezcano [mailto:daniel.lezcano at free.fr]
>> Sent: Friday, February 05, 2010 5:40 PM
>> To: Kumar L Srikanth-B22348
>> Cc: lxc-users at lists.sourceforge.net
>> Subject: Re: [Lxc-users] Unable to SSH to the containers.
>>
>> Kumar L Srikanth-B22348 wrote:
>>
>>
>>> My lxc version is 0.6.3.
>>>
>>>
>>>
>> Ok.
>>
>> I suppose you tried with lxc-ssh script to create the container,
>> right
>>
> ?
>
>> Srikanth>> Yes, with lxc-sshd script.
>>
>> You should try:
>>
>> lxc-execute -n cont1 /bin/bash
>> /usr/sbin/sshd
>> Srikanth>> You mean to execute the following command: "lxc-execute -n
>> cont1 /bin/bash /usr/sbin/sshd" ?
>> No, I meant get a shell in a container and from this shell launch
>>
> sshd.
> Srikanth>> I am doing the same. First, I am starting container using
> "lxc-start -n container1 /bin/bash". I got a bash shell, from there I
> am executing the command "/usr/sbin/sshd &". After that, I am
> executing "lxc-netstat -n container1 -tano" and on port 22, I am able
> to see that sshd is running. I am following the above process for both
> the containers. But still, I am unable to SSH into other container.
>
You should use lxc-execute, this one will mount /proc and more.
lxc-start is to launch /sbin/init
Please can you provide after launching both container:
- the result of ifconfig on the host
- the result of 'brctl show"
------------------------------------------------------------------------
------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the
business Choose flexible plans and management services without long-term
contracts Personal 24x7 support from experience hosting pros just a
phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Lxc-users mailing list
Lxc-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users
More information about the lxc-users
mailing list