添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

I’m trying to run a notebook remotely. I’m on a Mac, and running

jupyter notebook --ip=0.0.0.0

on the remote, followed by

ssh user@remote -L8888:<ip>:8888

allows me to view http://0.0.0.0:8888/?token=<token> and works fine for me! However, from Windows, this local URL results in an error:

This site can’t be reached
The web page at http://0.0.0.0:8888/?token=<token> might be temporarily down or it may have moved permanently to a new web address.
ERR_ADDRESS_INVALID

It does work if Windows users (connecting using MobaXTerm) go to http://localhost:8888/?token=<token> instead. I can also use localhost, and can connect successfully.

If I change the initial command to jupyter notebook --ip=localhost, then when I try and connect to either http://0.0.0.0:8888/?token=<token> or http://localhost:8888/?token=<token>, then I get an error

This site can’t be reached
The connection was reset.
Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_RESET
channel 3: open failed: connect failed: Connection refused

in my terminal.

So, although I can create instructions that work for both Mac and Windows users, I’d really like a method where all users can copy the entire URL from the original jupyter notebook command, rather than specifying a different localhost domain depending on OS. Is this possible?

You don’t reference your source of how to do this, but this isn’t the typical way I am familiar with. I’ll put mine at the bottom in case anyone stumbling on this could benefit from them.

Did you have a look at here or here in regards to the way you seem to be trying?

Is that your actual tunnel command or do you usually have a space after the -L? I don’t know if a space being absent matters.

Running Jupyter notebook on a remote machine resources:

  • https://medium.com/@alexjsanchez/python-3-notebooks-on-aws-ec2-in-15-mostly-easy-steps-2ec5e662c6c6
  • http://angus.readthedocs.io/en/2017/jupyter_notebook.html
  • https://medium.com/@josemarcialportilla/getting-spark-python-and-jupyter-notebook-running-on-amazon-ec2-dec599e1c297
  •