背景
原因分析

解决思路

- 在本地 .ssh/config 配置中,找到需要远程连接的主机,增加 RemoteForward 配置。有了这个配置,就会在 ssh 连接时,自动创建端口转发,将 remote 机器上所有请求 7897 端口的流量都转发到 local 机器的 127.0.0.1:7897 上。
Host comfy
HostName ngb1.dc.huixingyun.com
User root
Port 53727
PubkeyAuthentication yes
IdentityFile ~/.ssh/id_rsa
RemoteForward 7897 127.0.0.1:7897
-
在 VSCode 的 Remote-ssh 配置中设置 http.proxy
