ssh已经解决登陆局域网内其他电脑的jupyter
https://jupyter-notebook.readthedocs.io/en/stable/public_server.html 设置密码需要按照要求来!!!
ssh连接Ubuntu服务器遇到的问题汇总https://blog.csdn.net/sinat_32590125/article/details/80386953?ops_request_misc=&request_id=&biz_id=102&utm_term=ssh%20-N%20-f%20-L%20localhost:2018:lo&utm_medium=distribute.pc_search_result.none-task-blog-2allsobaiduweb~default-0-80386953.pc_search_result_no_baidu_js&spm=1018.2226.3001.4187
jupyter notebook
ssh -N -f -L localhost:2018:localhost:8888 yyp@192.168.103.168
localhost:2018【成功转发到2018,前提是正确设置密码u’argon2:
a
r
g
o
n
2
i
d
argon2id
argon2idv=19
m
=
10240
,
t
=
10
,
p
=
8
m=10240,t=10,p=8
m=10240,t=10,p=8nVvKLXsQ8i/XXVJPtdHZsQ$XKSlzJhWqYOQ’】
u’argon2: a r g o n 2 i d argon2id argon2idv=19$li BIWlesa1lO/Pw$1lJpVvVA/6gz/m53ERQg2A’
ssh -N -f -L localhost:2017:localhost:8888 yypli@192.168.106.236【局域网内另外一台电脑成功登陆转发】
ssh -L8888:localhost:3131 zhaong@22
- 连接计算节点
ssh -L3131:localhost:3030 comp
SSH远程使用jupyter notebook
使用jupyter的命令(方便快速复制)
远程服务器运行:jupyter notebook --no-browser --port=8889 启动jupyter
本地ubuntu运行ssh:ssh -N -f -L localhost:8888:localhost:8889 remote_name@host_ip
ssh -N -f -L localhost:2018:localhost:8889 yyp@192.168.103.168
localhost:2018
http://localhost:2018/?token=056bf489766f162bdb7fa3afa4f1b5c8847a6572f43de94e
localhost:2019
其中用户名remote_name 与后面的主机ip地址可以灵活替换为新的
其中: -N 告诉SSH没有命令要被远程执行; -f 告诉SSH在后台执行; -L 是指定port forwarding的配置,远端端口是8889,本地的端口号的8888
启动之后可以在本地的浏览器输入:http://localhost:8888/ ,然后在不同的目录下就可以创建相应的ipython等
————————————————
版权声明:本文为CSDN博主「Garvey Lian」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/u014022205/article/details/81025660
u’argon2: a r g o n 2 i d argon2id argon2idv=19 m = 10240 , t = 10 , p = 8 m=10240,t=10,p=8 m=10240,t=10,p=8nVvKLXsQ8i/XXVJPtdHZsQ$XKSlzJhWqYOrhvWzW8qnBQ’
ssh yypli@192.168.106.236
ssh -N -f -L localhost:2017:localhost:8888 yypli@192.168.106.236
localhost:8888
192.168.106.236:8888
Jupyter notebook 配置无问题 但就是无法远程访问,解决方法https://blog.csdn.net/CZ505632696/article/details/79604446?utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-1.control&dist_request_id=1329187.9239.16178563189196707&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-1.control
https://blog.csdn.net/BlckRiver/article/details/100578347?utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-2.control&dist_request_id=&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-2.control
使用 ssh 实现从外网访问内网的jupyter notebook
https://blog.csdn.net/janbox/article/details/106021179?utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-7.control&dist_request_id=&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-7.control
利用远程服务器实现内网穿透访问jupyter notebookhttps://fesian.blog.csdn.net/article/details/101875110?utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-10.control&dist_request_id=1329188.8943.16178566935440471&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-10.control
jupyter 未解决
https://blog.csdn.net/swordsm/article/details/107948497?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522161784837516780264088906%2522%252C%2522scm%2522%253A%252220140713.130102334…%2522%257D&request_id=161784837516780264088906&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2allbaidu_landing_v2~default-1-107948497.pc_search_result_no_baidu_js&utm_term=ping+wsl2&spm=1018.2226.3001.4187
WSL2 网络异常排查 [ping 不通、网络地址异常、缺少默认路由、被宿主机防火墙拦截]
解决本地主机问题 (Problems resolving localhost)
Some versions fail to connect using localhost. There is an update coming to Windows to fix this problem until you can connect using the IP Address and change the localhost. To know your IP address, you can use the number previous the slash with the command:
某些版本无法使用localhost连接。 在您可以使用IP地址连接并更改localhost之前,Windows上将有一个更新程序来解决此问题。 要知道您的IP地址,可以在命令前使用斜杠前的数字:
Jupyter-Notebook 远程服务器配置(SSH方案)
网上配置远程notebook的方案很多,但是似乎好多都是直接访问remote server的端口
不过,有趣的是,我发现我直接ping不通我的remote server,只能采用ssh来传输的方案
ssh -N -f -L 8080:localhost:8888 yyp@192.168.103.168
遇到的一些问题
在实际操作中,出于防火墙(存疑)设置问题,配置完成后仍无法正常访问Jupyter,打开既定网页后弹出标识如下:https://blog.csdn.net/MuziZZ/article/details/101703604?ops_request_misc=&request_id=&biz_id=102&utm_term=ping%20%E4%B8%8D%E9%80%9A%E6%9C%8D%E5%8A%A1%E5%99%A8jupyter%E7%9A%84%E5%9C%B0%E5%9D%80&utm_medium=distribute.pc_search_result.none-task-blog-2allsobaiduweb~default-2-101703604.pc_search_result_no_baidu_js&spm=1018.2226.3001.4187
解决思路:
将服务器的20180端口通过ssh远程映射本地的2018端口。
具体实现:
在本地运行:
ssh -p port_num server_account@ip_addr -N -L localhost:2018:localhost:20180
ip addr | gre
p eth0 | grep inet
192…172:8888
ssh yy@192.16106.172
home/yypjm/.jupyter
ssh yy@192.16.236
192.8888
jupyter notebook --allow-root --no-browser --ip=0.0.0.0
jupyter notebook --ip=127.0.0.1
http://192.1606.236:8888/?token=8f0badfb683185616adccfa142dee48852151105e3437f59
argon2: a r g o n 2 i d argon2id argon2idv=19 m = 10240 , t = 10 , p = 8 m=10240,t=10,p=8 m=10240,t=10,p=8btfS9NvDqlBsyofZU1501A$J0+locmkXS8LQ4fba+/1zw
ssh yyp@192.168.103.168
#执行上述命令,会在terminal看到http://0.0.0:8888/?token=xxxxxxx的提示
#打开浏览器上粘贴这个地址后,把0.0.0.0替换成服务器的IP地址即可。
http://192.3.172:8889/?token=322147b3e39058ac32400d4693e31f33dca9aad59461a367
jupyter notebook --ip=192.168.103.172 ###可以
jupyter notebook --ip=192.168.106.236 ###可以
1928.103.168:8888
按照(1)进行的实践
密码和笔记本的密码一样
在服务器端启动服务之后,我无法在远程直接连接过去,奇怪。
因为服务器的防火墙是开着的呢,关闭掉就能ping通了
sudo ifconfig eth0 192.3.168 netmask 255.255.255.240
Ubuntu与windows下配置安装jupyter-notebook以及其开机自启、后台运行与远程访问
https://blog.csdn.net/starfish55555/article/details/96788672?utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-1.control&dist_request_id=&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-1.control
argon2: a r g o n 2 i d argon2id argon2idv=19 m = 10240 , t = 10 , p = 8 m=10240,t=10,p=8 m=10240,t=10,p=8U7sTOS/23DplazSKvSCJYA j v D 2 j a 5 G H I b w 5 N Z + Z E I i V A a r g o n 2 : jvD2ja5GHIbw5NZ+ZEIiVA argon2: jvD2ja5GHIbw5NZ+ZEIiVAargon2:argon2id v = 19 v=19 v=19m=10240,t=10,p=8 b t f S 9 N v D q l B s y o f Z U 1501 A btfS9NvDqlBsyofZU1501A btfS9NvDqlBsyofZU1501AJ0+locmkXS8LQ4fba+/1zw
https://qcyfred.blog.csdn.net/article/details/82767965?utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-1.control&dist_request_id=1328767.82412.16177908708198027&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-1.control
Python:局域网访问Jupyter notebook
#编辑内容
c=get_config()
c.IPKernelApp.pylab=‘inline’ # 所有matplotlib的图像都通过iline的方式显示
c.NotebookApp.certfile=u’/home/yyp/.ipython/profile_nbserver/mycert.pem’ #这一行指向我们刚刚创建的ssl证书,这里的路径要给绝对路径
c.NotebookApp.password=u’argon2:
a
r
g
o
n
2
i
d
argon2id
argon2idv=19
m
=
10240
,
t
=
10
,
p
=
8
m=10240,t=10,p=8
m=10240,t=10,p=8btfS9NvDqlBsyofZU1501A$J0+locmkXS8LQ4fba+/1zw’#创建的密码的哈希值
c.NotebookApp.ip=’*’
c.NotebookApp.port=8888 # 给出运行的端口,ipython默认为8888
c.NotebookApp.open_browser=False # 禁止在运行ipython的同时弹出浏览器
https://服务器IP:8888(
https://blog.csdn.net/yes_doit/article/details/88713750
https://blog.csdn.net/dliyuedong/article/details/49804825?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522162069705116780271547907%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fall.%2522%257D&request_id=162069705116780271547907&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2allfirst_rank_v2~rank_v29-1-49804825.first_rank_v2_pc_rank_v29&utm_term=ssh+%E6%AD%A3%E5%90%91%E4%B8%8E%E5%8F%8D%E5%90%91%E4%BB%A3%E7%90%86
ssh -L8888:localhost:3131 zhaong@22
- 连接计算节点
ssh -L3131:localhost:3030 comp
Admin@server:$ netstat -tnl | grep 127.0.0.1
反向代理服务器
将没有互联网ip的内网服务器端口反向代理绑定到有互联网ip的服务器端口上,让互联网用户可以访问内网应用程序,解决没有互联网ip问题https://www.jianshu.com/p/8e4f23436464
ssh -f -N -R localhost:2018:localhost:8888 z11ong@222.11133
ssh -f -N -R 0.0.0.0:2018:0.0.0.0:8888 z11ong@222.11133
(base) [z11ong@compute-0-8 ~]$ ssh -f -N -R localhost:2018:localhost:8888 z11ong@222.11133
ssh: connect to host 222.11133 port 22: Connection refused
(base) [z11ong@compute-0-8 ~]$ ssh -f -N -R 0.0.0.0:2018:0.0.0.0:8888 z11ong@222.11133
ssh: connect to host 222.11133 port 22: Connection refused
(base) [z11ong@compute-0-8 ~]$
ss -tnl4 | grep 2018
将本地服务器0.0.0.0的8888端口转发到远程主机接口0.0.0.0的5555端口
ssh -N -L 2018:localhost:8888 z11ong@222.11133
netstat -tnl | grep 172.16.1.8
netstat -tnl | grep 10.1.255.246
(base) [z11ong@compute-0-8 ~]$ netstat -tnl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:6 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:11 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:53 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:19 0.0.0.0:* LISTEN
(base) [z11ong@compute-~]$
ssh -f -N -R 0.0.0.0:5555:0.0.0.0:8888 z11ong@222.11133
ssh -N -L 5555:localhost:2018 root@22.22.22.22
https://blog.csdn.net/zokie/article/details/7190195?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522162069651716780366559574%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=162069651716780366559574&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduend~default-2-7190195.first_rank_v2_pc_rank_v29&utm_term=ssh+%E5%8F%8D%E5%90%91%E4%BB%A3%E7%90%86
ssh -CNfL 6666:172.16.1.24:8888 z11ong@222.11133
ssh -CNfL 6666:localhost:22 z11ong@222.11133
ssh -CNfR 8888:127.0.0.1:80 z11ong@222.11133