I checked sshd_config and it has "X11Forwarding yes" as expected. No .Xauthority could be created. I compared with a server that clones this server and all configurations are identical.
Searching online for a while and saw some people mentioned IPv6 must be set to get this to work (https://bugzilla.redhat.com/show_bug.cgi?id=1173052). Then, I realized I turned off IPv6 on NICs per project team's request.
I had the following lines in /etc/sysctl.conf:
Code: Select all
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
Code: Select all
net.ipv6.conf.all.disable_ipv6 = 0
net.ipv6.conf.default.disable_ipv6 = 0