$ jupyter notebook --generate-config Writing defaultconfig to: /home/zj/.jupyter/jupyter_notebook_config.py
修改监听ip地址
修改服务器监听ip地址
1 2
## The IP address the notebook server will listen on. #c.NotebookApp.ip = 'localhost'
默认为localhost(就是本地),允许所有ip地址访问
1
c.NotebookApp.ip = '*'
远程登录
在远程服务器修改完配置文件后,启动jupyter
1 2 3 4 5 6 7 8 9 10 11 12 13 14
$ jupyter notebook [W 11:13:25.418 NotebookApp] WARNING: The notebook server is listening on all IP addresses andnot using encryption. This isnot recommended. [I 11:13:25.423 NotebookApp] Serving notebooks from local directory: /home/zj/software/tutorial [I 11:13:25.423 NotebookApp]0 active kernels [I 11:13:25.424 NotebookApp] The Jupyter Notebook is running at: http://[all ip addresses on your system]:8888/?token=e78e227ffb28ede99b5b7d576459335fd265e886d834ec32 [I 11:13:25.424 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). [W 11:13:25.424 NotebookApp] No web browser found: could not locate runnable browser. [C 11:13:25.424 NotebookApp] Copy/paste this URL into your browser when you connect for the first time, to login with a token: http://localhost:8888/?token=e78e227ffb28ede99b5b7d576459335fd265e886d834ec32 [I 11:13:41.883 NotebookApp]302 GET / (192.168.0.140) 0.94ms [I 11:13:41.915 NotebookApp]302 GET /tree? (192.168.0.140) 1.24ms