I'm unable to log onto the remote machine. The client always outputs "The connection was dropped by the server before the session could be established." So I checked the server status and found a strange output as described below:
When I run this command, there is always a line starting with "Until: ...". What is this telling me ? From the timestamp I suspect a kind of timeout so that remote logging in is blocked:
machine1:/etc # systemctl status xvnc.socket
● xvnc.socket - Xvnc Server
Loaded: loaded (/usr/lib/systemd/system/xvnc.socket; enabled; preset: disabled)
Active: active (listening) since Thu 2023-02-16 16:50:37 CET; 16min ago
Until: Thu 2023-02-16 16:50:37 CET; 16min ago
Listen: [::]:5901 (Stream)
Accepted: 19; Connected: 0;
Tasks: 0 (limit: 4915)
CPU: 4ms
CGroup: /system.slice/xvnc.socket
Feb 16 16:50:37 notebook3 systemd[1]: Closed Xvnc Server.
Feb 16 16:50:37 notebook3 systemd[1]: Stopping Xvnc Server...
Feb 16 16:50:37 notebook3 systemd[1]: Listening on Xvnc Server.