skip to Main Content

I’m trying to connect to an SSH using the Remote SSH extension from VSCode on macOS. If the .vscode-server folder is removed before connecting, there are no issues, but if I connect without removing the folder, I always get the following error output :

[13:34:47.469] Log Level: 2
[13:34:47.473] VS Code version: 1.93.1
[13:34:47.473] Remote-SSH version: [email protected]
[13:34:47.474] darwin arm64
[13:34:47.505] SSH Resolver called for "ssh-remote+lxplus.cern.ch", attempt 1
[13:34:47.505] "remote.SSH.useLocalServer": true
[13:34:47.505] "remote.SSH.useExecServer": true
[13:34:47.505] "remote.SSH.path": undefined
[13:34:47.505] "remote.SSH.configFile": undefined
[13:34:47.505] "remote.SSH.useFlock": false
[13:34:47.505] "remote.SSH.lockfilesInTmp": false
[13:34:47.505] "remote.SSH.localServerDownload": off
[13:34:47.505] "remote.SSH.remoteServerListenOnSocket": false
[13:34:47.505] "remote.SSH.showLoginTerminal": false
[13:34:47.505] "remote.SSH.defaultExtensions": []
[13:34:47.505] "remote.SSH.loglevel": 2
[13:34:47.505] "remote.SSH.enableDynamicForwarding": true
[13:34:47.505] "remote.SSH.enableRemoteCommand": false
[13:34:47.505] "remote.SSH.serverPickPortsFromRange": {}
[13:34:47.506] "remote.SSH.serverInstallPath": {}
[13:34:47.506] "remote.SSH.permitPtyAllocation": false
[13:34:47.506] "remote.SSH.preferredLocalPortRange: undefined
[13:34:47.506] "remote.SSH.useCurlAndWgetConfigurationFiles: false
[13:34:47.511] SSH Resolver called for host: lxplus.cern.ch
[13:34:47.511] Setting up SSH remote "lxplus.cern.ch"
[13:34:47.512] Acquiring local install lock: /var/folders/rt/72c0n6gd3wld6hp5crbmwf280000gn/T/vscode-remote-ssh-47bf8c66-install.lock
[13:34:47.513] Looking for existing server data file at /Users/my_mac/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-47bf8c66-38c31bc77e0dd6ae88a4e9cc93428cc27a56ba40-0.114.3-es/data.json
[13:34:47.513] No existing data file
[13:34:47.514] Using commit id "38c31bc77e0dd6ae88a4e9cc93428cc27a56ba40" and quality "stable" for server
[13:34:47.515] 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": "da30ed639cd0",
  "startMarker": "da30ed639cd0: running",
  "commitId": "38c31bc77e0dd6ae88a4e9cc93428cc27a56ba40",
  "quality": "stable",
  "token": "111aaa1a-1a1a-1111-aaa1-11aaaa111111",
  "vscodeAgentFolder": "$HOME/.vscode-server",
  "allowClientDownload": "0",
  "forceClientDownload": "0",
  "cliNameInArchive": "code",
  "ignoreWgetConfigFlag": " --no-config ",
  "ignoreCurlConfigFlag": " --disable ",
  "wgetTriesSegment": "",
  "listenArgs": "--on-host=127.0.0.1 --on-port",
  "getDownloadServerStartTrigger": "da30ed639cd0:trigger_server_download",
  "getDownloadServerEndTrigger": "da30ed639cd0:trigger_server_download_end",
  "getProgressDownloading": "da30ed639cd0%%1%%",
  "getProgressInstalling": "da30ed639cd0%%2%%"
}
[13:34:47.516] Install and start server if needed
[13:34:47.518] PATH: /Applications/root_v6.32.04/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/X11/bin:/Library/Apple/usr/bin
[13:34:47.518] Checking ssh with "ssh -V"
[13:34:47.524] > OpenSSH_9.8p1, LibreSSL 3.3.6

[13:34:47.526] askpass server listening on /var/folders/rt/72c0n6gd3wld6hp5crbmwf280000gn/T/vscode-ssh-askpass-9d12f0528c2e4817d57e6b951b7b7813039fb82b.sock
[13:34:47.526] Spawning local server with {"serverId":1,"ipcHandlePath":"/var/folders/rt/72c0n6gd3wld6hp5crbmwf280000gn/T/vscode-ssh-askpass-3180c3db80881db9f4075406323f5da54a89cf28.sock","sshCommand":"ssh","sshArgs":["-v","-T","-D","57734","-o","ConnectTimeout=1000","lxplus.cern.ch"],"serverDataFolderName":".vscode-server","dataFilePath":"/Users/my_mac/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-47bf8c66-38c31bc77e0dd6ae88a4e9cc93428cc27a56ba40-0.114.3-es/data.json"}
[13:34:47.526] Local server env: {"SSH_AUTH_SOCK":"/private/tmp/com.apple.launchd.VdGKbaBO0d/Listeners","SHELL":"/bin/zsh","DISPLAY":"/private/tmp/com.apple.launchd.s4LyOLCq5R/org.xquartz:0","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"/Users/my_mac/.vscode/extensions/ms-vscode-remote.remote-ssh-0.114.3/out/local-server/askpass.sh","VSCODE_SSH_ASKPASS_NODE":"/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/my_mac/.vscode/extensions/ms-vscode-remote.remote-ssh-0.114.3/out/askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"/var/folders/rt/72c0n6gd3wld6hp5crbmwf280000gn/T/vscode-ssh-askpass-9d12f0528c2e4817d57e6b951b7b7813039fb82b.sock"}
[13:34:47.527] Spawned 16806
[13:34:47.592] > local-server-1> Running ssh connection command: ssh -v -T -D 57734 -o ConnectTimeout=1000 lxplus.cern.ch
[13:34:47.595] > local-server-1> Spawned ssh, pid=16810
[13:34:47.596] stderr> OpenSSH_9.8p1, LibreSSL 3.3.6
[13:34:47.665] stderr> debug1: Server host key: ssh-ed25519 SHA256:xOtCWmpDSZenkpkC7zNvTW0l8eh3kXaStmqZC3UVcAk
[13:34:47.854] Got askpass request: {"request":" ([email protected]) Password: "}
[13:34:47.854] Showing password prompt
[13:34:47.855] Listening for interwindow password on /var/folders/rt/72c0n6gd3wld6hp5crbmwf280000gn/T/vscode-ssh-askpass-75695283b8817dcc32f04fc6c25070b9f05177de.sock
[13:34:47.855] Writing password prompt to globalState
[13:34:55.146] Got password response
[13:34:55.146] Interactor gave response: ********************
[13:34:55.147] Cleaning up other-window auth server
[13:34:55.236] stderr> Authenticated to lxplus.cern.ch ([188.185.22.153]:22) using "keyboard-interactive".
[13:34:55.726] > * ********************************************************************
> * Welcome to lxplus982.cern.ch, Red Hat Enterprise Linux release 9.4 (Plow)
> * Archive of news is available in /etc/motd-archive
> * Reminder: you have agreed to the CERN
> *   computing rules, in particular OC5. CERN implements
> *   the measures necessary to ensure compliance.
> *   https://cern.ch/ComputingRules
> * Puppet environment: production, Roger state: production
> * Foreman hostgroup: lxplus/nodes/login
> * Availability zone: cern-geneva-b
> * LXPLUS Public Login Service - http://lxplusdoc.web.cern.ch/
> * Please read LXPLUS Privacy Notice in http://cern.ch/go/TpV7
> * ********************************************************************
> * October 1st: Two AuthZ and AuthN Changes on LxPlus/LxTunnel
> *  https://cern.ch/otg0151290 and https://cern.ch/otg0150912
[13:34:57.211] > ready: da30ed639cd0
[13:34:57.223] > Linux 5.14.0-427.33.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Aug 16 10:56:24 EDT 2024
[13:34:57.224] Platform: linux
[13:34:57.234] > /bin/bash
[13:34:57.235] Parent Shell: bash
[13:34:57.235] Parent Shell pid: 16806
[13:34:57.246] > 2406889
[13:34:57.247] Waiting for pid of spawned 'sh' subshell: '2406889'...
[13:34:57.262] > da30ed639cd0: running
> Script executing under PID: 2406889
[13:34:57.280] > Found existing installation at /afs/cern.ch/user/a/my_ID/.vscode-server...
> Starting VS Code CLI...
> printenv:
[13:34:57.281] >     SHELL=/bin/bash
>     LBENV_ENTRYPOINT=/cvmfs/lhcb.cern.ch/lib/LbEnv-stable.sh
>     LCG_RELEASES=/cvmfs/lhcb.cern.ch/lib/lcg/releases
>     LHCBDOC=/eos/project/l/lhcbwebsites/www/projects
>     EOS_MGM_URL=root://eoslhcb.cern.ch
>     LCG_GFAL_INFOSYS=lcg-bdii.cern.ch:2170
>     HISTCONTROL=ignoredups
>     CASTOR_HOME=/castor/cern.ch/user/a/my_ID
>     EMACSDIR=/cvmfs/lhcb.cern.ch/lib/lhcb/TOOLS/Tools/Emacs/pro
>     HOSTNAME=lxplus982.cern.ch
>     HISTSIZE=1000
>     OS_REGION_NAME=cern
>     OS_PROJECT_DOMAIN_ID=default
>     GUESTFISH_OUTPUT=e[0m
>     MYSITEROOT=/cvmfs/lhcb.cern.ch/lib
>     EDITOR=/bin/nano -w
>     KRB5CCNAME=FILE:/run/user/159775/krb5cc
>     PWD=/afs/cern.ch/user/a/my_ID
>     LOGNAME=my_ID
>     XDG_SESSION_TYPE=tty
>     MODULESHOME=/usr/share/Modules
>     MANPATH=/usr/share/man:/opt/puppetlabs/puppet/share/man
>     MESA_GLSL_CACHE_DIR=/run/user/159775
>     MYPROXY_SERVER=myproxy.cern.ch
>     X509_VOMS_DIR=/cvmfs/lhcb.cern.ch/etc/grid-security/vomsdir
>     OS_AUTH_URL=https://keystone.cern.ch/v3
>     GUESTFISH_RESTORE=e[0m
>     MOTD_SHOWN=pam
>     LBTELEMETRY_ENABLED=x
>     __MODULES_SHARE_MANPATH=
>     STAGE_HOST=castorlhcb.cern.ch
>     HOME=/afs/cern.ch/user/a/my_ID
>     SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
>     LANG=en_US.UTF-8
>     X509_VOMSES=/cvmfs/lhcb.cern.ch/etc/grid-security/vomses
>     VIRTUAL_ENV_DISABLE_PROMPT=1
>     GUESTFISH_PS1=[e[1;32m]><fs>[e[0;31m] 
>     TMPDIR=/tmp/my_ID
>     CMAKE_PREFIX_PATH=/cvmfs/lhcb.cern.ch/lib/lhcb:/cvmfs/lhcb.cern.ch/lib/lcg/releases:/cvmfs/lhcb.cern.ch/lib/lcg/app/releases:/cvmfs/lhcb.cern.ch/lib/lcg/external:/cvmfs/lhcb.cern.ch/lib/contrib:/cvmfs/lhcb.cern.ch/lib/var/lib/LbEnv/3297/stable/linux-64/lib/python3.12/site-packages/LbDevTools/data/cmake
>     SSH_CONNECTION=134.158.153.61 57735 188.185.22.153 22
>     LBENV_PREFIX=/cvmfs/lhcb.cern.ch/lib/var/lib/LbEnv/3297/stable/linux-64
>     LHCBRELEASES=/cvmfs/lhcb.cern.ch/lib/lhcb
>     KUBECACHEDIR=/run/user/159775/kubecache
>     LBENV_SOURCED=2.2.2
>     XDG_SESSION_CLASS=user
>     SELINUX_ROLE_REQUESTED=
>     LESSOPEN=||/usr/bin/lesspipe.sh %s
>     USER=my_ID
>     LCG_external_area=/cvmfs/lhcb.cern.ch/lib/lcg/external
>     CONDA_SHLVL=0
>     MODULES_RUN_QUARANTINE=LD_LIBRARY_PATH LD_PRELOAD
>     OS_VOLUME_API_VERSION=3
>     LOADEDMODULES=
>     X509_CERT_DIR=/cvmfs/lhcb.cern.ch/etc/grid-security/certificates
>     SELINUX_USE_CURRENT_RANGE=
>     DISPLAY=localhost:21.0
>     LHCBDEV=/afs/cern.ch/lhcb/software/DEV
>     OS_IDENTITY_PROVIDER=sssd
>     SHLVL=2
>     LHCBNIGHTLIES=/cvmfs/lhcbdev.cern.ch/nightlies
>     LBENV_FLAVOUR=stable
>     GUESTFISH_INIT=e[1;34m
>     CVS_RSH=ssh
>     LBENV_ALIASES=/cvmfs/lhcb.cern.ch/lib/var/lib/LbEnv/3297/stable/linux-64/lib/python3.12/site-packages/LbEnv/data/aliases.sh
>     XDG_SESSION_ID=13607
>     OS_AUTH_TYPE=v3fedkerb
>     XDG_RUNTIME_DIR=/run/user/159775
>     OS_MUTUAL_AUTH=disabled
>     S_COLORS=auto
>     SSH_CLIENT=134.158.153.61 57735 22
>     __MODULES_LMINIT=module use --append /usr/share/Modules/modulefiles:module use --append /etc/modulefiles:module use --append /usr/share/modulefiles
>     OS_PROJECT_NAME=Personal my_ID
>     which_declare=declare -f
>     KDEDIRS=/usr
>     OS_PROTOCOL=kerberos
>     PATH=/cvmfs/lhcb.cern.ch/lib/bin/x86_64-el9:/cvmfs/lhcb.cern.ch/lib/bin/Linux-x86_64:/cvmfs/lhcb.cern.ch/lib/bin:/cvmfs/lhcb.cern.ch/lib/var/lib/LbEnv/3297/stable/linux-64/bin:/usr/sue/bin:/usr/share/Modules/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/opt/puppetlabs/bin:/afs/cern.ch/user/a/my_ID/.local/bin:/afs/cern.ch/user/a/my_ID/bin
>     SELINUX_LEVEL_REQUESTED=
>     MODULEPATH=/usr/share/Modules/modulefiles:/etc/modulefiles:/usr/share/modulefiles
>     DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/159775/bus
>     LCG_hostos=x86_64-el9
>     MAIL=/var/spool/mail/my_ID
>     MESA_SHADER_CACHE_DIR=/run/user/159775
>     OS_COMPUTE_API_VERSION=2.72
>     OS_IDENTITY_API_VERSION=3
>     MODULES_CMD=/usr/share/Modules/libexec/modulecmd.tcl
>     BASH_FUNC_ml%%=() {  module ml "$@"
>     }
>     BASH_FUNC_which%%=() {  ( alias;
>      eval ${which_declare} ) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot $@
>     }
>     BASH_FUNC_module%%=() {  local _mlredir=0;
>      if [ -n "${MODULES_REDIRECT_OUTPUT+x}" ]; then
>      if [ "$MODULES_REDIRECT_OUTPUT" = '0' ]; then
>      _mlredir=0;
>      else
>      if [ "$MODULES_REDIRECT_OUTPUT" = '1' ]; then
>      _mlredir=1;
>      fi;
>      fi;
>      fi;
>      case " $@ " in 
>      *' --no-redirect '*)
>      _mlredir=0
>      ;;
>      *' --redirect '*)
>      _mlredir=1
>      ;;
>      esac;
>      if [ $_mlredir -eq 0 ]; then
>      _module_raw "$@";
>      else
>      _module_raw "$@" 2>&1;
>      fi
>     }
>     BASH_FUNC_scl%%=() {  if [ "$1" = "load" -o "$1" = "unload" ]; then
>      eval "module $@";
>      else
>      /usr/bin/scl "$@";
>      fi
>     }
>     BASH_FUNC__module_raw%%=() {  eval "$(/usr/bin/tclsh '/usr/share/Modules/libexec/modulecmd.tcl' bash "$@")";
>      _mlstatus=$?;
>      return $_mlstatus
>     }
>     _=/usr/bin/printenv
[13:34:57.284] > Removing old logfile at /afs/cern.ch/user/a/my_ID/.vscode-server/.cli.38c31bc77e0dd6ae88a4e9cc93428cc27a56ba40.log
[13:34:57.292] > Spawned remote CLI: 2406907
[13:34:57.293] stderr> cat: /afs/cern.ch/user/a/my_ID/.vscode-server/.cli.38c31bc77e0dd6ae88a4e9cc93428cc27a56ba40.log: No such file or directory
[13:34:57.294] > Waiting for server log...
[13:34:57.329] > Waiting for server log...
[13:34:57.363] > Waiting for server log...
[13:34:57.397] > Waiting for server log...
[13:34:57.432] > Waiting for server log...
[13:34:57.469] > Waiting for server log...
[13:34:57.502] > Waiting for server log...
[13:34:57.536] > Waiting for server log...
[13:34:57.576] > Waiting for server log...
[13:34:57.609] > Waiting for server log...
[13:34:57.644] > Waiting for server log...
[13:34:57.679] > Waiting for server log...
[13:34:57.713] > Waiting for server log...
[13:34:57.747] > Waiting for server log...
[13:34:57.780] > Waiting for server log...
[13:34:57.814] > da30ed639cd0: start
> listeningOn====
> osReleaseId==rhel==
> arch==x86_64==
> vscodeArch==x64==
> bitness==64==
> tmpDir==/run/user/159775==
> platform==linux==
> unpackResult====
> didLocalDownload==0==
> downloadTime====
> installTime====
> serverStartTime==530==
> execServerToken==111aaa1a-1a1a-1111-aaa1-11aaaa111111==
> platformDownloadPath==cli-alpine-x64==
> da30ed639cd0: end
[13:34:57.814] Received install output: 
listeningOn====
osReleaseId==rhel==
arch==x86_64==
vscodeArch==x64==
bitness==64==
tmpDir==/run/user/159775==
platform==linux==
unpackResult====
didLocalDownload==0==
downloadTime====
installTime====
serverStartTime==530==
execServerToken==111aaa1a-1a1a-1111-aaa1-11aaaa111111==
platformDownloadPath==cli-alpine-x64==

[13:34:57.815] Failed to parse remote port from server output
[13:34:57.816] Terminating local server
[13:34:57.819] Resolver error: Error: 
    at v.Create (/Users/my_mac/.vscode/extensions/ms-vscode-remote.remote-ssh-0.114.3/out/extension.js:2:501404)
    at t.handleInstallOutput (/Users/my_mac/.vscode/extensions/ms-vscode-remote.remote-ssh-0.114.3/out/extension.js:2:498726)
    at e (/Users/my_mac/.vscode/extensions/ms-vscode-remote.remote-ssh-0.114.3/out/extension.js:2:553052)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /Users/my_mac/.vscode/extensions/ms-vscode-remote.remote-ssh-0.114.3/out/extension.js:2:575341
    at async t.withShowDetailsEvent (/Users/my_mac/.vscode/extensions/ms-vscode-remote.remote-ssh-0.114.3/out/extension.js:2:579017)
    at async /Users/my_mac/.vscode/extensions/ms-vscode-remote.remote-ssh-0.114.3/out/extension.js:2:549757
    at async T (/Users/my_mac/.vscode/extensions/ms-vscode-remote.remote-ssh-0.114.3/out/extension.js:2:547808)
    at async t.resolveWithLocalServer (/Users/my_mac/.vscode/extensions/ms-vscode-remote.remote-ssh-0.114.3/out/extension.js:2:549297)
    at async k (/Users/my_mac/.vscode/extensions/ms-vscode-remote.remote-ssh-0.114.3/out/extension.js:2:572473)
    at async t.resolve (/Users/my_mac/.vscode/extensions/ms-vscode-remote.remote-ssh-0.114.3/out/extension.js:2:576428)
    at async /Users/my_mac/.vscode/extensions/ms-vscode-remote.remote-ssh-0.114.3/out/extension.js:2:844803
[13:34:57.823] ------

I tried to put remote.SSH.useFlock to off, switch to pre-release version but it doesn’t change anything

Edit : Removing the extensions.json file or the entire extensions directory prevent the SSH connection from failing. VSCode recreates the extensions part, and I’m in! But it is not viable…

2

Answers


  1. In your .vscode-server there is config related cern.ch. cern.ch is not resolvable from your current network. Are you using anykind of VPN for private DNS server?

    Login or Signup to reply.
  2. I have the exact same problem when I connect to lxplus from my mac.

    I have also tried to permit Pty allocation to avoid the -T flag when running ssh (after finding https://github.com/microsoft/vscode-remote-release/issues/7673) but this does not solve the problem!

    VSCode version: 1.94.2

    macOS Ventura 3.6.6 (22G630)

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search