X11 Forwarding

Have you ever had the need of firing up an application inside Linux box from another machine whether it be a Mac or Linux or Windows box?  When you think it’s impossible, think again!  It’s quite easy as long you have a running Linux box and the Linux box itself has a running SSH server.  On Windows, you need to use a terminal such as PuTTY to X11 Fowarding into your Linux box.  On Mac, you can just use your regular terminal.

When all requirements are met, all you have to do is firing up the terminal, type in the command line:  ssh -p your-port-number -X username@ip-address-of-the-server and hit enter key.  You should be able to X11 Forwarding into your Linux box!  You can replace the -X part with -Y for switching from untrusted connection to trusted connection.

Why going through all this trouble?  I see the need of using X11 Forwarding when you want to manage your Linux box from long distance, but you want to do it through the GUI way (that’s, graphical user interface).  For an example, you want to manage Firestarter (a GUI front end for managing IPFilter if I’m not wrong on this), you need to fire up its graphical user interface, and X11 Forwarding allows you to do just that.  Now, sometimes there are applications that Linux has but Windows and Mac don’t, you can use those applications’ GUIs by using X11 Forwarding.

Additional tips:  Make sure your SSH server’s configuration inside /etc/ssh/sshd_config allows the port that you are connecting to such as port 22.  Check the firewall to make sure it allows the port that your SSH server requires in order for a connection to be made.  On the machine that you are going to execute the X11 Forwarding command, make sure this very machine is allowing you to make an outgoing connection on the specific port that SSH server requires.  That’s, open up a required outgoing port on the machine that you will be executing the X11 Forwarding command.

Check the video below to see X11 Forwarding in action — that’s, if you don’t mind my broken English!

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.