簡體   English   中英

更新后無法打開遠程 ssh 目錄

[英]Can't open remote ssh directory after update

我一直在 Windows 筆記本電腦上使用 VSCode 作為 Linux 機器上的 ssh 遠程目錄。 在更新 VSCode 1.68.0 之前一切正常,現在我無法打開遠程目錄。

在 Windows 上,輸出顯示:

[12:55:24.183] Log Level: 2
[12:55:24.185] remote-ssh@0.82.1
[12:55:24.185] win32 x64
[12:55:24.226] SSH Resolver called for "ssh-remote+ubuntu", attempt 1
[12:55:24.227] "remote.SSH.useLocalServer": false
[12:55:24.227] "remote.SSH.showLoginTerminal": false
[12:55:24.227] "remote.SSH.remotePlatform": {"runon":"linux","pfuntner-kube":"linux","everyday":"linux","kube":"linux","ubuntu":"linux"}
[12:55:24.227] "remote.SSH.path": C:\cygwin64\bin\ssh.exe
[12:55:24.228] "remote.SSH.configFile": c:\users\jpfuntne\.ssh\config
[12:55:24.228] "remote.SSH.useFlock": true
[12:55:24.228] "remote.SSH.lockfilesInTmp": false
[12:55:24.228] "remote.SSH.localServerDownload": auto
[12:55:24.229] "remote.SSH.remoteServerListenOnSocket": false
[12:55:24.229] "remote.SSH.showLoginTerminal": false
[12:55:24.229] "remote.SSH.defaultExtensions": []
[12:55:24.229] "remote.SSH.loglevel": 2
[12:55:24.229] "remote.SSH.enableDynamicForwarding": true
[12:55:24.230] "remote.SSH.enableRemoteCommand": false
[12:55:24.230] "remote.SSH.serverPickPortsFromRange": {}
[12:55:24.230] "remote.SSH.serverInstallPath": {}
[12:55:24.239] SSH Resolver called for host: ubuntu
[12:55:24.239] Setting up SSH remote "ubuntu"
[12:55:24.247] Using commit id "4af164ea3a06f701fe3e89a2bcbb421d2026b68f" and quality "stable" for server
[12:55:24.254] Install and start server if needed
[12:55:24.257] Checking ssh with "C:\cygwin64\bin\ssh.exe -V"
[12:55:24.568] > OpenSSH_8.8p1, OpenSSL 1.1.1l  24 Aug 2021

[12:55:24.574] Using SSH config file "c:\users\jpfuntne\.ssh\config"
[12:55:24.575] Running script with connection command: "C:\cygwin64\bin\ssh.exe" -T -D 65341 -F "c:\users\jpfuntne\.ssh\config" ubuntu bash
[12:55:24.591] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[12:55:25.421] >                                  WARNING!!!
>                     READ THIS BEFORE ATTEMPTING TO LOGON
> 
>       This System is for the use of authorized users only.  Individuals
>       using this computer without authority, or in excess of their
>       authority, are subject to having all of their activities on this
>       system monitored and recorded by system personnel.  In the course
>       of monitoring individuals improperly using this system, or in the
>       course of system maintenance, the activities of authorized users
>       may also be monitored.  Anyone using this system expressly
>       consents to such monitoring and is advised that if such
>       monitoring reveals possible criminal activity, system personnel
>       may provide the evidence of such monitoring to law enforcement
>       officials.
> 
>       Cisco Acceptable Use Policy:
>       http://wwwin.cisco.com/c/cec/organizations/security-trust/infosec/policies
> .html]0;C:\WINDOWS\System32\cmd.exe
[12:55:25.421] Got some output, clearing connection timeout
[12:55:26.367] > 28e76cc256c4: running
[12:55:26.405] > Acquiring lock on /home/ubuntu/.vscode-server/bin/4af164ea3a06f701fe3e89a2bcbb42
> 1d2026b68f/vscode-remote-lock.ubuntu.4af164ea3a06f701fe3e89a2bcbb421d2026b68f   
[12:55:26.430] > Installing to /home/ubuntu/.vscode-server/bin/4af164ea3a06f701fe3e89a2bcbb421d20
> 26b68f...
> 28e76cc256c4%%1%%
> Downloading with wget
[12:55:33.759] > wget download failed
> failed: Connection timed out.
> printenv:
>     SHELL=/bin/bash
>     PWD=/home/ubuntu/.vscode-server/bin/4af164ea3a06f701fe3e89a2bcbb421d2026b68f
>     LOGNAME=ubuntu
>     XDG_SESSION_TYPE=tty
>     MOTD_SHOWN=pam
>     HOME=/home/ubuntu
>     LANG=C.UTF-8
>     VSCODE_AGENT_FOLDER=/home/ubuntu/.vscode-server
>     SSH_CONNECTION=10.82.235.230 65347 64.102.189.72 22
>     XDG_SESSION_CLASS=user
>     USER=ubuntu
>     SHLVL=0
>     XDG_SESSION_ID=5
>     XDG_RUNTIME_DIR=/run/user/1000
>     SSH_CLIENT=10.82.235.230 65347 22
>     PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
> :/usr/local/games:/snap/bin
>     DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
>     OLDPWD=/home/ubuntu
>     _=/usr/bin/printenv
[12:55:33.764] > 
> Trigger local server download
> 28e76cc256c4:trigger_server_download
> platform==linux==
> vscodeArch==x64==
> destFolder==/home/ubuntu/.vscode-server/bin/==
> destFolder2==4af164ea3a06f701fe3e89a2bcbb421d2026b68f==
> 28e76cc256c4:trigger_server_download_end
> Waiting for client to transfer server archive...
> Waiting for /home/ubuntu/.vscode-server/bin/4af164ea3a06f701fe3e89a2bcbb421d2026
> b68f/vscode-scp-done.flag and vscode-server.tar.gz to exist
[12:55:33.765] Got request to download on client for {"platform":"linux","arch":"x64","destFolder":"/home/ubuntu/.vscode-server/bin/4af164ea3a06f701fe3e89a2bcbb421d2026b68f"}
[12:55:33.765] Downloading VS Code server locally...
[12:55:33.770] > 
> 
[12:55:34.131] Resolver error: Error: Server returned 404
    at v (vscode-file://vscode-app/c:/Users/jpfuntne/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:622:38476)
    at k.download (vscode-file://vscode-app/c:/Users/jpfuntne/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:623:1592)
[12:55:34.136] ------

在 Linux 上,我只有:

$ find .vscode-server -type f | xargs -r ls -ld
-rw-rw-r-- 1 ubuntu ubuntu 0 Jun 15 12:55 .vscode-server/bin/4af164ea3a06f701fe3e89a2bcbb421d2026b68f/vscode-remote-lock.ubuntu.4af164ea3a06f701fe3e89a2bcbb421d2026b68f
-rw-rw-r-- 1 ubuntu ubuntu 0 Jun 15 12:55 .vscode-server/bin/4af164ea3a06f701fe3e89a2bcbb421d2026b68f/vscode-server.tar.gz
$

當我第一次遇到麻煩時,我做了rm -rf .vscode來解決問題,但它沒有幫助。

任何人都可以幫忙嗎?

我今天嘗試再次啟動 VSCode。 起初我以為它有同樣的問題,但現在看起來一切正常,我進去了!

[07:14:44.009] Log Level: 2
[07:14:44.010] remote-ssh@0.82.1
[07:14:44.010] win32 x64
[07:14:44.048] SSH Resolver called for "ssh-remote+ubuntu", attempt 1
[07:14:44.048] "remote.SSH.useLocalServer": false
[07:14:44.049] "remote.SSH.showLoginTerminal": false
[07:14:44.049] "remote.SSH.remotePlatform": {"runon":"linux","pfuntner-kube":"linux","everyday":"linux","kube":"linux","ubuntu":"linux"}
[07:14:44.049] "remote.SSH.path": C:\cygwin64\bin\ssh.exe
[07:14:44.049] "remote.SSH.configFile": c:\users\jpfuntne\.ssh\config
[07:14:44.049] "remote.SSH.useFlock": true
[07:14:44.049] "remote.SSH.lockfilesInTmp": false
[07:14:44.049] "remote.SSH.localServerDownload": auto
[07:14:44.050] "remote.SSH.remoteServerListenOnSocket": false
[07:14:44.050] "remote.SSH.showLoginTerminal": false
[07:14:44.050] "remote.SSH.defaultExtensions": []
[07:14:44.050] "remote.SSH.loglevel": 2
[07:14:44.050] "remote.SSH.enableDynamicForwarding": true
[07:14:44.050] "remote.SSH.enableRemoteCommand": false
[07:14:44.050] "remote.SSH.serverPickPortsFromRange": {}
[07:14:44.050] "remote.SSH.serverInstallPath": {}
[07:14:44.056] SSH Resolver called for host: ubuntu
[07:14:44.056] Setting up SSH remote "ubuntu"
[07:14:44.062] Using commit id "4af164ea3a06f701fe3e89a2bcbb421d2026b68f" and quality "stable" for server
[07:14:44.068] Install and start server if needed
[07:14:44.071] Checking ssh with "C:\cygwin64\bin\ssh.exe -V"
[07:14:44.354] > OpenSSH_8.8p1, OpenSSL 1.1.1l  24 Aug 2021

[07:14:44.386] Using SSH config file "c:\users\jpfuntne\.ssh\config"
[07:14:44.387] Running script with connection command: "C:\cygwin64\bin\ssh.exe" -T -D 63895 -F "c:\users\jpfuntne\.ssh\config" ubuntu bash
[07:14:44.400] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[07:14:46.375] >                                  WARNING!!!
>                     READ THIS BEFORE ATTEMPTING TO LOGON
> 
>       This System is for the use of authorized users only.  Individuals
>       using this computer without authority, or in excess of their
>       authority, are subject to having all of their activities on this
>       system monitored and recorded by system personnel.  In the course
>       of monitoring individuals improperly using this system, or in the
>       course of system maintenance, the activities of authorized users
>       may also be monitored.  Anyone using this system expressly
>       consents to such monitoring and is advised that if such
>       monitoring reveals possible criminal activity, system personnel
>       may provide the evidence of such monitoring to law enforcement
>       officials.
> 
>       Cisco Acceptable Use Policy:
>       http://wwwin.cisco.com/c/cec/organizations/security-trust/infosec/policies
> .html]0;C:\WINDOWS\System32\cmd.exe
[07:14:46.375] Got some output, clearing connection timeout
[07:14:47.361] > cb747be286c8: running
> Acquiring lock on /home/ubuntu/.vscode-server/bin/4af164ea3a06f701fe3e89a2bcbb42
> 1d2026b68f/vscode-remote-lock.ubuntu.4af164ea3a06f701fe3e89a2bcbb421d2026b68f   
> Installing to /home/ubuntu/.vscode-server/bin/4af164ea3a06f701fe3e89a2bcbb421d20
> 26b68f...
> cb747be286c8%%1%%
> Downloading with wget
[07:14:54.685] > wget download failed
> failed: Connection timed out.
> printenv:
>     SHELL=/bin/bash
[07:14:54.692] > 
>     PWD=/home/ubuntu/.vscode-server/bin/4af164ea3a06f701fe3e89a2bcbb421d2026b68f
>     LOGNAME=ubuntu
>     XDG_SESSION_TYPE=tty
>     MOTD_SHOWN=pam
>     HOME=/home/ubuntu
>     LANG=C.UTF-8
>     VSCODE_AGENT_FOLDER=/home/ubuntu/.vscode-server
>     SSH_CONNECTION=10.82.240.153 63898 64.102.189.72 22
>     XDG_SESSION_CLASS=user
>     USER=ubuntu
>     SHLVL=0
>     XDG_SESSION_ID=63
>     XDG_RUNTIME_DIR=/run/user/1000
>     SSH_CLIENT=10.82.240.153 63898 22
>     PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
> :/usr/local/games:/snap/bin
>     DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
>     OLDPWD=/home/ubuntu
>     _=/usr/bin/printenv
[07:14:54.695] > 
> Trigger local server download
> cb747be286c8:trigger_server_download
> platform==linux==
> vscodeArch==x64==
> destFolder==/home/ubuntu/.vscode-server/bin/==
> destFolder2==4af164ea3a06f701fe3e89a2bcbb421d2026b68f==
> cb747be286c8:trigger_server_download_end
> Waiting for client to transfer server archive...
> Waiting for /home/ubuntu/.vscode-server/bin/4af164ea3a06f701fe3e89a2bcbb421d2026
> b68f/vscode-scp-done.flag and vscode-server.tar.gz to exist
> 
[07:14:54.697] Got request to download on client for {"platform":"linux","arch":"x64","destFolder":"/home/ubuntu/.vscode-server/bin/4af164ea3a06f701fe3e89a2bcbb421d2026b68f"}
[07:14:54.698] Downloading VS Code server locally...
[07:14:58.248] Downloaded VS Code server to c:\Users\jpfuntne\AppData\Local\Temp\03ba8324-01be-4f4c-bd89-538da94836ae
[07:14:58.253] Renamed VS Code server to c:\Users\jpfuntne\AppData\Local\Temp\vscode_server_1655378098249\vscode-server.tar.gz
[07:14:58.257] Checking ssh with "C:\cygwin64\bin\ssh.exe -V"
[07:14:58.555] > OpenSSH_8.8p1, OpenSSL 1.1.1l  24 Aug 2021

[07:14:58.581] Expecting scp to be next to ssh at C:\cygwin64\bin\scp.exe
[07:14:58.582] Testing scp with "C:\cygwin64\bin\scp.exe"
[07:14:59.442] scp exited with code: 1
[07:14:59.442] Got stderr from scp: usage: scp [-346ABCOpqRrsTv] [-c cipher] [-D sftp_server_path] [-F ssh_config]
           [-i identity_file] [-J destination] [-l limit]
           [-o ssh_option] [-P port] [-S program] source ... target
[07:14:59.443] Using SSH config file "c:\users\jpfuntne\.ssh\config"
[07:14:59.445] Copying file to remote with "C:\cygwin64\bin\scp.exe" -F "c:\users\jpfuntne\.ssh\config" "vscode-server.tar.gz" "vscode-scp-done.flag" ubuntu:"/home/ubuntu/.vscode-server/bin/4af164ea3a06f701fe3e89a2bcbb421d2026b68f"
[07:14:59.447] Using cwd: file:///c%3A/Users/jpfuntne/AppData/Local/Temp/vscode_server_1655378098249
[07:14:59.447] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[07:15:00.744] >                                  WARNING!!!
>                     READ THIS BEFORE ATTEMPTING TO LOGON
> 
>       This System is for the use of authorized users only.  Individuals
>       using this computer without authority, or in excess of their
>       authority, are subject to having all of their activities on this
>       system monitored and recorded by system personnel.  In the course
>       of monitoring individuals improperly using this system, or in the
>       course of system maintenance, the activities of authorized users
>       may also be monitored.  Anyone using this system expressly
>       consents to such monitoring and is advised that if such
>       monitoring reveals possible criminal activity, system personnel
>       may provide the evidence of such monitoring to law enforcement
>       officials.
> 
>       Cisco Acceptable Use Policy:
>       http://wwwin.cisco.com/c/cec/organizations/security-trust/infosec/policies
> .html]0;C:\WINDOWS\System32\cmd.exe
[07:15:01.620] > vscode-server.tar.gz                            0%    0     0.0KB/s   --:-- ETA
[07:15:02.630] > vscode-server.tar.gz                           32%   17MB  17.0MB/s   00:02 ETA
[07:15:03.645] > vscode-server.tar.gz                           66%   36MB  17.1MB/s   00:01 ETA
[07:15:04.691] > vscode-server.tar.gz                          100%   54MB  17.4MB/s   00:03    
[07:15:04.705] > 
[07:15:04.722] > vscode-scp-done.flag                            0%    0     0.0KB/s   --:-- ETA
[07:15:04.736] > vscode-scp-done.flag                          100%    9     0.7KB/s   00:00    
[07:15:06.150] "Copy server to host" terminal command done
[07:15:06.702] > Found flag and server on host
> cb747be286c8%%2%%
> tar --version:
[07:15:06.717] > 
> tar (GNU tar) 1.30
> Copyright (C) 2017 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. 
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
> 
> Written by John Gilmore and Jay Fenlason.
[07:15:08.979] > Checking /home/ubuntu/.vscode-server/.4af164ea3a06f701fe3e89a2bcbb421d2026b68f.l
> og and /home/ubuntu/.vscode-server/.4af164ea3a06f701fe3e89a2bcbb421d2026b68f.pid
>  for a running server
[07:15:09.019] > Starting server with command... /home/ubuntu/.vscode-server/bin/4af164ea3a06f701
> fe3e89a2bcbb421d2026b68f/bin/code-server --start-server --host=127.0.0.1 --accep
> t-server-license-terms --enable-remote-auto-shutdown --port=0 --telemetry-level 
> all   &> "/home/ubuntu/.vscode-server/.4af164ea3a06f701fe3e89a2bcbb421d2026b68f.
> log" < /dev/null
> printenv:
>     SHELL=/bin/bash
>     PWD=/home/ubuntu
>     LOGNAME=ubuntu
>     XDG_SESSION_TYPE=tty
>     MOTD_SHOWN=pam
>     HOME=/home/ubuntu
>     LANG=C.UTF-8
>     VSCODE_AGENT_FOLDER=/home/ubuntu/.vscode-server
>     SSH_CONNECTION=10.82.240.153 63898 64.102.189.72 22
>     XDG_SESSION_CLASS=user
>     USER=ubuntu
>     SHLVL=0
>     XDG_SESSION_ID=63
>     XDG_RUNTIME_DIR=/run/user/1000
>     SSH_CLIENT=10.82.240.153 63898 22
>     PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
> :/usr/local/games:/snap/bin
>     DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
>     OLDPWD=/home/ubuntu/.vscode-server/bin/4af164ea3a06f701fe3e89a2bcbb421d2026b
> 68f
>     _=/usr/bin/printenv
> rm: cannot remove '/home/ubuntu/.vscode-server/.4af164ea3a06f701fe3e89a2bcbb421d
> 2026b68f.token': No such file or directory
[07:15:09.029] > 
> Spawned remote server: 60287
[07:15:09.036] > 
> Waiting for server log...
[07:15:09.052] > 
[07:15:09.080] > Waiting for server log...
[07:15:09.146] >  
> *
> * Reminder: You may only use this software with Visual Studio family products,  
> * as described in the license (https://go.microsoft.com/fwlink/?linkid=2077057) 
> *
> 
[07:15:09.171] > cb747be286c8: start
> SSH_AUTH_SOCK====
> DISPLAY====
> webUiAccessToken====
> listeningOn==35689==
> osReleaseId==ubuntu==
> arch==x86_64==
> tmpDir==/run/user/1000==
> platform==linux==
> unpackResult==success==
> didLocalDownload==1==
> downloadTime====
> installTime==2258==
> extInstallTime====
> serverStartTime==122==
> connectionToken==1a1a1a1a-1a1a-11a1-aa1a-1111a1111a1a==
[07:15:09.184] > cb747be286c8: end
[07:15:09.184] Received install output: 
SSH_AUTH_SOCK====
DISPLAY====
webUiAccessToken====
listeningOn==35689==
osReleaseId==ubuntu==
arch==x86_64==
tmpDir==/run/user/1000==
platform==linux==
unpackResult==success==
didLocalDownload==1==
downloadTime====
installTime==2258==
extInstallTime====
serverStartTime==122==
connectionToken==1a1a1a1a-1a1a-11a1-aa1a-1111a1111a1a==

[07:15:09.185] Remote server is listening on 35689
[07:15:09.185] Parsed server configuration: {"serverConfiguration":{"remoteListeningOn":{"port":35689},"osReleaseId":"ubuntu","arch":"x86_64","webUiAccessToken":"","sshAuthSock":"","display":"","tmpDir":"/run/user/1000","platform":"linux","connectionToken":"1a1a1a1a-1a1a-11a1-aa1a-1111a1111a1a"},"installTime":2258,"serverStartTime":122,"didLocalDownload":true,"installUnpackCode":"success"}
[07:15:09.193] Starting forwarding server. localPort 63909 -> socksPort 63895 -> remotePort 35689
[07:15:09.195] Forwarding server listening on 63909
[07:15:09.195] Waiting for ssh tunnel to be ready
[07:15:09.257] [Forwarding server 63909] Got connection 0
[07:15:09.260] Tunneled 35689 to local port 63909
[07:15:09.260] Resolved "ssh-remote+ubuntu" to "127.0.0.1:63909"
[07:15:09.272] ------




[07:15:09.300] [Forwarding server 63909] Got connection 1
[07:15:09.650] [Forwarding server 63909] Got connection 2

在 Linux 上:

$ find .vscode-server -type f | wc
   1798    1798  196423
$

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM