Skip to main content

SSH Socket Proxy

There are a number of browser-based applications such as R Studio Server for R or Jupyter Server for Jupyter Notebook that could be launched directly from the compute nodes. To access these applications, we have traditionally used X11-forwarding, meaning to launch an instance of Firefox from inside the compute node and display it on the local computer. This approach is typically slow.

In this guide, we will look at how to setup a socket connection with Palmetto 2 to enable access to internal web applications inside Palmetto 2 directly on local browser programs. While this requires a slightly more elaborate setup than X11 Forwarding, it is also faster and more convenient to use.

Currently, this guide is designed for Firefox browser. Additional information on Chrome, Edge, and Safari will be added.

Setting up an SSH Socket Proxy

Follow the instructions to connect to Palmetto 2 via SSH, but note that we must use a slightly different command that includes the socket proxy flags:

ssh -D 8080 -C -q -N username@slogin.palmetto.clemson.edu
note

Remember to replace username with your Clemson username.

warning

The socket proxy will only be active while this terminal is open and connected to Palmetto 2. Do not close this terminal until you are done using the socket proxy.

Enable Firefox to view website through the proxy

This is similar across all operating systems. Download and install Firefox if you don't already have it on your system.

Instructions for configuring Firefox:

  1. Select Firefox then Preferences.
  2. Scroll to the bottom of General and click the Settings button in the Network Settings section.
  3. Select Manual Proxy configuration and fill in localhost for SOCKS Host and 8080 for Port.
  4. Check SOCKS v5.
  5. Check Proxy DNS when using SOCKS v5.
  6. Check Enable DNS over HTTPS.
  7. Make sure everything else is unchecked, then click OK.

Screenshot of the Firefox connection settings.

If Firefox is your primary browser, you will need to reverse the process and change back to the default Use system proxy settings in your Firefox Preferences/General/Network Settings after you are done.

Test proxy

  1. Login to Palmetto, then get a compute node and launch a Jupyter notebook server.

    $ ssh USERNAME@slogin.palmetto.clemson.edu
    ...
    $ salloc
    ...
    $ module load anaconda3/2022.10-gcc/9.5.0
    $ jupyter notebook --ip=0.0.0.0 --no-browser

    Screenshot of a Mac/Linux terminal logging in to the Palmetto.

  2. Open the browser that has proxy setup and copy the entire notebook link (the one with nodeXXXX.palmetto.clemson.edu extension) into the URL bar.

  3. Your notebook server should show up, and you can start working as normal.

    Screenshot of a Jupyter Notebook example.