Note: I am running Ubuntu 6.06 (Dapper Drake) LTS

I recently set up my desktop computer in Toronto to accept SSH connections, and opened the port (22) on my router so that I could remotely manage my computer whenever I go back to Peterborough. I played around with port tunneling too, which basically tunnels any TCP connection through the SSH connection (meaning it is encrypted, protecting it from snooping). But the really fun part was forwarding my X apps through to my Windows computer in Peterborough.

The first thing I had to do was make sure X11 forwarding was setup on my Linux box (btw, this box is named Ophelia). So I SSHd into Ophelia and modified the file /etc/ssh/sshd_config to make sure the value X11Forwarding was set to yes and X11DisplayOffset was set to 10. This allows SSH connections to Ophelia to use their own X server to display graphical programs.

On Windows however there is no X server. This meant I had to install one, in this case I used Xming. So I installed Xming to my Windows computer and launched the program (it places a small X icon in your taskbar). Now the X server is setup to receive display requests; note that on Windows, the X display is always (as far as I know) 0.

I already had PuTTy setup on my Windows box, as this is what I was using to SSH into Ophelia in the first place. To activate X11 forwarding, all I have to do is load the connection settings and in the left node-tree, expand the X11 Forwarding node, enter “localhost:0″ into the X display location (as in display 0 on the Windows box), then I logged into Ophelia normally through SSH.

Once I was logged in, I could start any X application like gedit or matlab, and the program would launch in a new window as if it was running natively on my Windows box. Performance wasn’t so great seeing as I was seeding several torrents and this was across the internet between cities, but it was neat nonetheless. This would certainly be pretty cool/useful on a LAN as a secure alternative for VNC, which instead makes the entire desktop available over the network.

p.s. I wish I had taken some screenshots to show you, but oh well =/

Update: Consequently, its fairly easy to do this using a Linux machine to do the remote login:

ssh -X user@host

About This Entry

Related Tags

2007, Computer, Linux

Leave A Comment

+ -