Zon*_*Zon 3 sockets ssh raspberry-pi visual-studio-code vscode-remote
我尝试通过 Microsoft 的远程 SSH 扩展将 VSCode 连接到树莓派 pi4,但每次都会收到 ECONNREFUSED 错误。错误日志:
[14:49:20.954] Starting forwarding server. localPort 58139 -> socksPort 58137 -> remotePort 44131
[14:49:20.954] Forwarding server listening on 58139
[14:49:20.954] Waiting for ssh tunnel to be ready
[14:49:20.955] [Forwarding server 58139] Got connection 0
[14:49:20.956] Tunneled 44131 to local port 58139
[14:49:20.957] Resolved "ssh-remote+192.168.42.1" to "127.0.0.1:58139"
[14:49:20.958] Failed to set up socket for dynamic port forward to remote port 44131: connect ECONNREFUSED 127.0.0.1:58137. Is the remote port correct?
[14:49:20.965] ------
[14:49:20.980] [Forwarding server 58139] Got connection 1
[14:49:20.981] Failed to set up socket for dynamic port forward to remote port 44131: connect ECONNREFUSED 127.0.0.1:58137. Is the remote port correct?
Run Code Online (Sandbox Code Playgroud)
VScode 将成功 ssh 到 pi 并安装 vscode 服务器,但不久之后就会失败。
这是我输入 VSCode 来创建 SSH 主机的行:
ssh -i ~/.ssh/rsa_file pi@192.168.42.1
pi 的 ssh 文件有:
Port 22
AllowTcpForwarding yes
AllowAgentForwarding yes
AllowStreamLocalForwarding yes
DisableForwarding no
TCPKeepAlive yes
Run Code Online (Sandbox Code Playgroud)
我的本地配置:
Host vscode_to_pi
HostName 192.168.42.1
IdentityFile ~/.ssh/rsa_file
User pi
ForwardAgent yes
ForwardX11 yes
PubKeyAcceptedKeyTypes=+ssh-rsa
HostKeyAlgorithms=+ssh-rsa
StrictHostKeyChecking=no
Run Code Online (Sandbox Code Playgroud)
我努力了:
一些注意事项:
11.31.76.2v0.101.2023032415| 归档时间: |
|
| 查看次数: |
5399 次 |
| 最近记录: |