Jupyter (IPython) notebook on a remote server【转】
http://laserplasma.ninja/2015/10/16/jupyter-ipython-notebook-on-a-remote-server-tldr/
Login on remote machine
jupyter notebook --generate-config
In ipython type:
In [1]: from notebook.auth import passwd
In [2]: passwd()
Enter password:
Verify password:
Out[2]: 'sha1:sdfasdjflaskjdf;laskdjf;laskjdfl;askjdf;lk'
Copy-paste the ‘sha1:….’ line
vi ~/.jupyter/jupyter_notebook_config.py (or use other editor)
Type:
c = get_config()
c.NotebookApp.ip='*'
c.NotebookApp.password = u'sha1:asdfasdf---your copy-paste line here'
c.NotebookApp.open_browser = False
c.NotebookApp.port =9999 # or other port number
Start notebook: jupyter notebook
If your firewall allows, you’ll be already able to connect to http`://address_of_remote:9999
If not, the best way is to establish an ssh-tunnel: ssh username@address_of_remote -L127.0.0.1:3129:127.0.0.1:9999
now you can access the remote notebook on localhost:3129
another idea: ssh username@address_of_remote -L3129:localhost:9999 "jupyter notebook"
浙公网安备 33010602011771号