When I do \"ssh -X abcserver\", I got message \"X11 forwarding request failed on channel 0\". I checked online and it was suggested to solve it by swit
ssh -X abcserver
X11 forwarding request failed on channel 0
I had to edit the sshd config file on the remote server to fix the issue. It worked on Ubuntu 16.04 Server:
$ sudo vim /etc/ssh/sshd_config
Set X11UseLocalhost no
X11UseLocalhost no
Save the file.
$ sudo service sshd restart
$ exit
Now it works!
ssh -X user@remotehost $ xclock