You are not logged in.

#1 2022-11-08 09:16:38

Grigorios
Member
Registered: 2021-01-10
Posts: 23

[SOLVED] virt-manager ignores ssh-agent

Hello,

I have a QEMU/KVM hypervisor running on a remote server.
I use the libvirt tool virt-manager.
I added the remote connection via ssh.
My ssh key is in the authorized keys file of my user on the remote machine and during shell startup on my local machine, I have set up keychain to ask for my ssh key password and store it.
I recently changed from X11/dwm to Wayland/Sway and now the virt-manager is ignoring the already stored ssh key. I kept being asked for my ssh keys passphrase, which I have already added to my ssh agent via keychain. I have to enter my passphrase a dozen time, before I can use the spice viewer built into virt-manager.
Also, when I start virt-manager initially, I am being prompted for my ssh keys passphrase, even thought it is already added.
I confirmed that by checking whether the ssh agent knows about my key with

$ssh-add -L

Also, I can just fine connect to my remote hypervisor via ssh when I am in a shell, without being prompted for my ssh keys passphrase
It previously worked, and the only big change I made was switching to Wayland.

Does anyone have an idea what could be the problem?

Sincerely

Grigorios

Update:
It turns out that change to Wayland was indeed the problem. I was running my keychain command in my .zshrc and with how Wayland works (as far as I understand) what I do in my terminal emulator, is not affecting my other applications like libvirt/virt-manager. Therefore, I took another approach, instead of the keychain command in my .zshrc I followed the wiki wiki and now make systemd start my ssh-agent and I decrpyt my ssh passphrase with systemd-user-pam-ssh. However, I am thinking about migrating completely to the pam_ssh project.

Last edited by Grigorios (2022-11-11 12:33:45)

Offline

#2 2022-11-08 13:54:54

Grigorios
Member
Registered: 2021-01-10
Posts: 23

Re: [SOLVED] virt-manager ignores ssh-agent

This topic can be marked as solved. I don't want to delete it, so other people may can find some help.
Also, I think about extending the keychain article soon with this information, for people migrating to Wayland.

Offline

#3 2022-11-08 15:57:40

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,772

Re: [SOLVED] virt-manager ignores ssh-agent

Edit your first post in the thread.  Editing that post gives you the option to edit the title.  Prepend [SOLVED] tot he title.
We ask that you do that as we don't know when something is truly solved for you.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB