jupyter / notebook

Jupyter Interactive Notebook
https://jupyter-notebook.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
11.58k stars 4.85k forks source link

Document Running Notebook over SSH Tunnel #7428

Open zyll123 opened 1 month ago

zyll123 commented 1 month ago

I installed Jupyter in a virtual environment on the server using:

pip install jupyterlab

And configured it as follows:

c.LabApp.ip = ''
c.LabApp.password = u'sha1:*******'  # not shown here
c.LabApp.open_browser = False
c.LabApp.port = 8890
c.LabApp.allow_remote_access = True

Then I established an SSH tunnel to access it locally via port 8890:

ssh -L 8890:localhost:8890 your_username@your_server_ip

However, when I enter http://localhost:8890/lab in the browser, it shows "invalid HTTP response." How can I fix the issue? Thanks for your help!

RRosio commented 1 month ago

Thank you for opening this issue @zyll123! It is not clear what the issue may be but there are many Stackoverflow posts and various tutorials where users report on setting up proper port forwarding with JupyterLab, if you'd like to take a look. Also, please try asking in the JupyterLab Discourse https://discourse.jupyter.org/c/jupyterlab/17, where you might receive more feedback!

RRosio commented 1 month ago

Per triage: We'll accept this as a documentation issue, to document in official docs how to set up running a notebook over an SSH tunnel.