Skip to content

RStudio tunnel

Eamon O'Dea edited this page Feb 7, 2020 · 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 I would set up a tunnel to the server on the machine in room 141 from my Linux desktop ssh -p 9922 -N -L 1234:localhost:8787 ebodea@172.18.244.86. Instructions for putty users on Windows are available here.
  3. If you are copying the example, be sure to substitute your own username for ebodea. While this command is running (there will be no prompt due to the -N option), the tunnel is open. 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 -N 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 Add to load the configuration. Then your screen should look like this:

Lab Links

Clone this wiki locally