As usual, before we begin make sure that your operating system is updated.
sudo apt-get update sudo apt-get upgrade
Next you will need to install xauth, which is required for X to authenticate through the SSH session. to do that use the following command:
sudo apt-get install xauth
That’s it. Next we will need to install a software that can install and run an X server on Windows. In this tutorial we will use Cygwin/X (check this tutorial to see how Cygwin/X can be installed).
Once the program is installed and started you can connect to your server server using:
ssh -X email@example.com
where “111.222.333.444” will be your server actual IP address or a domain name.
Connecting from a Windows machine will depend on what software you have chosen.
To test if everything works ok we will install a simple and small graphic application on the server:
sudo apt-get install x11-apps
and start the program with: