ssh: X11 Forwarding

Written by Benjamin Cane on 2011-08-09

One of the coolest uses of ssh I've had to use recently is the X11 forwarding. In my case I had a java application that opened up a GUI but I had to run it from a server that did not have a running graphical user environment as it was in init state 3.

The answer is far simpler than one would initially think. With the ssh client you are able to connect to a server and enable X11 forwarding. For me this meant I could connect to my server in init(3) via my local machine enabling X11 and launch the GUI.

To try it out yourself simply run

Once you login kick off a GUI tool like firefox.


Picture of Benjamin Cane

Benjamin's specialty is keeping the lights on for mission critical systems. He is currently building applications that enable high concurrency financial transactions.

Recently Benjamin published his first book; Red Hat Enterprise Linux Troubleshooting Guide. In addition to writing, he has several Open Source projects focused on making Ops easier. These projects include Automatron, a project enabling auto-healing infrastructure for the masses.


Publications

Identify, capture and resolve common issues faced by Red Hat Enterprise Linux administrators using best practices and advanced troubleshooting techniques

What people are saying:
Excellent, excellent resource for practical guidance on how to troubleshoot a wide variety of problems on Red Hat Linux. I particularly enjoyed how the author made sure to provide solid background and practical examples. I have a lot of experience on Red Hat but still came away with some great practical tools to add to my toolkit. - Amazon Review