VNC server closed connection

Gary Dale <[email protected]> Sun, 11 Sep 2022 12:06:07 -0400
Newsgroups gmane.network.tight-vnc.general
Message-ID <[email protected]>
I'm running Debian/Bookworm on an AMD64 system.

I'm trying to do what I have been doing for years - connect to a remote 
tightvnc server through a Debian server using ssh port forwarding. 
What's different is I want to connect now to my Linux workstation 
instead of a Windows desktop.

In one shell I run
     ssh <remote Debian server's external address> -L <local 
port>:<remote vnc server local address>:<remote vnc port>

The <remote Debian server's external address> is the WAN address of the 
router, which forwards the ssh port to the Debian server.

To connect to a Windows desktop, the <remote VNC port> would be 5900 but 
on the Linux machine it is 5901. I set the <local port> to 5902 or 5903 
to prevent potential conflicts with local services. The <remote vnc 
server local address> is something like 192.168.x.x depending on which 
remote desktop I want to connect to. I do the same thing but with port 
3389 if I want to connect using RDP instead of VNC (for when the remote 
monitor is off - a "feature" of Windows 10).

In a second shell I run
     vncviewer localhost:<local port>

While this works with the Windows VNC servers, even it it only gives me 
a black screen if their monitor is off, on the Linux machine I get the 
message "VNC server closed connection" returned immediately. This is the 
same message that I'd get, although after some delay, if the remote 
Windows machine wasn't running.

On my Linux workstation I see:
$ ps aux | grep vnc
garydale    9959  0.0  0.0   9932  7176 pts/3    S    Sep10   0:07 
Xtightvnc :1 -desktop X -auth /home/garydale/.Xauthority -geometry 
1024x768 -depth 24 -rfbwait 120000 -rfbauth /home/garydale/.vnc/passwd 
-rfbport 5901 -co /etc/X11/rgb
garydale   42302  0.0  0.0  11384  1780 pts/2    S+   11:47   0:00 grep vnc

which confirms that the server is running and listening on port 5901.

My first thought was that the workstation's firewall (ufw) was stopping 
the connection, but disabling the firewall didn't change anything. 
Running ip addr confirms that I am trying to connect to the correct 
(internal) address.

Any ideas on what I'm doing wrong. I'm going on a brief trip and I need 
to this working.

Thanks.




___________________________________________________________
TightVNC mailing list, [email protected]
To change your subscription or to UNSUBSCRIBE, please visit
https://lists.sourceforge.net/lists/listinfo/vnc-tight-list