Skip to content

Instantly share code, notes, and snippets.

@felipessalvatore
Last active October 28, 2017 15:57
Show Gist options
  • Save felipessalvatore/8762f336c8e57069d7804d956342cbf7 to your computer and use it in GitHub Desktop.
Save felipessalvatore/8762f336c8e57069d7804d956342cbf7 to your computer and use it in GitHub Desktop.
remote jupyter

Setting Jupyter in a remote computer

In REMOTE

i) create config file

$ jupyter notebook --generate-config

ii) create password

$ jupyter notebook password

iii) Preparing a hashed password manually

$ ipython3

In [1]: from notebook.auth import passwd

In [2]: passwd()

Out[2]: 'sha1:67c9e60bb8b6:9ffede0825894254b2e042ea597d771089e11aed'

iv) add key to config file $ nano /home/felsal/.jupyter/jupyter_notebook_config.py

add c.NotebookApp.password = u'sha1:67c9e60bb8b6:9ffede0825894254b2e042ea597d771089e11aed'

v) run jupyter $ jupyter notebook --no-browser --port=8889

jupyter notebook --no-browser --port=8889

In LOCAL

i) set localhost

$ ssh -N -f -L localhost:8888:localhost:8889 username@your_remote_host_name

ii) Now open web browser (google chrome, firefox, ...) and type:

localhost:8888

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment