This is fairly simple stuff but it took me 15 minutes to solve because i was missing a package 🙁 So i thought i would write a quick article here we go X11 forwarding with ssh. This should work on any Linux distribution unless ssh has been built without the support for X forwarding. Which as far as i know is uncommon.
1. Install xauth with your package manager for ubuntu/debian do
aptitude install xauth
2. Edit the sshd_config on the server you want to start the X program from
3. Add the following to your sshd_config file on the server
4. Restart the ssh server
5. Edit the ssh_config on the client (this could also be in your home directory under .ssh/config)
6. Add the following to your ssh_config file on the client
7. Connect to the server with ssh
8. You can also use
ssh -X user@host Which switches on X Forwarding for the single connection. We don’t need this option because we set it permanently in the ssh_config on the client.