I have a Ubuntu 20.04 server where ssh X tunnelling has always worked, so that my colleagues can run programs like qgis et co using MobaXTerm on windows or just SSH -XC
(the few) on Linux.
The problem now it is no longer working with xclock telling me it can't open the display (and indeed I have nothing on echo $DISPLAY
)
If I understood correctly the (old) documentation on ServerGUI, there are two ways to get graphical applications forwarded on SSH:
- Use
xauth
on the host (server) and the actual X server on the client - Use a full yet minimal
xorg
+openbox
on the server I have tried both approaches but can't get it working. Also I do not understand the advantages of using one or the other (my machine has 128GB of RAM)
I already have set ForwardX11 yes
and ForwardX11Trusted yes
on /etc/ssh/ssh_config
and X11Forwarding yes
on /etc/ssh/sshd_config
(and played with both yes
and no
on
X11UseLocalhost
)
So, what am I missing to get back SSH X tunneling working ? Can be a problem of iptable firewall (but "normal" SSH works - albeit on a non standard 55000 port) ?
EDIT:
That seems to be related to having disabled IPV6 on /etc/sysctl.con
:
net.ipv6.conf.all.disable_ipv6=1
net.ipv6.conf.default.disable_ipv6=1
net.ipv6.conf.lo.disable_ipv6=1
I do not want however ipv6, somehow my IPS reports very large amount of data with ipv6 on and I haven't put any iptables rules on ipv6....
Is there a way to tell sshd to use ipv4 for tunnelling? I have tried adding AddressFamily inet
to /etc/ssh/sshd_config
but that doesn't work.