FWIW, I managed to make this work in the past with OpenSSH's control socket, so that every subsequent SSH connection could be opened and went through seamlessly. Daniel ------- Original Message ------- On Monday, March 6th, 2023 at 09:38, Victor Toso <victortoso@xxxxxxxxxx> wrote: > > > > Hi Thomas, > > On Thu, Mar 02, 2023 at 01:32:10PM +0000, Thomas Semmler wrote: > > > Hello everyone, > > > > I encountered a problem I can't make heads or tails of. I have > > a server running KVM/libvirt as a virtualization host. The > > virtual machines on this server are setup to use the spice > > protocol. When using the servers desktop environement I can use > > virt-manager or remmina to connect to the virtual machine's > > spice server(s) without a problem. The spice server is > > listening on localhost only. > > > > I wanted to connect from a remote client to the server via a > > ssh tunnel and then connect to spice over the tunnel. I tried > > with both virt- manager (which has an integrates ssh tunnel > > option) and remmina (which also has an integrated setting to > > create a tunnel) on the client to establish a connection, but > > it is not working as intended. > > > > While I can see a video output of the desktop, the video output > > does not resize to the window width and hight and none of the > > input methods are working. I can not send keypresses or mouse > > movements the the virtual machine on the server. > > > I've never tested this so I'm not sure how it should work. > > Every SPICE channel is a TCP socket that is established after the > initial handshake. IIRC, the first connection is kept for the > graphics (which you can use) but the connection of others seemed > to fail over your ssh tunnel. I'd guess the proxying over ssh > tunnel needs more tweaks. > > I see that oVirt has some how-to with this, perhaps that can be > helpful to you: > > https://ovirt-infra-docs.readthedocs.io/en/latest/Phoenix_Lab/Ssh_Spice_Tunnel/index.html > > > I started virt-manager on the client with the debug option > > (--dubug) and attached the resulting output, containing a few > > spice errors, to this email. > > > > In case you require more information please let me know. > > > > Thanks, > > Thomas > > > Cheers, > Victor