On 2/1/2011 11:05 PM, Daniel Lezcano wrote: > On 02/01/2011 12:16 AM, Gary Ballantyne wrote: >> Hi >> >> Would greatly appreciate any help getting the sshd template working on >> my Ubuntu 9.1 host. >> >> I can ssh to and from the container and host when the container is >> generated by: >> >> lxc-execute -n foo2 -f /usr/share/doc/lxc/examples/lxc/lxc-veth-gb.conf >> /bin/bash >> >> Here I have slightly modified the example conf file: >> >> # Container with network virtualized using a pre-configured bridge named >> br0 and >> # veth pair virtual network devices >> lxc.utsname = gb1 >> lxc.network.type = veth >> lxc.network.flags = up >> lxc.network.link = br0 >> lxc.network.ipv4 = 10.89.233.15/24 >> >> Also, I can create a sshd template using "./lxc-sshd create" (ip = >> 10.89.233.13/24). > > What version of lxc are you using ?
Sorry, stupid thing to leave out: 0.6.3-1 (installed with apt-get). >> However, the container doesn't appear to start (or, at least, persist) >> with the suggested command: >> >> # lxc-execute -n sshd /usr/sbin/sshd& >> [1] 7612 >> # lxc-info -n sshd 'sshd' is STOPPED >> [1]+ Exit 139 lxc-execute -n sshd /usr/sbin/sshd >> >> But, I can start the container with: >> >> # lxc-start -n sshd& >> [1] 7623 >> # lxc-info -n sshd >> 'sshd' is RUNNING >> >> And I can ping the container: >> >> root@haulashore1:/usr/share/doc/lxc/examples# ping 10.89.233.13 >> PING 10.89.233.13 (10.89.233.13) 56(84) bytes of data. >> 64 bytes from 10.89.233.13: icmp_seq=1 ttl=64 time=9.81 ms >> 64 bytes from 10.89.233.13: icmp_seq=2 ttl=64 time=0.049 ms >> >> But, I can't ssh to the container: >> >> # ssh 10.89.233.13 >> ssh: connect to host 10.89.233.13 port 22: Connection refused > > What is the output of lxc-ps --lxc ? # lxc-start -n sshd & [1] 8727 # lxc-ps --lxc CONTAINER PID TTY TIME CMD sshd 8728 ? 00:00:00 init >> (And, I can't connect with lxc-console) >> >> # lxc-console -n sshd >> lxc-console: failed to connect to the tty service > > Yeah, with the sshd template you can't because there is only the sshd > daemon running inside, no mingetty respawned by an init process and the > console configuration is not set for this template. > ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users