iT邦幫忙

0

vscode 無法遠端連線至伺服器

最近我在使用vscode時候無法遠端連線至我的server
不太確定問題出自於哪裡,也嘗試過重新安裝vscode仍無法解決。因為在別台電腦上的vscode也都無法做連線。所以有在猜想是否跟我的server上有一包.vscode資料有關
目前vscode上出現的訊息如下:

> [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:\Users\Acer\AppData\Local\Temp\vscode-remote-ssh-140.122.184.164-install.lock
> [19:13:42.464] Looking for existing server data file at
> 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.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:\WINDOWS\System32\OpenSSH\ssh.exe -V" [19:13:42.547] >
> OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5 [19:13:42.547] Checking ssh
> with "C:\Program Files\Git\usr\bin\ssh.exe -V" [19:13:42.581] >
> OpenSSH_8.1p1, OpenSSL 1.1.1d  10 Sep 2019 [19:13:42.583] askpass
> server listening on
> \\.\pipe\vscode-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
> \\.\pipe\vscode-ssh-askpass-517f0ea068bd7eb6da8a4c8052ea3b542e429ade-sock
> [19:13:43.043] Writing password prompt to globalState

config設定如下:

Host 140.122.184.164
  User Wendy
  Port 9600

.vscode資料夾有settings.json檔案如下:

{
    "git.ignoreLimitWarning": true
}

.vscode資料夾有Sftp.json檔案如下

{
    "name": "Wendy",
    "host": "140.122.184.164",
    "protocol": "sftp",
    "port": 9600,
    "username": "Wendy",
    "remotePath": "/share/nas165/Wendy",
    "uploadOnSave": true
}

不知道是否有人也遇過類似問題了解決方法,謝謝協助

尚未有邦友回答

立即登入回答