How do I run jupyter remotely from my laptop?
1) Connect to IAS VPN
Install the OpenVPN client-based tool.
https://www.ias.edu/openvpn-installation-guide
In order to use OpenVPN, you will also need to configure Multi-Factor Authentication.
https://www.ias.edu/mfa
(Web Tool (vpn.ias.edu) will not work in this instance)
2) ssh to your workstation
$ ssh username@som[a|f|m|s]XXX.math.ias.edu
where username is your username, [a|f|m|s] corresponds to your building; and XXX corresponds to your office number.
If you have any doubts, please ask.
3) Run Sage (see a.) or Anaconda (see b.) to run Jupyter
a. Sage
$ module load sage
$ sage --notebook=jupyter
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 9.2, Release Date: 2020-10-24 │
│ Using Python 3.8.5. Type "help()" for help. │
└────────────────────────────────────────────────────────────────────┘
....
* You will then see output similar to the one below *
To access the notebook, open this file in a browser:
file:///home/member/ezeno/.local/share/jupyter/runtime/nbserver-30271-open.html
Or copy and paste one of these URLs:
http://localhost:8888/?token=567d8b887b19a72378d7ec8f1b0b8826f9b18af902…
orhttp://127.0.0.1:8888/?token=567d8b887b19a72378d7ec8f1b0b8826f9b18af902…
Leave this window running.
In another terminal window, type:
(base) bash-5.1$ ssh -N -f -L localhost:8888:localhost:8888 username@som[a|f|m|s]XXX.math.ias.edu
Then in a browser, paste the URL that was outputted above:
For example:
http://localhost:8888/?token=567d8b887b19a72378d7ec8f1b0b8826f9b18af902…
b. Anaconda 3
$ module load anaconda/3 (If sage is loaded, first run module unload sage)
$ jupyter-notebook --no-browser --port=8889 --ip=127.0.0.1
# note the last line of the output which will be something like
http://127.0.0.1:8889/?token=61f8a2aa8ad5e469d14d6a1f59baac05a8d9577916…
# leave the session running
Then in a new terminal on your laptop:
$ ssh -N -f -L localhost:8889:localhost:8889 username@som[a|f|m|s]XXX.math.ias.edu
Lastly, open a web browser and *copy and paste* the URL from the
previous output:
http://127.0.0.1:8889/?token=61f8a2aa8ad5e469d14d6a1f59baac05a8d9577916…