r/IPython • • Nov 04 '20
Accessing Jupyter notebook remotely
Hello all,
I have access to my institute server which has jupyter installed on it. However, since it is a command line based system, I'm not entirely sure how I'd go about accessing the notebook which runs upon starting jupyter-notebook. As far as I understand, the notebook is initiated and it gives me a link at the command line. However, being relatively new to the world of Jupyter, I'm not sure if there's a way to access the notebook remotely on my machine.
Please let me know if there's a possibility of achieving this task.
Thanks reading.
4
Upvotes
7
u/m3wolf Nov 05 '20
If you are connecting via SSH, you can use a tunnel. When connecting with SSH use "-L 8888:localhost:8888". Then you can use the URL on your local computer and it will tunnel port 8888 to the server.
2
u/o-rka Nov 05 '20 edited Nov 05 '20
This is what I do after I SSH in, get on an interactive sun grid server via qlogin, and then activate my conda environment:
jupyter notebook --ip $HOSTNAME --no-browser
Hold down CMD and click the link that says something like this:
http://bigmem-1.jcvi.org:8888/?token=bc57b08a9b9f20a56b7e6367808c52ec874dd6954eaba9d1
1
u/Fenr-i-r Nov 05 '20
Depending on how remote you are talking... But one step is setting the allowed ips to more than just the local machine. Here's a relevant SO post:
https://stackoverflow.com/a/43500232/10615407