1

I have five x11vnc servers and all of them embed a ssh server.

The five servers have the same ssh and x11vnc configurations.

Since a couple of days, I cannot connect anymore to the x11vnc server of a single machine with Remmina (the fourth ones work correctly).

I use Remmina as VNC client with a ssh tunnel to secure the connection.

When opening the connection, the pop-up Connecting to [server] through ssh tunnel... remains indefinitely on the screen.

However, I do not face any problem if:

  • I do not use the ssh tunnel,
  • I manually ssh to the server,
  • I build a local ssh tunnel manually.

I cannot understand why it does not work anymore and why the 4 other servers run perfectly well.

Any idea?

Following the server's dmesg log when connecting (I replaced the username by username and the hostname (specified in my /etc/hosts file) by custom_hostname:

Jan 11 14:36:11 UC-79 sshd[4346]: Accepted publickey for username from 192.168.1.211 port 50068 ssh2: RSA SHA256:rMn
4ArMNfrLrFP53vdW5TrwpzHIm08xCqDQRJzqaW98
Jan 11 14:36:11 UC-79 sshd[4346]: pam_unix(sshd:session): session opened for user username by (uid=0)
Jan 11 14:36:11 UC-79 systemd: pam_unix(systemd-user:session): session opened for user username by (uid=0)
Jan 11 14:36:11 UC-79 systemd-logind[648]: New session 55 of user username.
Jan 11 14:36:12 UC-79 sshd[4423]: error: connect_to custom_hostname port 5900: failed.
jbaptperez
  • 656
  • 6
  • 20

1 Answers1

0

I found the reason of the crash when Remmina attempted to establish the ssh tunnel.

The problem was the hostname I manually set in the /etc/hosts files of both the client and the server.

Sometimes in my company, some IP addresses are reallocated (DHCP) and I have to manually update my hosts files with my custom hostnames. This time I missed an update and the same host name was pointing to a different IP (invalid at the server side), that's why the ssh process couldn't locally create the tunnel after establishing connection.

Fixing the IP address in the hosts file solved the problem!

I could find it by manually read ssh logs with the following command:

sudo /usr/sbin/sshd -d -p [custom-port]`

Then using a custom Remmina configuration using a ssh tunnel pointing to that debug ssh server.

jbaptperez
  • 656
  • 6
  • 20