【发布时间】:2020-01-04 15:15:03
【问题描述】:
我正在尝试使用 vs-code 的 remote-ssh extension 通过 ssh 隧道连接到服务器。 服务器是没有公共 IP 地址的内部集群的一部分,我使用link 中概述的方法通过集群中的代理连接到它:
# ~/.ssh/config
Host internal*
User root
ProxyCommand ssh user@firewall 'nc %h %p'
当我尝试连接到内部服务器时,我收到以下错误对话框:
无法建立与“内部服务器”的连接。该进程试图写入一个不存在的管道。
输出窗口的日志:
remote-ssh@0.45.6
win32 x64
SSH Resolver called for "ssh-remote+internal-server", attempt 1
SSH Resolver called for host: internal-server
Setting up SSH remote "internal-server"
Using commit id "........" and quality "stable" for server
Testing ssh with ssh -V
ssh exited with code: 0
Got stderr from ssh: OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
Running script with connection command: ssh -o ClearAllForwardings=true internal-server bash
Install and start server if needed
>
Got some output, clearing connection timeout
> ]0;C:\WINDOWS\SYSTEM32\cmd.exe
>
> CreateProcessW failed error:2
>
> posix_spawn: No such file or directory
> The process tried to write to a nonexistent pipe.
>
"install" terminal command done
Install terminal quit with output: The process tried to write to a nonexistent pipe.
Received install output: The process tried to write to a nonexistent pipe.
The process tried to write to a nonexistent pipe
TELEMETRY: {"eventName":"resolver","properties":{"outcome":"failure","reason":"OfflineError"},"measures":{"resolveAttempts":1,"retries":1}}
------
如何使用 vs-code 的 remote-ssh 连接到代理/防火墙后面的计算机?
【问题讨论】:
标签: ssh visual-studio-code remote-debugging