※ 在windows系统上借助MobaXterm远程连接服务器端jupyter notebook
一、服务器端
1.安装ipython和Jupyter
pip install ipython
pip install Jupyter
2.生成配置文件
jupyter notebook --generate-config
3.生成密码
ipython
In [1]: from notebook.auth import passwd
In [2]: passwd()
Enter password:
Verify password:
Out[2]: 'xxxx'
4.修改第2步中生成的配置文件
c.NotebookApp.ip='*' # 所有ip都可访问
c.NotebookApp.password = 'xxxx' # 第3步中生成的密码
c.NotebookApp.open_browser = False # 禁止自动打开浏览器,如果服务器有浏览器也可以不修改这一项
c.NotebookApp.port =8899 #随便指定一个端口
二、PC端
1.安装MobaXterm
- 免费开源版MobaXterm下载地址https://mobaxterm.mobatek.net/download-home-edition.html
2.选择Tunneling,添加New SSH tunnel
3.填写ssh登录信息
三、远程连接jupyter notebook
- 服务器端启动
jupyter notebook
- PC端使用浏览器打开
http://127.0.0.1:8888