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 to enable access to internal web applications inside Palmetto directly on local browser programs. While this requires a slightly more elaborate setup than X-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.
- Notation:
USERNAME
means your Palmetto login name.
Setup socket proxy access on MacOS/Linux
- Setup the SSH tunnel with port forwarding to Palmetto. Open a terminal and run the following command (this terminal must be kept opened for the socket proxy to be active):
ssh -D 8080 -C -q -N USERNAME@slogin.palmetto.clemson.edu
Setup socket proxy access on Windows
To set up the SSH tunnel with port forwarding to Palmetto using Windows PowerShell enter the following command (this terminal must be kept opened for the socket proxy to be active):
ssh -D 8080 -C -q -N USERNAME@slogin.palmetto.clemson.edu
Enable Firefox to view website through the proxy
- This is similar across all
- Download and install Firefox if you don't already have it.
- Setup Firefox:
- Select
Firefox
thenPreferences
. - Scroll to the bottom of
General
and click theSettings
button in theNetwork Settings
section. - Select
Manual Proxy configuration
and fill inlocalhost
forSOCKS Host
and8080
forPort
. - Check
SOCKS v5
. - Check
Proxy DNS when using SOCKS v5
. - Check
Enable DNS over HTTPS
. - Make sure everything else is unchecked, then click
OK
.
- Select
- 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
- 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
- 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. - Your notebook server should show up, and you can start working as normal.