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!
- Using a Mac and XCode as a Linux development platform -Via Hack a Day (overview-effect.com)
- X11-Fortran Problems (discussions.apple.com)
- Allow only specific IP to SSH to Linux server (itsystemsadmin.wordpress.com)
- Using a Mac and XCode as a Linux development platform (hackaday.com)
- Secure Shell (简体中文) (wiki.archlinux.org)
- testing facebook apps with ssh reverse tunnels (bitkickers.blogspot.com)
- Remote-Access Tools For Mobile Developers (news.dice.com)
- ssh from anywhere (max-michaels.blogspot.com)
- Secure Shell (Polski) (wiki.archlinux.org)