microsoft / vscode-remote-release

Visual Studio Code Remote Development: Open any folder in WSL, in a Docker container, or on a remote machine using SSH and take advantage of VS Code's full feature set.
https://aka.ms/vscode-remote
Other
3.67k stars 291 forks source link

[Remote-SSH Bug]: vscode server tries to ssh to `20.200.245.247` #10425

Closed jnooree closed 1 week ago

jnooree commented 1 week ago

Is there an existing issue for this bug?

Required Troubleshooting Steps

Connect Locally

It connects successfully

->

No response

Expected Behavior

It should not try to ssh to external hosts.

Steps To Reproduce

After connecting to a ssh host, the remote server tries to ssh to IP 20.200.245.247.

Remote-SSH Log

Remote-SSH Log

``` [11:22:48.589] Log Level: 2 [11:22:48.599] VS Code version: 1.95.0 [11:22:48.599] Remote-SSH version: remote-ssh@0.115.0 [11:22:48.599] darwin arm64 [11:22:48.600] SSH Resolver called for "ssh-remote+galaxy4", attempt 1 [11:22:48.601] "remote.SSH.useLocalServer": true [11:22:48.601] "remote.SSH.useExecServer": true [11:22:48.601] "remote.SSH.path": /opt/homebrew/bin/ssh [11:22:48.601] "remote.SSH.configFile": undefined [11:22:48.601] "remote.SSH.useFlock": true [11:22:48.601] "remote.SSH.lockfilesInTmp": false [11:22:48.601] "remote.SSH.localServerDownload": auto [11:22:48.601] "remote.SSH.remoteServerListenOnSocket": false [11:22:48.601] "remote.SSH.showLoginTerminal": true [11:22:48.602] "remote.SSH.defaultExtensions": [] [11:22:48.602] "remote.SSH.loglevel": 2 [11:22:48.602] "remote.SSH.enableDynamicForwarding": true [11:22:48.602] "remote.SSH.enableRemoteCommand": false [11:22:48.602] "remote.SSH.serverPickPortsFromRange": {} [11:22:48.602] "remote.SSH.serverInstallPath": {} [11:22:48.602] "remote.SSH.permitPtyAllocation": false [11:22:48.602] "remote.SSH.preferredLocalPortRange: undefined [11:22:48.602] "remote.SSH.useCurlAndWgetConfigurationFiles: false [11:22:48.613] SSH Resolver called for host: galaxy4 [11:22:48.613] Setting up SSH remote "galaxy4" [11:22:48.617] Acquiring local install lock: /var/folders/sr/_g9n7d1x5ks_bdmm9_yrhsdh0000gn/T/vscode-remote-ssh-0b479b3f-install.lock [11:22:48.618] Looking for existing server data file at /Users/jnooree/Applications/code-portable-data/user-data/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-0b479b3f-912bb683695358a54ae0c670461738984cbb5b95-0.115.0-es/data.json [11:22:48.618] No existing data file [11:22:48.618] Using commit id "912bb683695358a54ae0c670461738984cbb5b95" and quality "stable" for server [11:22:48.621] Script variables: { "InstallExitCode.24": "AlreadyInProgress", "InstallExitCode.25": "ServerDownloadFailed", "InstallExitCode.26": "NoDownloaderAvailable", "InstallExitCode.27": "UnsupportedArch", "InstallExitCode.28": "StatusCheckFailed", "InstallExitCode.29": "NeedInsidersArch", "InstallExitCode.30": "NoDownloaderAvailableForStatusCheck", "InstallExitCode.31": "ServerTransferFailed", "InstallExitCode.32": "ServerFailedToStart", "InstallExitCode.33": "NeedInsidersWindows", "InstallExitCode.34": "CreateInstallDirFailed", "InstallExitCode.35": "UnsupportedPlatform", "InstallExitCode.36": "ServerTerminatedCVE20201416", "InstallExitCode.37": "UnpackFailed", "InstallExitCode.38": "ChangeDirFailed", "InstallExitCode.AlreadyInProgress": "24", "InstallExitCode.ServerDownloadFailed": "25", "InstallExitCode.NoDownloaderAvailable": "26", "InstallExitCode.NoDownloaderAvailableForStatusCheck": "30", "InstallExitCode.UnsupportedArch": "27", "InstallExitCode.StatusCheckFailed": "28", "InstallExitCode.NeedInsidersArch": "29", "InstallExitCode.ServerTransferFailed": "31", "InstallExitCode.ServerFailedToStart": "32", "InstallExitCode.NeedInsidersWindows": "33", "InstallExitCode.CreateInstallDirFailed": "34", "InstallExitCode.UnsupportedPlatform": "35", "InstallExitCode.ServerTerminatedCVE20201416": "36", "InstallExitCode.UnpackFailed": "37", "InstallExitCode.ChangeDirFailed": "38", "InstallUnpackCode.Success": "success", "InstallUnpackCode.Error": "error", "InstallUnpackCode.MissingFiles": "missingFiles", "uuid": "a443aba5db95", "startMarker": "a443aba5db95: running", "commitId": "912bb683695358a54ae0c670461738984cbb5b95", "quality": "stable", "token": "1a11a11a-11aa-1a1a-aaa1-a1a11a1a1111", "vscodeAgentFolder": "$HOME/.vscode-server", "allowClientDownload": "1", "forceClientDownload": "0", "cliNameInArchive": "code", "ignoreWgetConfigFlag": " --no-config ", "ignoreCurlConfigFlag": " --disable ", "wgetTriesSegment": "--tries=1", "listenArgs": "--on-host=127.0.0.1 --on-port", "getDownloadServerStartTrigger": "a443aba5db95:trigger_server_download", "getDownloadServerEndTrigger": "a443aba5db95:trigger_server_download_end", "getProgressDownloading": "a443aba5db95%%1%%", "getProgressInstalling": "a443aba5db95%%2%%" } [11:22:48.623] Install and start server if needed [11:22:48.627] Checking ssh with "/opt/homebrew/bin/ssh -V" [11:22:48.638] > OpenSSH_9.9p1, OpenSSL 3.4.0 22 Oct 2024 [11:22:48.641] askpass server listening on /var/folders/sr/_g9n7d1x5ks_bdmm9_yrhsdh0000gn/T/vscode-ssh-askpass-88612f22e1af454af59d4790c8691cbf111d6b8d.sock [11:22:48.642] Spawning local server with {"serverId":1,"ipcHandlePath":"/var/folders/sr/_g9n7d1x5ks_bdmm9_yrhsdh0000gn/T/vscode-ssh-askpass-7570d1f0a00db158b7399fb4efb341a0488e3c34.sock","sshCommand":"/opt/homebrew/bin/ssh","sshArgs":["-v","-T","-D","49740","-o","ConnectTimeout=15","galaxy4","bash"],"serverDataFolderName":".vscode-server","dataFilePath":"/Users/jnooree/Applications/code-portable-data/user-data/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-0b479b3f-912bb683695358a54ae0c670461738984cbb5b95-0.115.0-es/data.json"} [11:22:48.642] Local server env: {"SSH_AUTH_SOCK":"/private/tmp/com.apple.launchd.Oyga07Bo8W/Listeners","SHELL":"/opt/homebrew/bin/zsh","DISPLAY":"/private/tmp/com.apple.launchd.D7ELcD9E3K/org.xquartz:0","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"/Users/jnooree/Applications/code-portable-data/extensions/ms-vscode-remote.remote-ssh-0.115.0/out/local-server/askpass.sh","VSCODE_SSH_ASKPASS_NODE":"/Users/jnooree/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin)","VSCODE_SSH_ASKPASS_EXTRA_ARGS":"","VSCODE_SSH_ASKPASS_MAIN":"/Users/jnooree/Applications/code-portable-data/extensions/ms-vscode-remote.remote-ssh-0.115.0/out/askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"/var/folders/sr/_g9n7d1x5ks_bdmm9_yrhsdh0000gn/T/vscode-ssh-askpass-88612f22e1af454af59d4790c8691cbf111d6b8d.sock"} [11:22:48.642] Spawned 6331 [11:22:48.643] Using connect timeout of 17 seconds [11:22:48.717] > local-server-1> Running ssh connection command: /opt/homebrew/bin/ssh -v -T -D 49740 -o ConnectTimeout=15 galaxy4 bash [11:22:48.718] > local-server-1> Spawned ssh, pid=6332 [11:22:48.726] stderr> OpenSSH_9.9p1, OpenSSL 3.4.0 22 Oct 2024 [11:22:48.881] > ready: a443aba5db95 [11:22:48.901] > Linux 5.15.0-119-generic #129-Ubuntu SMP Fri Aug 2 19:25:20 UTC 2024 [11:22:48.901] Platform: linux [11:22:48.921] > /bin/zsh [11:22:48.921] Parent Shell: zsh [11:22:48.921] Parent Shell pid: 6331 [11:22:48.943] > 36013 [11:22:48.943] Waiting for pid of spawned 'sh' subshell: '36013'... [11:22:48.945] > a443aba5db95: running > Script executing under PID: 36013 [11:22:48.954] > Found existing installation at /data/galaxy4/user/jnooree/.vscode-server... > Starting VS Code CLI... > printenv: [11:22:48.956] > LIBRARY_PATH=/opt/intel/oneapi/mkl/2023.1.0/lib/intel64 > MAIL=/data/galaxy4/user/jnooree/mail > USER=jnooree > SSH_CLIENT=172.23.255.3 47842 22 > XDG_SESSION_TYPE=tty > OPENBLAS_NUM_THREADS=8 > SHLVL=1 > LD_LIBRARY_PATH=/opt/intel/oneapi/mkl/2023.1.0/lib/intel64 > LESS=-RM~gi > MOTD_SHOWN=pam > HOME=/data/galaxy4/user/jnooree > LC_RSUB_PORT=58024 > OLDPWD=/data/galaxy4/user/jnooree > MANROFFOPT=-c > ALPHAFOLD_CONDA_PREFIX=/opt/conda > HOMEBREW_PREFIX=/home/linuxbrew/.linuxbrew > PAGER=less > DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1007/bus > PYTHONNOUSERSITE=1 > LC_TERMINAL_VERSION=3.5.5 > INFOPATH=/home/linuxbrew/.linuxbrew/share/info: > HDF5_USE_FILE_LOCKING=FALSE > LOGNAME=jnooree > FFTWDIR=/opt/fftw/current > ALPHAFOLD_HOME=/applic/AlphaFold/current > _=/usr/bin/sh > SLURM_HOME=/opt/slurm/current > PKG_CONFIG_PATH=/opt/intel/oneapi/mkl/2023.1.0/lib/pkgconfig > XDG_SESSION_CLASS=user > XDG_SESSION_ID=19464 > MKL_HOME=/opt/intel/oneapi/mkl/latest > PATH=/data/galaxy4/user/jnooree/bin:/data/galaxy4/user/jnooree/.local/bin:/home/linuxbrew/.linuxbrew/opt/coreutils/libexec/gnubin:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/opt/slurm/current/bin:/opt/slurm/bin:/opt/conda/envs/gp/bin:/opt/mpi/mpich-gcc/bin:/opt/ldap/sbin:/opt/ldap/bin:/opt/intel/oneapi/mkl/2023.1.0/bin/intel64:/opt/hdf5/current/bin:/applic/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/opt/rsub:/opt/nvtop/current/bin:/home/linuxbrew/.linuxbrew/bin:/opt/chimera/current/bin:/applic/Galaxy/current/bin:/opt/intel/oneapi/compiler/latest/linux/bin/intel64:/applic/rosetta/current/bin > MPI_HOME=/opt/mpi/mpich-gcc > HOMEBREW_CELLAR=/home/linuxbrew/.linuxbrew/Cellar > XDG_RUNTIME_DIR=/run/user/1007 > DISPLAY=localhost:12.0 > LANG=en_US.UTF-8 > MANPAGER=less > SHELL=/bin/zsh > ROSETTA_HOME=/applic/rosetta/current > MKLROOT=/opt/intel/oneapi/mkl/2023.1.0 > INTEL_HOME=/opt/intel > NUMEXPR_NUM_THREADS=8 > LC_TERMINAL=iTerm2 > NLSPATH=/opt/intel/oneapi/mkl/2023.1.0/lib/intel64/locale/%l_%t/%N > GALAXY_HOME=/applic/Galaxy/current > LC_HOSTNAME=labmac > PWD=/data/galaxy4/user/jnooree > RF2AA_DATA_HOME=/store/RF2AA > SSH_CONNECTION=172.23.255.3 47842 172.23.255.4 22 > ZDOTDIR=/data/galaxy4/user/jnooree/.config/zsh > XDG_DATA_DIRS=/home/linuxbrew/.linuxbrew/share:/usr/local/share:/usr/share:/var/lib/snapd/desktop:/home/linuxbrew/.linuxbrew/share > MKL_NUM_THREADS=8 > SHORT_HOST=galaxy4 > HOMEBREW_REPOSITORY=/home/linuxbrew/.linuxbrew/Homebrew > OMP_NUM_THREADS=8 > CPATH=/opt/intel/oneapi/mkl/2023.1.0/include [11:22:48.957] > Removing old logfile at /data/galaxy4/user/jnooree/.vscode-server/.cli.912bb683695358a54ae0c670461738984cbb5b95.log [11:22:48.957] > Spawned remote CLI: 36031 [11:22:48.961] > Waiting for server log... [11:22:48.997] > a443aba5db95: start > listeningOn==127.0.0.1:37799== > osReleaseId==ubuntu== > arch==x86_64== > vscodeArch==x64== > bitness==64== > tmpDir==/run/user/1007== > platform==linux== > unpackResult==== > didLocalDownload==0== > downloadTime==== > installTime==== > serverStartTime==39== > execServerToken==1a11a11a-11aa-1a1a-aaa1-a1a11a1a1111== > platformDownloadPath==cli-alpine-x64== > a443aba5db95: end [11:22:48.997] Received install output: listeningOn==127.0.0.1:37799== osReleaseId==ubuntu== arch==x86_64== vscodeArch==x64== bitness==64== tmpDir==/run/user/1007== platform==linux== unpackResult==== didLocalDownload==0== downloadTime==== installTime==== serverStartTime==39== execServerToken==1a11a11a-11aa-1a1a-aaa1-a1a11a1a1111== platformDownloadPath==cli-alpine-x64== [11:22:48.998] Remote server is listening on port 37799 [11:22:48.998] Parsed server configuration: {"serverConfiguration":{"remoteListeningOn":{"port":37799},"osReleaseId":"ubuntu","arch":"x86_64","tmpDir":"/run/user/1007","platform":"linux","execServerToken":"1a11a11a-11aa-1a1a-aaa1-a1a11a1a1111"},"serverStartTime":39,"installUnpackCode":""} [11:22:48.998] Persisting server connection details to /Users/jnooree/Applications/code-portable-data/user-data/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-0b479b3f-912bb683695358a54ae0c670461738984cbb5b95-0.115.0-es/data.json [11:22:49.005] Starting forwarding server. local port 49741 -> socksPort 49740 -> remotePort 37799 [11:22:49.005] Forwarding server listening on port 49741 [11:22:49.005] Waiting for ssh tunnel to be ready [11:22:49.007] [Forwarding server port 49741] Got connection 0 [11:22:49.008] Tunneled port 37799 to local port 49741 [11:22:49.009] Resolved "ssh-remote+galaxy4" to "port 49741" [11:22:49.022] Initizing new exec server for ssh-remote+galaxy4 [11:22:49.022] Resolving exec server at port 49741 [11:22:49.025] [Forwarding server port 49741] Got connection 1 [11:22:49.077] Exec server for ssh-remote+galaxy4 created and cached [11:22:49.083] ------ [11:22:49.093] [server] Checking /data/galaxy4/user/jnooree/.vscode-server/cli/servers/Stable-912bb683695358a54ae0c670461738984cbb5b95/log.txt and /data/galaxy4/user/jnooree/.vscode-server/cli/servers/Stable-912bb683695358a54ae0c670461738984cbb5b95/pid.txt for a running server... [11:22:49.135] [server] Installing and setting up Visual Studio Code Server... [11:22:49.135] [server] Server setup complete [11:22:49.135] [server] Starting server... [11:22:49.135] [server] Starting server with command... Command { std: "/data/galaxy4/user/jnooree/.vscode-server/cli/servers/Stable-912bb683695358a54ae0c670461738984cbb5b95/server/bin/code-server" "--connection-token=remotessh" "--accept-server-license-terms" "--start-server" "--enable-remote-auto-shutdown" "--socket-path=/tmp/code-74747c77-34a9-4c6f-8cd1-19b62ef67560", kill_on_drop: false } [11:22:49.162] [server] * [11:22:49.163] [server] * Visual Studio Code Server [11:22:49.163] [server] * [11:22:49.163] [server] * By using the software, you agree to [11:22:49.163] [server] * the Visual Studio Code Server License Terms (https://aka.ms/vscode-server-license) and [11:22:49.165] [server] Server bound to /tmp/code-74747c77-34a9-4c6f-8cd1-19b62ef67560 [11:22:49.165] [server] Extension host agent listening on /tmp/code-74747c77-34a9-4c6f-8cd1-19b62ef67560 [11:22:49.165] [server] parsed location: "/tmp/code-74747c77-34a9-4c6f-8cd1-19b62ef67560" [11:22:49.165] [server] [11:22:49.165] [server] Server started [11:22:49.210] [server] [11:22:49] [11:22:49.250] [server] [11:22:49.251] [server] [11:22:49.251] [server] [11:22:49.251] [server] [11:22:49] Extension host agent started. [11:22:49.307] [server] [11:22:49] [][0fe9c316][ExtensionHostConnection] New connection established. [11:22:49.355] [server] [11:22:49] [][07456fdd][ManagementConnection] New connection established. [11:22:49.772] [server] [11:22:49] [][0fe9c316][ExtensionHostConnection] <36243> Launched Extension Host Process. [11:27:49.254] [server] New EH opened, aborting shutdown [11:27:49.255] [server] [11:27:49] New EH opened, aborting shutdown ```

Anything else?

Issue discovered after updating to VSCode v1.95.0.

jnooree commented 1 week ago

It turns out the IP address is github's.. Sorry for false report.