On your Windows machine:
  1. Make sure you have the openssh package installed.
  2. Launch Cygwin/X
  3. Ensure the DISPLAY environment variable is set correctly. (This step is not neccessary if you are entering your commands into an X terminal, as DISPLAY must already be set in that case)

  4. $ export DISPLAY=:0.0
  5. Run the ssh command to connect to the remote host:

  6. $ ssh -Y username@remote_hostname_or_ip_address
  7. Enter your password when prompted by ssh.
  8. Your ssh session should now show you a shell prompt for your remote machine.

  9. Note: The ssh server will automatically set the DISPLAY environment variable appropriately, typically to something like localhost:10.0, so clients will connect to a proxy X11 display on the remote host from which the X11 protocol will be forwarded over ssh to your X server.

    If your login scripts unconditionally set DISPLAY to something else, this will break X11 forwarding.
  10. You can now launch remote X clients in your ssh session, for example, xterm& will launch an xterm running on your remote host that will display on your Cygwin/X screen.
  11. Launch other remote clients in the same manner. I recommend starting the remote clients in the background, by appending & to the command name, so that you don't have to open several ssh sessions.

  12. Note: By default, the OpenSSH server does not allow forwarded X connections. This must be configured on the remote host by adding X11Forwarding yes to the sshd_config configuration file. The OpenSSH server must be restarted or SIGHUP'ed to re-read the configuration file after it is changed.

    Note: The OpenSSH server requires the xauth command to be available to forward X connections. Consequently, it must be installed on the remote host.