Installation guide
Generate a public key pair on the machine virt-manager is used. This example uses the
default key location, in the ~/.ssh/ directory.
$ ssh-keygen -t rsa
3. Co p in g t h e keys t o t h e remo t e h o st s
Remote login without a password, or with a passphrase, requires an SSH key to be
distributed to the systems being managed. Use the ssh-copy-id command to copy the key to
root user at the system address provided (in the example, root@example.com).
# ssh-copy-id -i ~/.ssh/id_rsa.pub root@example.com root@example.com's
password: Now try logging into the machine, with "ssh 'root@example.com'", and
check in: .ssh/authorized_keys to make sure we haven't added extra keys that
you weren't expecting
Repeat for other systems, as required.
4. O p t io n al: Ad d t h e p assp h rase t o t h e ssh - ag en t
Add the passphrase for the SSH key to the 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
The SSH key was added to the remote system.
T h e libvirt d aemo n ( libvirtd)
The 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
After 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.
Accessin g remo t e h o st s wit h virt - man ag er
Remote hosts can be managed with the virt-manager GUI tool. SSH keys must belong to the user
executing virt-manager for password-less login to work.
1. Start virt-manager.
2. Open the File->Add Co nn ect io n menu.
3. Input values for the hypervisor type, the connection, Connection->Remote tunnel over SSH,
and enter the desired hostname, then click connection.
23.2. Remot e management over T LS and SSL
You can manage virtual machines using TLS and SSL. TLS and SSL provides greater scalability but
is more complicated than ssh (see Section 23.1, “Remote management with SSH”). TLS and SSL is
Red Hat En t erp rise Lin ux 5 Virt ualizat ion Guid e
24 2