1. On submit host, install required Python libraries, and start the Jupyter notebook:
> pip install jupyter
> python3 -m notebook
2. Allow the Jupyter Notebook to be accessed remotely by changing the configuration of your Jupyter Notebook
> jupyter notebook --generate-config
3. Then run the code below:
> echo "c.NotebookApp.allow_remote_access = True" >> ~/.jupyter/jupyter_notebook_config.py
Open another SSH terminal to execute the following commands:
1. Install ngrok via Apt with the following command:
> curl -sSL https://ngrok-agent.s3.amazonaws.com/ngrok.asc \
| sudo tee /etc/apt/trusted.gpg.d/ngrok.asc >/dev/null \
&& echo "deb https://ngrok-agent.s3.amazonaws.com buster main" \
| sudo tee /etc/apt/sources.list.d/ngrok.list \
&& sudo apt update \
&& sudo apt install ngrok
2. Go to Ngrok dashboard to get your Ngrok's auth token: https://dashboard.ngrok.com/get-started/your-authtoken
3. Authenticate your ngrok agent:
> ngrok authtoken <YOUR_AUTH_TOKEN>
4. Share your jupyter notebook online via
> ngrok http http://localhost:8888
5. Click “Endpoints” tab, and click the URL there to access:
- How to Share your Jupyter Notebook in 3 Lines of Code with Ngrok https://towardsdatascience.com/how-to-share-your-jupyter-notebook-in-3-lines-of-code-with-ngrok-bfe1495a9c0c