ssh
or TLS and SSL.
libvirt
management connection securely tunneled over an SSH connection to manage the remote machines. All the authentication is done using SSH public key cryptography and passwords or passphrases gathered by your local SSH agent. In addition the VNC console for each guest virtual machine is tunneled over SSH.
virt-manager
virt-manager
must run as the user who owns the keys to connect to the remote host. That means, if the remote systems are managed by a non-root user virt-manager
must be run in unprivileged mode. If the remote systems are managed by the local root user then the SSH keys must be owned and created by root.
virt-manager
.
Optional: Changing user
$ su -
Generating the SSH key pair
virt-manager
is used. This example uses the default key location, in the ~/.ssh/
directory.
$ ssh-keygen -t rsa
Copying the keys to the remote hosts
ssh-copy-id
command to copy the key to root user at the system address provided (in the example, [email protected]
).
$ ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected] [email protected]'s password:
ssh [email protected]
command and check in the .ssh/authorized_keys
file to make sure unexpected keys have not been added.
Optional: Add the passphrase to the ssh-agent
ssh-agent
, if required. On the local host, use the following command to add the passphrase (if there was one) to enable password-less login.
# ssh-add ~/.ssh/id_rsa.pub
libvirt
daemon (libvirtd
)libvirt
daemon provide an interface for managing virtual machines. You must have the libvirtd
daemon installed and running on every remote host that needs managing.
$ ssh root@somehost
# chkconfig libvirtd on
# service libvirtd start
libvirtd
and SSH are configured you should be able to remotely access and manage your virtual machines. You should also be able to access your guests with VNC
at this point.