赞
踩
我的SSH-config
# Read more about SSH config files: https://linux.die.net/man/5/ssh_config # 第一个是局域网登陆,第二个是公网跳板,第三个是通过跳板登陆 Host Teme HostName 192.168.1.115 User ***** Port 22 IdentityFile "~/.ssh/id_rsa" Host Teme-jump HostName xxxx.io User ***** Port 3160 IdentityFile "~/.ssh/id_rsa" Host Teme-gpu HostName 192.168.1.115 User ***** Port 22 ProxyCommand ssh -W %h:%p Teme-jump
不过vscode远程不仅需要内网相连,还需要本机连接外网才可以打开。
如果连接不了外网,只有内网在同一路由,可以用jupyter lab.
需要买一台可以外网访问的云服务器。
ssh -N -v -R 22:192.168.1.115:22 root@123.56.86.52
location / {
root /usr/share/nginx/html;
index index.html index.htm;
proxy_pass http://192.168.1.115:22;
proxy_set_header Host $host:80;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Via "nginx";
}
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。