Running notebooks remotely

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

jupyter notebook --ip=

on the remote, followed by

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

allows me to view<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<token> might be temporarily down or it may have moved permanently to a new web address.

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<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


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:

1 Like

Thanks! My reference was my boss… but they only have a Mac too! I hadn’t seen the links - I think I’d been focussing too much on localhost vs