SSH X11 forwarding and IPv6

Moderator: cah

Post Reply
cah
General of the Army / Fleet Admiral / General of the Air Force
General of the Army / Fleet Admiral / General of the Air Force
Posts: 1342
Joined: Sun Aug 17, 2008 5:05 am

SSH X11 forwarding and IPv6

Post by cah »

When I was trying to forward X11 traffic, I found the server was complaining unable to open display.

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
After changing them to

Code: Select all

net.ipv6.conf.all.disable_ipv6 = 0
net.ipv6.conf.default.disable_ipv6 = 0
and "sysctl -p" reads the file and IPv6/inet6 was back on NICs. After that, .Xauthority can be created and X11 forwarding works again.
CAH, The Great
Post Reply