最近我无法在Vscode编辑器上使用远程SSH连接到我的服务器。像这样的详细信息
> [19:13:42.444] Log Level: 2 [19:13:42.448] remote-ssh@0.50.0
> [19:13:42.448] win32 x64 [19:13:42.449] SSH Resolver called for
> "ssh-remote+140.122.184.164", attempt 1 [19:13:42.449] SSH Resolver
> called for host: 140.122.184.164 [19:13:42.449] Setting up SSH remote
> "140.122.184.164" [19:13:42.452] Acquiring local install lock:
> C:UsersAcerAppDataLocalTempvscode-remote-ssh-140.122.184.164-install.lock
> [19:13:42.464] Looking for existing server data file at
> c:UsersAcerAppDataRoamingCodeUserglobalStoragems-vscode-remote.remote-sshvscode-ssh-host-140.122.184.164-78a4c91400152c0f27ba4d363eb56d2835f9903adata.json
> [19:13:42.464] Using commit id
> "78a4c91400152c0f27ba4d363eb56d2835f9903a" and quality "stable" for
> server [19:13:42.465] Install and start server if needed
> [19:13:42.468] Checking ssh with "ssh -V" [19:13:42.514] >
> OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5 [19:13:42.515] Checking ssh
> with "C:WINDOWSSystem32OpenSSHssh.exe -V" [19:13:42.547] >
> OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5 [19:13:42.547] Checking ssh
> with "C:Program FilesGitusrbinssh.exe -V" [19:13:42.581] >
> OpenSSH_8.1p1, OpenSSL 1.1.1d 10 Sep 2019 [19:13:42.583] askpass
> server listening on
> \.pipevscode-ssh-askpass-a5415762a34cef86c303cb95e6068cc83f77ad45-sock
> [19:13:42.583] Spawning local server with
> {"ipcHandlePath":"\\.\pipe\vscode-ssh-askpass-2f67c00bee72c5d0d1a3761b3a9ce7fa93226b8b-sock","sshCommand":"C:\Program
> Files\Git\usr\bin\ssh.exe","sshArgs":["-v","-T","-D","52132","140.122.184.164"],"dataFilePath":"c:\Users\Acer\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-ssh\vscode-ssh-host-140.122.184.164-78a4c91400152c0f27ba4d363eb56d2835f9903a\data.json"} [19:13:42.583] Local server env:
> {"DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"c:\Users\Acer\.vscode\extensions\ms-vscode-remote.remote-ssh-0.50.0\out\local-server\askpass.bat","VSCODE_SSH_ASKPASS_NODE":"C:\Users\Acer\AppData\Local\Programs\Microsoft
> VS
> Code\Code.exe","VSCODE_SSH_ASKPASS_MAIN":"c:\Users\Acer\.vscode\extensions\ms-vscode-remote.remote-ssh-0.50.0\out\askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"\\.\pipe\vscode-ssh-askpass-a5415762a34cef86c303cb95e6068cc83f77ad45-sock"}
> [19:13:42.588] Spawned 4652 [19:13:42.675] > local-server> Spawned
> ssh: 7024 [19:13:42.701] stderr> OpenSSH_8.1p1, OpenSSL 1.1.1d 10 Sep
> 2019 [19:13:42.828] stderr> debug1: Server host key:
> ecdsa-sha2-nistp256 SHA256:Zs/tS7SoUebvH2cFNl3/myVG+/wSM2ET0ucLj6D9H00
> [19:13:43.042] Got askpass request:
> {"request":"Wendy@140.122.184.164's password: "} [19:13:43.042]
> Showing password prompt [19:13:43.043] Listening for interwindow
> password on
> \.pipevscode-ssh-askpass-517f0ea068bd7eb6da8a4c8052ea3b542e429ade-sock
> [19:13:43.043] Writing password prompt to globalState
我不确定它出了什么问题。我的服务器有一个.vscode文件夹。它会有问题吗?
.vscode文件夹有类似于的settings.json
{ "git.ignoreLimitWarning": true }
和类似的sftp.json文件
> {
> "name": "Wendy",
> "host": "140.122.184.164",
> "protocol": "sftp",
> "port": 9600,
> "username": "Wendy",
> "remotePath": "/share/nas165/Wendy",
> "uploadOnSave": true }
最初,我可以用vscode连接到远程服务器,但突然无法连接。我尝试了尽可能多的解决方案,但最终还是解决不了这种问题。
但我发现这个问题是因为windows上的ssh,因为我试图使用sftp连接到远程服务器,但我也无法连接。
我认为这是需要解决的windows弱点。
我没有解决方案,只有一个解决问题的方法。您现在需要回滚扩展的版本。有了以下版本,我可以解决这个问题:
- 远程开发==0.19.0
- 远程SSH==0.49.0
这里描述了如何回滚版本:vs代码-回滚扩展/安装特定的扩展版本
我遇到了同样的问题,但在以下几点之后就解决了:删除";known_hosts";位于C:\Users<用户名>