[libvirt] virsh + ssh

Hi, connecting to a remote server using qemu+ssh is always done with root user. The problem we face is that we don't allow root connection for ssh. Would it be possible to launch sudo on the remote server so we could connect with the console user? Regards -- Daniel

On 01/01/2011 03:38 AM, Daniel Huhardeaux wrote:
Hi,
connecting to a remote server using qemu+ssh is always done with root user. The problem we face is that we don't allow root connection for ssh.
I haven't tried, but it seems to me like you should be able to do qemu+ssh://user@remote/system in order to connect as user instead of root. Also, as documented in http://libvirt.org/drvqemu.html, you can modify /etc/libvirt/qemu.conf on the remote machine in order to affect which uid and gid will be used for qemu processes, and the corresponding impacts that has on what must be made accessible to a given user. But once you have another user (such as qemu:qemu) configured to be able to start a qemu VM locally, then it seems like a remote ssh connection to that user should work. I'm not a fan of the idea of adding a sudo invocation on the remote side, and hope that we can find a way to resolve your real issue (connecting as non-root) without having to throw sudo into the mix. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

On 01/01/2011, at 9:38 PM, Daniel Huhardeaux wrote:
Hi,
connecting to a remote server using qemu+ssh is always done with root user. The problem we face is that we don't allow root connection for ssh.
Would it be possible to launch sudo on the remote server so we could connect with the console user?
Hi Daniel, It's also possible to allow non root users to connect to libvirt via SSH. There's a wiki page with detailed info here: http://wiki.libvirt.org/page/SSHSetup Does that help? :) Regards and best wishes, Justin Clift
participants (3)
-
Daniel Huhardeaux
-
Eric Blake
-
Justin Clift