Accessing your remote machine with an X Server on your Windows machine might be some challenge. Here is the sequence you should check in order to get this running.
# vim /etc/ssh/sshd_config X11Forwarding yes X11DisplayOffset 10 X11UseLocalhost yes
$ echo $DISPLAY
This should return
$ localhost:10.0
If you don't get the correct display, restart sshd like so:
# /etc/init.d/ssh restart -d
Leave the terminal window open to check the debug messages. Connect with another terminal window over SSH and watch for the following error message: Failed to allocate internet-domain X11 display socket error
Apparently this is a bug in sshd:
Looks like the fix for CR 6684003 breaks sshd's ability to bind to a local socket for X forwarding. bind() returns EADDRNOTAVAIL for every bind call to ::1 for ports 6010->6999, but never tries IPv4 localhost addresses.
So apparently if you don't have an IPv6 interface, you get this error. There are two solutions:
Reconfigure who can start an X server:
# dpkg-reconfigure x11-common
This modifies /etc/X11/Xwrapper.config – This file has as setting called “allowed_users”. It can accept three values:
X11 Forwarding: http://aruljohn.com/info/x11forwarding/