1.1 Modify /etc/ssh/sshd_config and set:
X11Forwarding yes
1.2 Restart sshd:
[pkw@server1 ~]$ sudo systemctl restart sshd
1.3 Check whether xauth/xclock are available
[pkw@server1 ~]# which xauth xclock
/usr/bin/which: no xauth in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
/usr/bin/which: no xclock in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
Install missing pacakges, for Centos7 it is:
[pkw@server1 ~]# sudo yum install -y xorg-x11-xauth xorg-x11-apps
(for other distributions, use your favourite package manager)
2.1 Install Xming X Server for Windows
2.2 Run Xming
3.1 In Connection->SSH->X11 check "Enable X11 forwarding"
3.2 Log into remote host as non-root user
3.3 Check if DISPLAY is set and xclock works
[pkw@server1 ~]$ echo $DISPLAY
localhost:10.0
[pkw@server1 ~]$ xclock
In case you can't directly log into user account (e.g. root login over ssh disabled)
4.1 Get authorization string of a logged user
[pkw@server1 ~]$ xauth list
server1/unix:10 MIT-MAGIC-COOKIE-1 28726720a84442cff2e9eaac22945aa8
4.2 Switch to other user
[pkw@server1 ~]$ sudo su - root
[root@server1 ~]# export DISPLAY=localhost:10.0
[root@server1 ~]# xauth add server1/unix:10 MIT-MAGIC-COOKIE-1 28726720a84442cff2e9eaac22945aa8
4.3 Run test app
[root@server1 ~]# xclock