I can SSH from laptop to server with private/public key like this:
$ ssh -i ~/.ssh/ed25519 [email protected] -p 22XX
My public key is on the SERVER in ~/.ssh/authorized_keys.
When I try virsh I cannot connect:
$ virsh -c qemu+ssh://[email protected]:22XX/system
error: failed to connect to the hypervisor
error: Cannot recv data: [email protected]: Permission denied (publickey).: Connection reset by peer
I changed PasswordAuthentication yes in sshd_config and am able to connect to SERVER with the above command.
But the problem is now I have SSH password authentication on my server that I don't want.
Here is the journalctl from LAPTOP attempting to connect without password:
$ journalctl --lines=100
Jan 25 18:06:05 arch polkitd[462]: Registered Authentication Agent for unix-process:1237:24897 (system bus name :1.52 [/usr/bin/pkttyagent --process 1237 --notify-fd 4 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8)
Jan 25 18:06:05 arch polkitd[462]: Unregistered Authentication Agent for unix-process:1237:24897 (system bus name :1.52, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
I don't have polkit.service running on either LAPTOP or SERVER. And I changed libvirtd_config to have auth_rw="none" and auth_ro="none" and I have qemu-ssh-block-agent package installed.
Please help.
I had a suggestion to use
ssh-agentwhich I had tried yesterday but wasn't successful. I rebooted the server and laptop retriedssh-agentand it was able to connect last night.For others: I ran it through my LAPTOP:
The only issue that remains is that from virt-manager GUI I still receive the same connection issue. So I have to start that with: