cannot make ssh connection between host to container

MALATTAR mouhannad.alattar at univ-fcomte.fr
Fri Nov 12 07:15:56 PST 2010


Hi all,
I tried to make ssh connection between my host (ubuntu 10.10) and lxc 
(fedora 12) but i did not succeeded.
I am using lxc-start -n dora1 command to start the container and 
lxc-console -n dora1 to get a shell in it.
the configuration file of the container like this:
lxc.utsname = dora1
lxc.tty = 4
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = br-node1
lxc.network.name = eth0
lxc.network.mtu = 1500
lxc.network.ipv4 = 10.0.0.1/24
lxc.network.hwaddr = 12:DA:00:4B:54:45
lxc.rootfs = /lxc/rootfs.fedora
lxc.mount = /lxc/fstab.fedora
lxc.cgroup.devices.deny = a
# /dev/null and zero
lxc.cgroup.devices.allow = c 1:3 rwm
lxc.cgroup.devices.allow = c 1:5 rwm
# consoles
lxc.cgroup.devices.allow = c 5:1 rwm
lxc.cgroup.devices.allow = c 5:0 rwm
lxc.cgroup.devices.allow = c 4:0 rwm
lxc.cgroup.devices.allow = c 4:1 rwm
# /dev/{,u}random
lxc.cgroup.devices.allow = c 1:9 rwm
lxc.cgroup.devices.allow = c 1:8 rwm
# /dev/pts/* - pts namespaces are "coming soon"
lxc.cgroup.devices.allow = c 136:* rwm
lxc.cgroup.devices.allow = c 5:2 rwm
# rtc
lxc.cgroup.devices.allow = c 254:0 rwm
lxc.pts=1

I followed the tutorial at: 
http://www.ibm.com/developerworks/linux/library/l-lxc-containers/
in order to created a bridge between eth0 in my host and the container:
brctl addbr br-node1
ifconfig br-node1 "myHostIP" up
brctl addif br-node1 eth0
ifconfig eth0 0.0.0.0 promisc up

i read the discussion "Unable to SSH to the containers" in lxc-users 
mailing list.
But i did not arrive to make the connection.
Also making ssh localhost in a container shell will ask for a password 
but the shell will be freezed....and does not return any thing...
Any idea to solve this problem?
a+

-- 
MAlATTAR
Doctorant à L’UFR Sciences,Techniques et Gestion de l’Industrie





More information about the Containers mailing list