[libvirt-users] lxc--sshd

Brandon Foster brandon.foster at liferay.com
Fri Mar 1 00:36:03 UTC 2013


I was actually able to get ssh to work from the container but using
the full path of the command /usr/bin/ssh, and after I did that i was
able to ssh to the container, but after i logged in it closed the
connection

any ideas?

I found in another thread that I am supposed to set a $Path for my
container, but it wasnt fully explained. I assume this is why it
wouldnt read the ssh command without the full path, could someone give
me an example of where and how to set that?

On Thu, Feb 28, 2013 at 3:08 PM, Brandon Foster
<brandon.foster at liferay.com> wrote:
> Hey all,
> I am new to libvirt lxc and am trying to get a container that i can
> ssh to. So far i've booted up a container and gave it an Ip address,
> it can ping out and I can ping it but I cannot get ssh to work.
> When i try to run an ssh command inside the container I get a command
> not found error. here is my xml file
>
> <domain type='lxc'>
>   <name>helloworld</name>
>   <memory>102400</memory>
>   <os>
>     <type>exe</type>
>     <init>/bin/sh</init>
>   </os>
> <devices>
> <console type='pty'/>
> <filesystem type='mount'>
>    <source dir='/export/helloworld/config'/>
>    <target dir='/etc/httpd'/>
> </filesystem>
> <filesystem type='mount'>
>    <source dir='/export/helloworld/data'/>
>    <target dir='/var/www'/>
> </filesystem>
> <interface type='bridge'>
>       <mac address='52:54:00:5e:02:45'/>
>       <source bridge='br0'/>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x03'
> function='0x0'/>
>        <model type='virtio' />
> </interface>
> </devices>
> </domain>
>
> I havent restricted it with busybox for simplicity thinking it was
> because I wasn't allowing it access to necessary ssh files, but Im not
> sure what I am missing now.
>
> surely someone has done this before.
>
> thanks
> --
> Brandon Foster
> Infrastructure Administrator
>
> Liferay, Inc.
> Enterprise. Open Source. For life.



--
Brandon Foster
Infrastructure Administrator

Liferay, Inc.
Enterprise. Open Source. For life.




More information about the libvirt-users mailing list