解决了!!
我通过ssh连接到我的服务器
ssh ...@ln01.twcc.ai我尝试通过本地打开VSCode,并使用Remote-SSH ->连接到SSH ->类型的...@ln01.twcc.ai。
然后got 无法建立与“@ln01.twcc.ai”的连接。错误块和输出如下
[11:37:51.572] Log Level: 2
[11:37:51.574] remote-ssh@0.65.7
[11:37:51.574] win32 x64
[11:37:51.575] SSH Resolver called for "ssh-remote+...", attempt 1
[11:37:51.575] "remote.SSH.useLocalServer": false
[11:37:51.575] "remote.SSH.showLoginTerminal": false
[11:37:51.575] "remote.SSH.remotePlatform": {}
[11:37:51.575] "remote.SSH.path": undefined
[11:37:51.575] "remote.SSH.configFile": undefined
[11:37:51.575] "remote.SSH.useFlock": true
[11:37:51.576] "remote.SSH.lockfilesInTmp": false
[11:37:51.576] "remote.SSH.localServerDownload": auto
[11:37:51.576] "remote.SSH.remoteServerListenOnSocket": false
[11:37:51.576] "remote.SSH.showLoginTerminal": false
[11:37:51.576] "remote.SSH.defaultExtensions": []
[11:37:51.576] "remote.SSH.loglevel": 2
[11:37:51.576] SSH Resolver called for host: ssh ...@ln01.twcc.ai
[11:37:51.576] Setting up SSH remote "ln01.twcc.ai"
[11:37:51.592] Using commit id "..." and quality "stable" for server
[11:37:51.595] Install and start server if needed
[11:37:56.696] Checking ssh with "ssh -V"
[11:37:56.726] > OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2
[11:37:56.729] Running script with connection command: ssh -T -D 53574 "ssh ...@ln01.twcc.ai" bash
[11:37:56.731] Terminal shell path: C:\Windows\System32\cmd.exe
[11:37:56.948] > ]0;C:\Windows\System32\cmd.exe
[11:37:56.948] Got some output, clearing connection timeout
[11:37:57.376] >
[11:37:59.421] > ssh ...@ln01.twcc.ai: Permission denied (publickey,gssapi-keyex,gssapi-with
> -mic,keyboard-interactive).
[11:37:59.434] > 程序嘗試寫入到一個不存在的管道。
[11:38:00.713] "install" terminal command done
[11:38:00.714] Install terminal quit with output: 程序嘗試寫入到一個不存在的管道。
[11:38:00.714] Received install output: 程序嘗試寫入到一個不存在的管道。
[11:38:00.714] Failed to parse remote port from server output
[11:38:00.715] Resolver error: Error:
at Function.Create (c:\Users\ASUS\.vscode\extensions\ms-vscode-remote.remote-ssh-0.65.7\out\extension.js:1:64659)
at Object.t.handleInstallOutput (c:\Users\ASUS\.vscode\extensions\ms-vscode-remote.remote-ssh-0.65.7\out\extension.js:1:63302)
at Object.t.tryInstall (c:\Users\ASUS\.vscode\extensions\ms-vscode-remote.remote-ssh-0.65.7\out\extension.js:1:415135)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async c:\Users\ASUS\.vscode\extensions\ms-vscode-remote.remote-ssh-0.65.7\out\extension.js:1:294918
at async Object.t.withShowDetailsEvent (c:\Users\ASUS\.vscode\extensions\ms-vscode-remote.remote-ssh-0.65.7\out\extension.js:1:406463)
at async Object.t.resolve (c:\Users\ASUS\.vscode\extensions\ms-vscode-remote.remote-ssh-0.65.7\out\extension.js:1:295994)
at async c:\Users\ASUS\.vscode\extensions\ms-vscode-remote.remote-ssh-0.65.7\out\extension.js:127:110656
[11:38:00.718] ------摘要
发布于 2022-03-09 16:41:15
尝试删除保存在known_hosts文件中的指纹(对应于此特定连接的一行--而不是整个文件)。如果在C:\Users\<your_user_name>\.ssh\known_host中,这将放置在/home/<your_user_name>/.ssh/known_hosts中,而对于Linux,则位于/home/<your_user_name>/.ssh/known_hosts dir中。
由于更详细,您也可能希望检查此回答。
发布于 2021-08-25 08:34:32
我通过在远程处理之前首先编写SSH配置文件来解决这个问题。
如果通过ssh连接到服务器,如下所示:
ssh Amy@123.456.78.999 -p 22然后配置文件是:
Host MyHostName
HostName 123.456.78.999
User Amy
Port 22参考资料:https://github.com/microsoft/vscode-remote-release/issues/3968
发布于 2022-07-07 14:59:57
以下是对我起作用的东西:
Ctrl+Shift+P用于Windows,Cmd+Shift+P用于Mac)。Kill VS Code Server on Host,点击它-它将被自动删除。欲知更多详情,请访问这里。
https://stackoverflow.com/questions/68917798
复制相似问题