X11 forwarding does not work on all machines
While debugging this MATLAB container I found out that not all of the machines are able to do X11 forwarding:
$ for host_no in `seq -s " " -f %02g 1 15`; do ssh -X khoeflich@scalc${host_no}.geomar.de uname -a; done
Linux scalc01 5.7.1-1.el8.elrepo.x86_64 #1 SMP Fri Jun 5 12:27:05 EDT 2020 x86_64 x86_64 x86_64 GNU/Linux
Linux scalc02 5.7.1-1.el8.elrepo.x86_64 #1 SMP Fri Jun 5 12:27:05 EDT 2020 x86_64 x86_64 x86_64 GNU/Linux
Linux scalc03 5.7.1-1.el8.elrepo.x86_64 #1 SMP Fri Jun 5 12:27:05 EDT 2020 x86_64 x86_64 x86_64 GNU/Linux
Linux scalc04 5.7.1-1.el8.elrepo.x86_64 #1 SMP Fri Jun 5 12:27:05 EDT 2020 x86_64 x86_64 x86_64 GNU/Linux
X11 forwarding request failed on channel 0
Linux scalc05 5.6.10-1.el8.elrepo.x86_64 #1 SMP Sat May 2 12:37:49 EDT 2020 x86_64 x86_64 x86_64 GNU/Linux
X11 forwarding request failed on channel 0
Linux scalc06 5.7.8-1.el8.elrepo.x86_64 #1 SMP Tue Jul 7 18:26:28 EDT 2020 x86_64 x86_64 x86_64 GNU/Linux
X11 forwarding request failed on channel 0
Linux scalc07 5.7.8-1.el8.elrepo.x86_64 #1 SMP Tue Jul 7 18:26:28 EDT 2020 x86_64 x86_64 x86_64 GNU/Linux
X11 forwarding request failed on channel 0
Linux scalc08 5.7.8-1.el8.elrepo.x86_64 #1 SMP Tue Jul 7 18:26:28 EDT 2020 x86_64 x86_64 x86_64 GNU/Linux
X11 forwarding request failed on channel 0
Linux scalc09 5.7.8-1.el8.elrepo.x86_64 #1 SMP Tue Jul 7 18:26:28 EDT 2020 x86_64 x86_64 x86_64 GNU/Linux
X11 forwarding request failed on channel 0
Linux scalc10 5.7.8-1.el8.elrepo.x86_64 #1 SMP Tue Jul 7 18:26:28 EDT 2020 x86_64 x86_64 x86_64 GNU/Linux
X11 forwarding request failed on channel 0
Linux scalc11 5.7.8-1.el8.elrepo.x86_64 #1 SMP Tue Jul 7 18:26:28 EDT 2020 x86_64 x86_64 x86_64 GNU/Linux
X11 forwarding request failed on channel 0
Linux scalc12 5.7.8-1.el8.elrepo.x86_64 #1 SMP Tue Jul 7 18:26:28 EDT 2020 x86_64 x86_64 x86_64 GNU/Linux
X11 forwarding request failed on channel 0
Linux scalc13 5.6.10-1.el8.elrepo.x86_64 #1 SMP Sat May 2 12:37:49 EDT 2020 x86_64 x86_64 x86_64 GNU/Linux
X11 forwarding request failed on channel 0
Linux scalc14 5.7.8-1.el8.elrepo.x86_64 #1 SMP Tue Jul 7 18:26:28 EDT 2020 x86_64 x86_64 x86_64 GNU/Linux
X11 forwarding request failed on channel 0
Linux scalc15 5.7.8-1.el8.elrepo.x86_64 #1 SMP Tue Jul 7 18:26:28 EDT 2020 x86_64 x86_64 x86_64 GNU/Linux
$ for host_no in `seq -s " " -f %02g 1 3`; do ssh -X khoeflich@scalcg${host_no}.geomar.de uname -a; done
X11 forwarding request failed on channel 0
Linux scalcg01.geomar.de 4.18.0-193.6.3.el8_2.x86_64 #1 SMP Wed Jun 10 11:09:32 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
X11 forwarding request failed on channel 0
Linux scalcg02.geomar.de 4.18.0-193.6.3.el8_2.x86_64 #1 SMP Wed Jun 10 11:09:32 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
X11 forwarding request failed on channel 0
Linux scalcg03.geomar.de 4.18.0-193.6.3.el8_2.x86_64 #1 SMP Wed Jun 10 11:09:32 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
$ ssh -X khoeflich@ursus7.geomar.de uname -a
Linux ursus7.geomar.de 3.10.0-1127.13.1.el7.x86_64 #1 SMP Tue Jun 23 15:46:38 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Apparently, it works only correctly on scalc01..04
and ursus7
. I suppose, from the above output (i.e. the kernel release and version information) that this is caused by different system configurations deployed to the hosts?
While X forwarding is very slow and should probably be avoided, I would still strongly favor to resolve this. I was very confused during testing of the above mentioned container and it took me a bit to realise that the root problem was not on the container, but on the host system side.