Failed to connect to the remote extension host server (Error: Connection error: Version mismatch, client refused.)
Failed to connect to the remote extension host server (Error: Connection error: Version mismatch, client refused.)
我正在尝试将 remote-ssh 与 VS Code 结合使用。但是,我得到了这个远程 ssh 日志:
[11:37:47.034] Log Level: 3
[11:37:47.037] remote-ssh@0.49.0
[11:37:47.037] linux x64
[11:37:47.040] SSH Resolver called for "ssh-remote+gochin_dev", attempt 1
[11:37:47.040] SSH Resolver called for host: gochin_dev
[11:37:47.041] Setting up SSH remote "gochin_dev"
[11:37:47.052] Using commit id "fd13e449f5f2fe300f187129d6065ed1cfad74d3" and quality "insider" for server
[11:37:47.054] Install and start server if needed
[11:37:47.062] Checking ssh with "ssh -V"
[11:37:47.085] > OpenSSH_8.2p1, OpenSSL 1.1.1d 10 Sep 2019
[11:37:47.097] Using SSH config file "/home/min/.ssh/gochin_dev"
[11:37:47.097] Running script with connection command: ssh -T -D 39655 -o ConnectTimeout=15 -F /home/min/.ssh/gochin_dev gochin_dev bash
[11:37:48.550] > e9c54b699fa3: running
[11:37:48.551] Got some output, clearing connection timeout
[11:37:48.615] > Acquiring lock on /home/ec2-user/.vscode-server-oss/bin/fd13e449f5f2fe300f187129d6065ed1cfad74d3/vscode-remote-lock.ec2-user.fd13e449f5f2fe300f187129d6065ed1cfad74d3
Found existing installation at /home/ec2-user/.vscode-server-oss/bin/fd13e449f5f2fe300f187129d6065ed1cfad74d3...
[11:37:48.676] > Found running server...
Reminder: You may only use this software with Visual Studio family products,
as described in the license (https://go.microsoft.com/fwlink/?linkid=2077057)
[11:37:48.734] > Checking server status on port 42183 with wget
[11:37:48.798] > e9c54b699fa3: start
sshAuthSock====
agentPort==42183==
osReleaseId==amzn==
arch==x86_64==
webUiAccessToken====
tmpDir==/run/user/1000==
e9c54b699fa3: end
[11:37:48.799] Received install output:
sshAuthSock====
agentPort==42183==
osReleaseId==amzn==
arch==x86_64==
webUiAccessToken====
tmpDir==/run/user/1000==
[11:37:48.804] Remote server is listening on port 42183
[11:37:48.805] Parsed server configuration: {"agentPort":42183,"osReleaseId":"amzn","arch":"x86_64","webUiAccessToken":"","sshAuthSock":"","tmpDir":"/run/user/1000"}
[11:37:48.812] Starting forwarding server. localPort 44563 -> socksPort 39655 -> remotePort 42183
[11:37:48.813] Forwarding server listening on 44563
[11:37:48.814] Waiting for ssh tunnel to be ready
[11:37:48.818] [Forwarding server 44563] Got connection 0
[11:37:48.827] Tunneled remote port 42183 to local port 44563
[11:37:48.828] Resolved "ssh-remote+gochin_dev" to "127.0.0.1:44563"
[11:37:48.885] ------
[11:37:48.938] [Forwarding server 44563] Got connection 1
[11:37:48.939] [Forwarding server 44563] Got connection 2
我正在使用这个配置:
- OS: Linux x64 5.4.22-1-MANJARO
- VS 代码版本:1.42.1
- Node.js版本:12.4.0
- 电子版:6.1.7
同样的问题。您必须使用 Microsoft 的 VSCode 包,而不是您的发行版中的包。来自 Manjaro 的包安装来自 AUR 的 VSCode OSS and the SSH extension doesn't seems to like that. Try with the visual-studio-code-bin 包。
我遇到了同样的问题,我所做的是在按住 shift 键的同时重新启动计算机。
当我把它放回去时它起作用了。
我在VScode
中使用Ubuntu终端
我今天遇到了同样的问题。我的最终解决方案是“删除 ssh-server 上的 vscode 和 vscode-server 设置”。
rm -r ~/.vscode
rm -r ./.vscode-server
我正在尝试将 remote-ssh 与 VS Code 结合使用。但是,我得到了这个远程 ssh 日志:
[11:37:47.034] Log Level: 3
[11:37:47.037] remote-ssh@0.49.0
[11:37:47.037] linux x64
[11:37:47.040] SSH Resolver called for "ssh-remote+gochin_dev", attempt 1
[11:37:47.040] SSH Resolver called for host: gochin_dev
[11:37:47.041] Setting up SSH remote "gochin_dev"
[11:37:47.052] Using commit id "fd13e449f5f2fe300f187129d6065ed1cfad74d3" and quality "insider" for server
[11:37:47.054] Install and start server if needed
[11:37:47.062] Checking ssh with "ssh -V"
[11:37:47.085] > OpenSSH_8.2p1, OpenSSL 1.1.1d 10 Sep 2019
[11:37:47.097] Using SSH config file "/home/min/.ssh/gochin_dev"
[11:37:47.097] Running script with connection command: ssh -T -D 39655 -o ConnectTimeout=15 -F /home/min/.ssh/gochin_dev gochin_dev bash
[11:37:48.550] > e9c54b699fa3: running
[11:37:48.551] Got some output, clearing connection timeout
[11:37:48.615] > Acquiring lock on /home/ec2-user/.vscode-server-oss/bin/fd13e449f5f2fe300f187129d6065ed1cfad74d3/vscode-remote-lock.ec2-user.fd13e449f5f2fe300f187129d6065ed1cfad74d3
Found existing installation at /home/ec2-user/.vscode-server-oss/bin/fd13e449f5f2fe300f187129d6065ed1cfad74d3...
[11:37:48.676] > Found running server...
Reminder: You may only use this software with Visual Studio family products,
as described in the license (https://go.microsoft.com/fwlink/?linkid=2077057)
[11:37:48.734] > Checking server status on port 42183 with wget
[11:37:48.798] > e9c54b699fa3: start
sshAuthSock====
agentPort==42183==
osReleaseId==amzn==
arch==x86_64==
webUiAccessToken====
tmpDir==/run/user/1000==
e9c54b699fa3: end
[11:37:48.799] Received install output:
sshAuthSock====
agentPort==42183==
osReleaseId==amzn==
arch==x86_64==
webUiAccessToken====
tmpDir==/run/user/1000==
[11:37:48.804] Remote server is listening on port 42183
[11:37:48.805] Parsed server configuration: {"agentPort":42183,"osReleaseId":"amzn","arch":"x86_64","webUiAccessToken":"","sshAuthSock":"","tmpDir":"/run/user/1000"}
[11:37:48.812] Starting forwarding server. localPort 44563 -> socksPort 39655 -> remotePort 42183
[11:37:48.813] Forwarding server listening on 44563
[11:37:48.814] Waiting for ssh tunnel to be ready
[11:37:48.818] [Forwarding server 44563] Got connection 0
[11:37:48.827] Tunneled remote port 42183 to local port 44563
[11:37:48.828] Resolved "ssh-remote+gochin_dev" to "127.0.0.1:44563"
[11:37:48.885] ------
[11:37:48.938] [Forwarding server 44563] Got connection 1
[11:37:48.939] [Forwarding server 44563] Got connection 2
我正在使用这个配置:
- OS: Linux x64 5.4.22-1-MANJARO
- VS 代码版本:1.42.1
- Node.js版本:12.4.0
- 电子版:6.1.7
同样的问题。您必须使用 Microsoft 的 VSCode 包,而不是您的发行版中的包。来自 Manjaro 的包安装来自 AUR 的 VSCode OSS and the SSH extension doesn't seems to like that. Try with the visual-studio-code-bin 包。
我遇到了同样的问题,我所做的是在按住 shift 键的同时重新启动计算机。
当我把它放回去时它起作用了。
我在VScode
中使用Ubuntu终端我今天遇到了同样的问题。我的最终解决方案是“删除 ssh-server 上的 vscode 和 vscode-server 设置”。
rm -r ~/.vscode
rm -r ./.vscode-server