On 03/01/2013 08:27 PM, Shea Levy wrote:
Hi,
On boot, I'd like to pass a public key to the VM to use for root ssh
logins, and obviously only the user that started the VM on the host
should be able to send the key. What's the best way to pass this kind of
information into the VM?
You could probably use a "prepare" hook [1] and inject the key into the
VM disk image using a tool like libguestfs [2]. The problem with that
approach is that the hook script runs as root and you'd need to pass the
the host user details out of band, so that you inject the correct key.
[1]
http://www.libvirt.org/hooks.html
[2]
http://libguestfs.org
Best,
Hristo