[Remote-SSH Bug]: scp: remote mkdir "/home/user/.vscode-server": Failure
Is there an existing issue for this bug?
- [X] I have searched the existing issues
Required Troubleshooting Steps
- [X] I have followed these troubleshooting steps
- [X] I have tried both values of the
remote.SSH.useLocalServersetting
Connect Locally
It connects successfully
->
Setting up SSH Host stat_host: Copying VS Code Server to host with scp
Expected Behavior
connected.
Steps To Reproduce
one month i have conected.
Host stat_host
HostName openjumpserver.comp.com
User user@[email protected]
Port 22
Remote-SSH Log
[11:17:34.837] Log Level: 2 [11:17:34.841] SSH Resolver called for "ssh-remote+stat_host", attempt 1 [11:17:34.842] "remote.SSH.useLocalServer": true [11:17:34.842] "remote.SSH.useExecServer": true [11:17:34.842] "remote.SSH.path": undefined [11:17:34.842] "remote.SSH.configFile": undefined [11:17:34.842] "remote.SSH.useFlock": true [11:17:34.842] "remote.SSH.lockfilesInTmp": false [11:17:34.842] "remote.SSH.localServerDownload": auto [11:17:34.842] "remote.SSH.remoteServerListenOnSocket": false [11:17:34.842] "remote.SSH.showLoginTerminal": true [11:17:34.842] "remote.SSH.defaultExtensions": [] [11:17:34.842] "remote.SSH.loglevel": 2 [11:17:34.843] "remote.SSH.enableDynamicForwarding": true [11:17:34.843] "remote.SSH.enableRemoteCommand": false [11:17:34.843] "remote.SSH.serverPickPortsFromRange": {} [11:17:34.843] "remote.SSH.serverInstallPath": {} [11:17:34.843] "remote.SSH.permitPtyAllocation": false [11:17:34.843] "remote.SSH.preferredLocalPortRange: undefined [11:17:34.843] "remote.SSH.useCurlAndWgetConfigurationFiles: false [11:17:34.850] VS Code version: 1.92.1 [11:17:34.850] Remote-SSH version: [email protected] [11:17:34.850] darwin arm64 [11:17:34.851] SSH Resolver called for host: stat_host [11:17:34.851] Setting up SSH remote "stat_host" [11:17:34.852] Acquiring local install lock: /var/folders/5c/mmhdxm456jv3d7j8cnp3pwh00000gp/T/vscode-remote-ssh-9f59c2a6-install.lock [11:17:34.853] Looking for existing server data file at /Users/user/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-9f59c2a6-eaa41d57266683296de7d118f574d0c2652e1fc4-0.113.1-es/data.json [11:17:34.853] Using commit id "eaa41d57266683296de7d118f574d0c2652e1fc4" and quality "stable" for server [11:17:34.855] Install and start server if needed [11:17:34.858] PATH: /opt/homebrew/bin:/opt/homebrew/sbin:/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/podman/bin:/opt/homebrew/bin:/Users/user/go/bin:/Users/user/project/tools/bin [11:17:34.858] Checking ssh with "ssh -V" [11:17:34.863] > OpenSSH_9.6p1, LibreSSL 3.3.6
[11:17:34.865] askpass server listening on /var/folders/5c/mmhdxm456jv3d7j8cnp3pwh00000gp/T/vscode-ssh-askpass-81aa9254cf4a6421e5b008647f255970816a57ad.sock [11:17:34.865] Spawning local server with {"serverId":1,"ipcHandlePath":"/var/folders/5c/mmhdxm456jv3d7j8cnp3pwh00000gp/T/vscode-ssh-askpass-697ea3cfa57be7ba5ce278676b2a6cfd16166b20.sock","sshCommand":"ssh","sshArgs":["-v","-T","-D","59981","-o","ConnectTimeout=15","stat_host"],"serverDataFolderName":".vscode-server","dataFilePath":"/Users/user/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-9f59c2a6-eaa41d57266683296de7d118f574d0c2652e1fc4-0.113.1-es/data.json"} [11:17:34.865] Local server env: {"SSH_AUTH_SOCK":"/private/tmp/com.apple.launchd.Flesg8pGQz/Listeners","SHELL":"/bin/zsh","DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"/Users/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.113.1/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/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.113.1/out/askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"/var/folders/5c/mmhdxm456jv3d7j8cnp3pwh00000gp/T/vscode-ssh-askpass-81aa9254cf4a6421e5b008647f255970816a57ad.sock"} [11:17:34.866] Spawned 21502 [11:17:34.940] > local-server-1> Running ssh connection command: ssh -v -T -D 59981 -o ConnectTimeout=15 stat_host [11:17:34.941] > local-server-1> Spawned ssh, pid=21507 [11:17:34.944] stderr> OpenSSH_9.6p1, LibreSSL 3.3.6 [11:17:35.463] > ready: a8f23cef2519 [11:17:35.483] > Linux 3.10.0-1127.13.1.el7.x86_64 #1 SMP Tue Jun 23 15:46:38 UTC 2020 [11:17:35.483] Platform: linux [11:17:35.504] > /bin/bash [11:17:35.505] Shell: bash [11:17:35.505] Creating bash subshell inside "bash" [11:17:35.526] > bash version: 4.2.46(2)-release [11:17:35.577] > a8f23cef2519: running
Installing to /home/user/.vscode-server... a8f23cef2519%%1%% Downloading with wget wget download failed wget: unrecognized option '--no-config' Usage: wget [OPTION]... [URL]... Try `wget --help' for more options. printenv: HA_REGION=hz IS_CHECKFLOW=yes XDG_SESSION_ID=418093 HOSTNAME=dw-csprd-dpp-dpp-algo-rtp-paddle-001 SHELL=/bin/bash HISTSIZE=10000 SSH_CLIENT=xx.xx.xx 22 QT_GRAPHICSSYSTEM_CHECKED=1 USER=user LD_LIBRARY_PATH=:/usr/local/openssl1.1/openssl/lib VSCODE_AGENT_FOLDER=/home/user/.vscode-server PATH=/usr/local/java/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/user/.local/bin:/home/user/bin MAIL=/var/spool/mail/user PWD=/home/user/.vscode-server JVM_MEMORY=86 JAVA_HOME=/usr/local/java LANG=en_US.UTF-8 QT_GRAPHICSSYSTEM=native HA_CLOUD=al HA_ENV=csprd UNIQUE_IDENTIFIER= HISTCONTROL=ignoredups HOME=/home/user SHLVL=2 USER_INPUT_FILE=/tmp/hostsecurity/user_input.log LOGNAME=user SSH_CONNECTION=xx.xx xx host 22 EXEC_USER=user LESSOPEN=||/usr/bin/lesspipe.sh %s PROMPT_COMMAND=current_command=$(history 1); if [[ "$current_command" != "$LAST_COMMAND" ]]; then echo "Timestamp:: $(date +%s%6N) -- Identifier:: $UNIQUE_IDENTIFIER -- BashPID:: $$ -- User:: $USER -- Histtimeformat:: $HISTTIMEFORMAT -- Command:: $(history 1)" >> $USER_INPUT_FILE; LAST_COMMAND="$current_command"; fi; XDG_RUNTIME_DIR=/run/user/1000 CONFIG_URL=https://du-user.oss-cn-shanghai.aliyuncs.com/env-config HISTTIMEFORMAT=%Y-%m-%d %H:%M:%S user HISTFILE=/tmp/dbasky/user/dw-csprd-dpp-dpp-algo-rtp-paddle-001 dbasky.2024-08-15_11:17:35 LAST_COMMAND= _=/usr/bin/printenv OLDPWD=/home/user Trigger local server download a8f23cef2519:trigger_server_download artifact==cli-alpine-x64== destFolder==/home/user/.vscode-server== destFolder2==/vscode-cli-eaa41d57266683296de7d118f574d0c2652e1fc4.tar.gz== a8f23cef2519:trigger_server_download_end Waiting for client to transfer server archive... Waiting for /home/user/.vscode-server/vscode-cli-eaa41d57266683296de7d118f574d0c2652e1fc4.tar.gz.done and vscode-server.tar.gz to exist
[11:17:35.577] Got request to download on client for {"artifact":"cli-alpine-x64","destPath":"/home/user/.vscode-server/vscode-cli-eaa41d57266683296de7d118f574d0c2652e1fc4.tar.gz"} [11:17:35.577] server download URL: https://update.code.visualstudio.com/commit:eaa41d57266683296de7d118f574d0c2652e1fc4/cli-alpine-x64/stable [11:17:35.578] Downloading VS Code server locally... [11:17:36.000] Downloaded VS Code server to /var/folders/5c/mmhdxm456jv3d7j8cnp3pwh00000gp/T/1b5b75f8-2d88-47cd-b71e-e07a4b058b9c [11:17:36.001] Renamed VS Code server to /var/folders/5c/mmhdxm456jv3d7j8cnp3pwh00000gp/T/vscode_server_1723691856000/vscode-cli-eaa41d57266683296de7d118f574d0c2652e1fc4.tar.gz [11:17:36.002] PATH: /opt/homebrew/bin:/opt/homebrew/sbin:/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/podman/bin:/opt/homebrew/bin:/Users/user/go/bin:/Users/user/project/tools/bin [11:17:36.002] Checking ssh with "ssh -V" [11:17:36.007] > OpenSSH_9.6p1, LibreSSL 3.3.6
[11:17:36.007] Testing scp with "scp"
[11:17:36.013] scp exited with code: 1
[11:17:36.013] 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] [-X sftp_option] source ... target
[11:17:36.013] Copying file to remote with scp -o ConnectTimeout=15 'vscode-cli-eaa41d57266683296de7d118f574d0c2652e1fc4.tar.gz' 'vscode-cli-eaa41d57266683296de7d118f574d0c2652e1fc4.tar.gz.done' 'stat_host':'/home/user/.vscode-server'
[11:17:36.013] Using cwd: file:///var/folders/5c/mmhdxm456jv3d7j8cnp3pwh00000gp/T/vscode_server_1723691856000
[11:17:36.423] > scp: remote mkdir "/home/user/.vscode-server": Failure
[11:17:36.691] "Copy server to host" terminal command done
[11:17:38.575] >
[11:17:41.582] >
[11:17:44.579] >
Anything else?
No response
same problems
same problem
+1 by the error wget unrecognized option '--no-config'
Same problem. Any temporary solution? Update: Went back to version 1.90 for now
Same problem. Any temporary solution? Update: Went back to version 1.90 for now
copy vscode-cli-xxx.tar.gz/vscode-cli-xxx.tar.gz.done to /home/user/.vscode-server by youself
@Kurt-Shiwz would you mind explaining where can I download vscode-cli-xxx.tar.gz?
@Kurt-Shiwz would you mind explaining where can I download
vscode-cli-xxx.tar.gz?
open remote-ssh extension log, you will find the file.
cc @joshspicer for any potential thoughts
Thanks all for the reports. To temporarily get around the wget --no-config issues, the useCurlAndWgetConfigurationFiles setting can be enabled true (that flag won't be passed), or revert back one version.
Locally scp'ing the CLI over is used when using wget or curl fails, so the mitigation above will help.
Anyone who is seeing the wget --no-config issues, could you please share what version of wget you're on (wget --version) and also your remote OS. We'd seen that flag was in GNU wget for a long time IIRC, but appears like it's not as ubiquitous as we thought.
/duplicate https://github.com/microsoft/vscode-remote-release/issues/10174
Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for similar existing issues. See also our issue reporting guidelines.
Happy Coding!
Thanks all for the reports. To temporarily get around the
wget --no-configissues, theuseCurlAndWgetConfigurationFilessetting can be enabled true (that flag won't be passed), or revert back one version.Locally
scp'ing the CLI over is used when usingwgetorcurlfails, so the mitigation above will help.Anyone who is seeing the
wget --no-configissues, could you please share what version of wget you're on (wget --version) and also your remote OS. We'd seen that flag was in GNU wget for a long time IIRC, but appears like it's not as ubiquitous as we thought.
macOs:
GNU Wget 1.24.5 built on darwin23.2.0.
-cares +digest -gpgme +https +ipv6 +iri +large-file -metalink +nls
+ntlm +opie -psl +ssl/openssl
Wgetrc:
/opt/homebrew/etc/wgetrc (system)
Locale:
/opt/homebrew/Cellar/wget/1.24.5/share/locale
Compile:
clang -DHAVE_CONFIG_H -DSYSTEM_WGETRC="/opt/homebrew/etc/wgetrc"
-DLOCALEDIR="/opt/homebrew/Cellar/wget/1.24.5/share/locale" -I.
-I../lib -I../lib -I/opt/homebrew/opt/openssl@3/include
-I/opt/homebrew/Cellar/libidn2/2.3.7/include -DNDEBUG -g -O2
Link:
clang -I/opt/homebrew/Cellar/libidn2/2.3.7/include -DNDEBUG -g -O2
-L/opt/homebrew/Cellar/libidn2/2.3.7/lib -lidn2
-L/opt/homebrew/opt/openssl@3/lib -lssl -lcrypto -ldl -lz
../lib/libgnu.a -liconv -lintl -Wl,-framework -Wl,CoreFoundation
-Wl,-framework -Wl,CoreServices -lunistring
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://www.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.
Originally written by Hrvoje Niksic <[email protected]>.
Please send bug reports and questions to <[email protected]>.
remote linux:
GNU Wget 1.14 built on linux-gnu.
+digest +https +ipv6 +iri +large-file +nls +ntlm +opie +ssl/openssl
Wgetrc:
/etc/wgetrc (system)
Locale: /usr/share/locale
Compile: gcc -DHAVE_CONFIG_H -DSYSTEM_WGETRC="/etc/wgetrc"
-DLOCALEDIR="/usr/share/locale" -I. -I../lib -I../lib -O2 -g -pipe
-Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong
--param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic
Link: gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector-strong --param=ssp-buffer-size=4
-grecord-gcc-switches -m64 -mtune=generic -lssl -lcrypto
/usr/lib64/libssl.so /usr/lib64/libcrypto.so /usr/lib64/libz.so
-ldl -lz -lz -lidn -luuid -lpcre ftp-opie.o openssl.o http-ntlm.o
../lib/libgnu.a
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://www.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.
Originally written by Hrvoje Niksic <[email protected]>.
Please send bug reports and questions to <[email protected]>.