Skip to content

Instantly share code, notes, and snippets.

@vishnuexe
Last active October 17, 2024 08:50
Show Gist options
  • Select an option

  • Save vishnuexe/95fa11ef2edc586c4a2f5656dbb9c23c to your computer and use it in GitHub Desktop.

Select an option

Save vishnuexe/95fa11ef2edc586c4a2f5656dbb9c23c to your computer and use it in GitHub Desktop.

Accessing Jupyter-lab running in remote ssh server

Step1: ssh into your remote server

$ ssh username@server_ip_address

Step2: Run this in the remote server

#starting jupyter lab
$ jupyter lab --ip 0.0.0.0 --port 8888 --no-browser --allow-root

Step3: Run this in your local sytem

#port forwarding from remote server to local system
$ ssh -N -L 8888:localhost:8888 username@server_ip_address

Step 4:

Access the notebook through your desktop browser on http://localhost:8888

If asked, copy paste the token which was generated when you started the server, which you will find from Step 2 It will look something like this:

http://127.0.0.1:8888/lab?token=329ef3077dd75af702fdb038b1869b398850054de2e2a540

Copy everything after "token=" and paste it where it is asked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment