Connecting to the Linux Lab Remotely
By Kevin Conroy

Many students complain that the Linux Lab hours are not convenient or that they would prefer to program from the comfort of their dorms/homes rather than going to the lab which can be crowded and noisy. The Linux Lab supports remote access but their documentation isn't very user friend for newbies.

What follows is a tutorial on how to set up a Windows machine to remotely connect to the Linux lab. If you have a Linux or Mac box then you are probably already familiar with XWindows/XTerm and probably don't need any help from me for connecting to the lab remotely. However, I do have one trick that may help if you are lost:

Linux/Mac Instructions: At the x-term prompt, type "ssh -X -l <user name>". Enter your password when prompted.

As with any tutorial, if there is incorrect information or information that you feel should be added, please share!

Install Required Software
You will need several pieces of software (free unless otherwise noted):

Type of Program Possible Solutions
SSH Client PuTTY (get the "Windows-style installer")
FTP Client w/ SSH Support FileZilla
X-Server Cygwin/X
WinaXe ($$)
Reflection ($$)
VPN (for off-campus users only) UMD VPN Dialer

NOTES: When installing Cygwin/X, be sure that you download and install XFree86. This should be included by default but if you decide to tweak your installation make sure that you install the 'XFree86-base' package from the 'XFree86' category.

Configuring PuTTY

The first time you use PuTTY you will need to configure it for the Linux Lab.

  1. Click on the "Session" category. Set "Host Name" equal to "" using "SSH" on port 22.

  2. Click on the "Connection" category, then on "SSH" then on "Tunnels". Check "Enable X11 forwarding". Your "X display location" should be "localhost:0".

  3. Click on the "Session" category. Enter a name for these settings under "Saved Sessions" such as "Linux Lab" and click the "Save" button.

  4. When you restart PuTTY, double-click on the name you used for your saved settings (i.e. "Linux Lab") and PuTTY will load your settings and open an SSH connection to the linux lab.

Connecting Remotely

Using PuTTY for Code Development

  1. Launch your X-Server. To do this:
    1. Open Cygwin.
    2. Run "startxwin.bat".

      NOTE: Depending on your settings, Cygwin/X may not be able to automatically find startxwin.bat. If this is the case, change directories to "/usr/X11R6/bin" and then run "startxwin.bat"

      If you're using Cygwin/X, check out the User Guide to find out how to use the various tools provided by Cygwin/X as "startxwin.bat" launches several different programs.
  2. Open PuTTY and connect using your Linux lab settings (see above for first-time configuration instructions).
  3. You may now freely run windowed programs from your SSH window in PuTTY. To test this, type "emacs &".

    NOTE: You may add " &" to the end of any executable. This will cause Unix/Linux to start the program and return you to a shell prompt, effectively running a program in background. For console-based programs, this would prevent you from interacting with the program. However, for GUI programs that generate a new window, this allows you to open the program without losing your shell prompt! This will come in very handy as you may want to open several instances of emacs, bochs, the JUnit GUI, etc.

File Transfers

It is often necessary to transfer files between your home machine and your Linux Lab account. When this need arises, be sure to use an SSH enabled FTP client such as FileZilla. The settings for FileZilla are:

Port: 22
Servertype: SFTP using SSH2

By Kevin Conroy
Last Updated: September 15, 2004

The information in this guide is provided "as-is" with no warranties and confers no rights. Author not responsible for human stupidity or the inability to use CVS to prevent code loss.