To access the remote machine with a browser the notebook must listen on an external facing port (not localhost). You will need the same invocation if want to run the Jupyter notebook on a container. In that case it is something like this:
jupyter notebook --no-browser --port=8080 --ip=0.0.0.0
To listen only in localhost then you can omit the IP
jupyter notebook --no-browser --port=8080
To access remotely the ssh tunnel option in other answers works. You will need an SSH tunnel per notebook. If you need to run multiple notebooks, another option is using the sshuttle
tool to simulate a VPN over SSH so you don't have to create multiple tunnels. Run sshuttle
with the option to have full reachability to the network of your remote machine (e.g. 10.250.100.40/24) or you can run it to forward all the traffic through the remote machine (like a traditional VPN).
# forward all traffic to network of remote server over the SSH VPN
sshuttle --dns -NHr username@sshserver 10.250.100.40/24
# forward all traffic through the remote server over the SSH VPN
sshuttle --dns -NHr username@sshserver 0/0
Note: The DNS flag is important to be able to use the remote machine DNS for name resolution.
Then execute the notebooks to listen on external ports. For example, running 3 notebooks.
jupyter notebook --no-browser --port=8080 --ip=0.0.0.0
jupyter notebook --no-browser --port=8081 --ip=0.0.0.0
jupyter notebook --no-browser --port=8082 --ip=0.0.0.0
You will use the Token on the output when running the notebooks for the authentication. It will display the output like this
http://server.example.com:8080/tree?token=dd9024f1fb68434645d3902d161f41720650644dc5832f16
Assuming the remote server is not blocking traffic to those port, then on you local machine it will be as simple as opening a browser to
http://<name-of-remote-machine>:8080/tree?token=<your-token>
http://<name-of-remote-machine>:8081/tree?token=<your-token>
http://<name-of-remote-machine>:8082/tree?token=<your-token>