When you disable IPV6, the X11 forwarding will stop working.
Disable IPV6:
vi /etc/sysctl.conf (and add the following 2 lines at the bottom)
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
Type “sysctl -p” to activate it.
Now you cannot use X11 forwarding anymore. To solve it, change the following lines ( or add them ) in the file:
vi /etc/ssh/sshd_config
AddressFamily inet
ListenAddress 0.0.0.0
X11UseLocalhost yes
Now restart sshd and change the DISPLAY setting.
systemctl start sshd.service
export DISPLAY localhost:10.0

Views: 975