SSH Tunneling to the Central Resource Daemon

NOTICE: If you used the ONL testbed prior to August 2006 and are now having difficulties connecting to the testbed, you should change some parameters in your SSH tunnel. The differences are shown in red below whenever possible.

The RLI can be run without connecting to the ONL resources if all you want to do is to specify a network and save the configuration to your local file. But if you want to actually ask for resources (File => Commit), you will need to communicate to the Central Resource Daemon (CRD) through an SSH tunnel.

The CRD communicates with the RLI through TCP port 7070 on host onlsrv. In order to commit resources, you will have to setup an SSH tunnel to onlsrv, port 7070 BEFORE you select File => Commit. In fact, we normally setup the tunnel before we even start the RLI. This page provides instructions for setting up the SSH tunnel on both Linux and Windows platforms.

The next section describes the SSH tunnel concept, and then we give three recipes for constructing the SSH tunnel. If you want to skip the concept section, just select the link below that applies to your case and you will get a recipe:

The Unix command line approach is the simplest if that is available.

The SSH Tunnel Concept

Suppose we want to run our RLI on HostA which needs to connect through our firewall to the CRD listening on port P=7070 on onlsrv.

		 -------	 ||	  --------
		|  RLI  |========XX.....P| Server |
		 -------	 ||	  --------
		  HostA	      Firewall	   onlsrv
SSH tunneling or port forwarding allows us to traverse the firewall by setting up an SSH connection through the firewall and then using that channel to pass our application's data. We use the special form of port forwarding shown below where we connect to the CRD running on the host running the SSH daemon by making all traffic going to localhost, port 7070 go to the CRD which is running on onlsrv and listening on port 7070:
	       (localhost)
	 	  HostA			   onlsrv
		 -------	 ||  	  --------
		|  RLI	|	 ||	 |   CRD  |
		 -------	 ||  	  --------
		   || 		 ||	  P = 7070
		   || 		 ||	     ||
		Q = 7070	 ||	     ||
		 -------	 ||	  --------
		|  ssh	|==============22|  sshd  |
		 -------	 ||	  --------
		  HostA	      Firewall	  SshdHost = onlusr
		  	  onl.arl.wustl.edu
An SSH (and therefore encrypted) connection is made between HostA (ssh client) and SshdHost (ssh daemon on onlusr). Unencrypted connections are made between the RLI and the ssh client and the ssh server and application server. The RLI now connects to port Q on localhost (127.0.0.1). Its traffic (encrypted) to/from onlusr passes over the "tunnel" between HostA and onlusr to the CRD which is listening on TCP port 7070.

This can be generalized to support multiple connections to multiple end hosts over the same ssh connection, but we will not describe that here.

Unix Recipe (or any command-line window on Windows)

(Note: This is known to work on RedHat 7.x and SunOS 5.8 using Open SSH and SSH Secure Shell 3.2.0 from SSH Communications Security Corp.)

Windows PuTTY Recipe

PuTTY is a popular tool for making SSH connections that can be obtained from http://www.putty.nl. The following recipe leads you through steps for setting up an SSH tunnel to the CRD using PuTTY. When you are done, you will have a PuTTY entry that can be used without reentering the tunnel details each time you run the PuTTY tool.

Windows SSH Client Recipe

Note 1: The syntactic details may vary from one tool to another.
Note 2: This is known to work for SSH clients on Windows 2000 and Windows XP using SSH Secure Shell 3.2.0 from SSH Communications Security Corp.

The two figures below show how I have setup my tunnel. The menu item is labeled rli and the tunnel name is proxy.

Comments and Caveats

References



Revised: Mon, Aug 14, 2006