3

I have a problem with connecting to jupyter that I run on remote computer. I have configured jupyter with ssl as in the following doc:

https://jupyter-notebook.readthedocs.io/en/latest/public_server.html#hashed-pw

Then I run jupyter on remote machine with command: jupyter notebook as in tutorial. When its running I make a tunnel in another terminal by running a command:

ssh -N -f -L 8889:127.0.0.1:8881 user_name@hostname.com

Of course the jupyter is running on port 8881. When I open the browser on my local computer and try to open page:

localhost:8889

I got an error that connection was reset, and in command line the ssh returns the following error:

channel 2: open failed: connect failed: Connection refused

Can anyone help me? I was looking for an answer for whole day and still can't fix it.

Marek Justyna
  • 214
  • 3
  • 15
  • The error message seems to suggest that Jupyter is not actually listening at the expected port. My advice is to try to look at some simpler aspects in order to make some progress. (1) execute `netstat -atnvp` to see which ports are open and what program is listening on them. Try that both on the local host and the server; do the results show what you expected? (2) instead of running Jupyter, maybe just try to echo or cat or nc (i.e. netcat). – Robert Dodier Nov 26 '18 at 05:34

1 Answers1

2

The problem is, that in my case jupyter is running on localhost. At my server remote server I have no access to remote localhost, so the solution was quite easy - I run jupyter on specified ip = 0.0.0.0

jupyter notebook --no-browser --port=8881 --ip=0.0.0.0
Marek Justyna
  • 214
  • 3
  • 15