Skip to content

RStudio tunnel

Eric Marty edited this page Sep 12, 2023 · 12 revisions

Quick reference

  1. Make sure you can access the computer via SSH. Instructions on that are available here.
  2. Set up an SSH tunnel to the computer you want to use which forwards a port on your local computer to the port which RStudio server is listening on the remote computer. Currently, all RStudio servers are using port 8787. So, here's an example of how to set up a tunnel to the server on the machine called "Silent Salamander" in room 150 (in the Drake Lab) from a Linux desktop:
    ssh -p 9922 -N -L 1234:localhost:8787 username@172.18.244.86
    Be sure to substitute your own username for username.
    Instructions for putty users on Windows are available here.
  3. While this command is running (there will be no prompt due to the -N option), the tunnel is open. In your web browser, navigate to the port you have forwarded RStudio to in your web browser. In the example above, that is localhost:1234. You should see a sign-in page if this is your first time using the RStudio server with this user. The username and password are simply the same as for your user account on that computer. The tunnel can be closed by closing the terminal window where you entered the ssh command, or stopping the command with something like CTRL+C.

Example configuration for Windows using Putty

The session and auth configurations must be the same as for a regular connection. Examples are available here.

You must click the Add button to load the configuration. Then your screen should look like this:

Now when you click Open and establish the SSH connection, the tunnel should be in place. ``

Lab Links

Clone this wiki locally