OK so there's not a lot of steps to go through here. Setting up the SSH tunnel itself is a one-command operation. My primary use-case is to launch jupyter-notebook, which adds a few more steps.

  1. Ordered List Item Choose a port that is not being used on Astronomy. Lets call it 1234.
  2. Open a command line terminal and type: “ssh my_login@astronomy.nmsu.edu -NL 1234:localhost:1234”
  3. Enter your password at the prompt. The terminal may appear to hang; this is fine.

Congratulations! You now have completed an ssh tunnel to the astronomy server. You can use it to, for example, launch, edit, and run a jupyter notebook using your local browser.

To do this:

  1. Open a second command line terminal. Type 'ssh my_login@astronomy.nmsu.edu' and enter your password at the prompt.
  2. Launch jupyter-notebook with the command 'jupyter-notebook –no-browser –port 1234'
  3. A short feed of messages will scroll by. Find the one that says “To access this notebook…”, followed by a pathname, followed by “Or copy and paste one of these URLs:”
  4. Copy the URL that starts with “http://localhost:1234”. CAREFUL: Using ctrl-c to copy selected text will kill the notebook!
  5. Paste the URL into your browser of choice. If all goes well, you'll be greeted by a the standard jupyter-notebook file browser screen!

That's it! Now you can run Jupyter notebooks remotely to your heart's content.