On Sat, 02 Apr 2022 22:40:30 +0200 Linux-Fan <ma_sys...@web.de> wrote:
> Celejar writes: > > > Hi, > > > > I'm trying to use virt-manager / virt-viewer to access the console of > > some qemu / kvm virtual machines on a remote system over ssh. I have > > public key access to root@remote_system. When I do: > > > > virt-manager -c 'qemu+ssh://root@remote_system/system? > > keyfile=path_to_private_key' > > > > the connection to libvirt on the remote system comes up fine, and I can > > see the various VMs running there, but when I try to access a VM > > console (via the "Open" button or "Edit / Virtual Machine Details"), I > > get prompted for the password for "root@remote_system" (which doesn't > > even work, since password access is disabled in the ssh server > > configuration). > > What do you insert for `remote_system`? A hostname or an IP? A hostname (resolved via /etc/hosts on the client machine). > IIRC I once tried to use an IP address directly > (qemu+ssh://u...@192.168.yyy.yyy), and while it would perform the initial > connection successfully, subsequent actions would query me for > the password of (user@masysma-...) i.e. change from IP-address-based (which > was configured to use a key in .config/ssh) to hostname based (for which the > key was not specified in the config. I solved this by adding the hostname to > /etc/hosts and configuring SSH and my virt-manager connection to use the > hostnames rather than IP addresses. > > I also remember that I had to add the connection to my GUI user's .ssh/config > > AND my root user's .ssh/config. In my case, I am not specifying the keyfile > as part of the connection, though. Thanks. Celejar