microsoft / microsoft/vscode-remote-release
Remote SSH Support IPV6 scp
Nobody has claimed this yet.
- Dominant language
- Dockerfile
- Stars
- 4.2k
- Forks
- 469
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
Is there an existing issue for this bug?
- I have searched the existing open issues and found none that apply.
- If I find any issue of interest that is related or closed, I will included a link to it in this issue.
Required Troubleshooting Steps
- I have read and performed the troubleshooting steps
- I have tried both values of the
remote.SSH.useLocalServersetting - My issue was not covered in the Tips and Tricks linked from the Troubleshooting Wiki.
- I will include a complete copy of my Remote - SSH logs by running Remote-SSH: Show Log in the command palette or from View > Output in the menu bar
[Optional] Diagnose with Copilot
I asked @remote-ssh but it did not help
In step 2 of the troubleshooting wiki, what was the result of running the generated SSH command verbatim outside of VS Code?
I did not try step 2 of the troubleshooting steps
Remote-SSH Log
Remote-SSH Log
[17:32:30.331] Log Level: 2
[17:32:30.344] VS Code version: 1.102.1
[17:32:30.344] Remote-SSH version: remote-ssh@0.120.0
[17:32:30.344] darwin arm64
[17:32:30.355] SSH Resolver called for "ssh-remote+gaozhenxi@[2605:340:cd50:a04:38b3:5d69:1cd2:2617]", attempt 1
[17:32:30.356] remote.SSH.useLocalServer = true
[17:32:30.356] remote.SSH.useExecServer = true
[17:32:30.356] remote.SSH.bindHost = {}
[17:32:30.356] remote.SSH.path = undefined
[17:32:30.356] remote.SSH.configFile = undefined
[17:32:30.356] remote.SSH.useFlock = true
[17:32:30.356] remote.SSH.lockfilesInTmp = false
[17:32:30.356] remote.SSH.localServerDownload = auto
[17:32:30.356] remote.SSH.remoteServerListenOnSocket = false
[17:32:30.356] remote.SSH.defaultExtensions = []
[17:32:30.356] remote.SSH.defaultExtensionsIfInstalledLocally = []
[17:32:30.356] remote.SSH.loglevel = 2
[17:32:30.356] remote.SSH.enableDynamicForwarding = true
[17:32:30.356] remote.SSH.enableRemoteCommand = false
[17:32:30.356] remote.SSH.serverPickPortsFromRange = {}
[17:32:30.357] remote.SSH.serverInstallPath = {}
[17:32:30.357] remote.SSH.permitPtyAllocation = false
[17:32:30.357] remote.SSH.preferredLocalPortRange = undefined
[17:32:30.357] remote.SSH.useCurlAndWgetConfigurationFiles = false
[17:32:30.357] remote.SSH.experimental.chat = false
[17:32:30.357] remote.SSH.experimental.enhancedSessionLogs = false
[17:32:30.357] remote.SSH.httpProxy = {}
[17:32:30.357] remote.SSH.httpsProxy = {}
[17:32:30.381] SSH Resolver called for host: gaozhenxi@2605:340:cd50:a04:38b3:5d69:1cd2:2617
[17:32:30.381] Setting up SSH remote "2605:340:cd50:a04:38b3:5d69:1cd2:2617"
[17:32:30.386] Acquiring local install lock: /var/folders/6p/l0lz6gx94z158h00d8f55t2h0000gn/T/vscode-remote-ssh-dc0e74ab-install.lock
[17:32:30.386] Looking for existing server data file at /Users/bytedance/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-dc0e74ab-7adae6a56e34cb64d08899664b814cf620465925-0.120.0-es/data.json
[17:32:30.387] No existing data file
[17:32:30.388] Using commit id "7adae6a56e34cb64d08899664b814cf620465925" and quality "stable" for server
[17:32:30.388] Extensions to install:
[17:32:30.391] Install and start server if needed
[17:32:30.394] PATH: /Users/bytedance/.local/bin:/Users/bytedance/Library/pnpm:/Users/bytedance/.workerctl/bin:/Users/bytedance/.nvm/versions/node/v20.19.2/bin:/opt/homebrew/opt/openjdk@17/bin:/Users/bytedance/.asdf/shims:/opt/homebrew/opt/asdf/libexec/bin:/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:/usr/local/go/bin:/opt/puppetlabs/bin
[17:32:30.394] Checking ssh with "ssh -V"
[17:32:30.405] > OpenSSH_9.4p1, LibreSSL 3.3.6
[17:32:30.408] askpass server listening on /var/folders/6p/l0lz6gx94z158h00d8f55t2h0000gn/T/vscode-ssh-askpass-26245bd9d9186267e55e5d5814138038100787a0.sock
[17:32:30.408] Spawning local server with {"serverId":1,"ipcHandlePath":"/var/folders/6p/l0lz6gx94z158h00d8f55t2h0000gn/T/vscode-ssh-askpass-2a125cdb05e6f0cdf1752f073b8de7041630ff8e.sock","sshCommand":"ssh","sshArgs":["-v","-T","-D","62934","-o","ConnectTimeout=15","gaozhenxi@2605:340:cd50:a04:38b3:5d69:1cd2:2617"],"serverDataFolderName":".vscode-server","dataFilePath":"/Users/bytedance/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-dc0e74ab-7adae6a56e34cb64d08899664b814cf620465925-0.120.0-es/data.json"}
[17:32:30.408] Local server env: {"SSH_AUTH_SOCK":"/private/tmp/com.apple.launchd.rALk0kmuFC/Listeners","SHELL":"/bin/zsh","DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"/Users/bytedance/.vscode/extensions/ms-vscode-remote.remote-ssh-0.120.0/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/bytedance/.vscode/extensions/ms-vscode-remote.remote-ssh-0.120.0/out/askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"/var/folders/6p/l0lz6gx94z158h00d8f55t2h0000gn/T/vscode-ssh-askpass-26245bd9d9186267e55e5d5814138038100787a0.sock"}
[17:32:30.409] Spawned 38931
[17:32:30.409] Using connect timeout of 17 seconds
[17:32:30.545] > local-server-1> Running ssh connection command: ssh -v -T -D 62934 -o ConnectTimeout=15 gaozhenxi@2605:340:cd50:a04:38b3:5d69:1cd2:2617
[17:32:30.548] > local-server-1> Spawned ssh, pid=38943
[17:32:30.553] stderr> OpenSSH_9.4p1, LibreSSL 3.3.6
[17:32:30.743] stderr> debug1: Server host key: ssh-ed25519 SHA256:BHL9HgwOzEZ7N1FIwx7PhVp8LyWgoirRQRNbSg69MJo
[17:32:31.072] Got askpass request: {"request":" gaozhenxi@2605:340:cd50:a04:38b3:5d69:1cd2:2617's password: "}
[17:32:31.072] Showing password prompt
[17:32:31.073] Listening for interwindow password on /var/folders/6p/l0lz6gx94z158h00d8f55t2h0000gn/T/vscode-ssh-askpass-b3370439a527e469b66913b24f6414cd8efd2850.sock
[17:32:31.073] Writing password prompt to globalState
[17:32:34.172] Got password response
[17:32:34.173] Interactor gave response: *********
[17:32:34.173] Cleaning up other-window auth server
[17:32:34.173] Using connect timeout of 17 seconds
[17:32:34.253] stderr> Authenticated to 2605:340:cd50:a04:38b3:5d69:1cd2:2617 ([2605:340:cd50:a04:38b3:5d69:1cd2:2617]:22) using "password".
[17:32:34.361] > Linux bytedance-terminalsandbox-geniusai-1753070328pwbl5 5.4.250-9-velinux1u1-amd64 #velinux1u1 SMP Debian 5.4.250-9-velinux1u1 Fri Mar 7 03:24:24 U x86_64
>
> The programs included with the Debian GNU/Linux system are free software;
> the exact distribution terms for each program are described in the
> individual files in /usr/share/doc/*/copyright.
>
> Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
> permitted by applicable law.
[17:32:34.397] > ready: 4f4ac46486be
[17:32:34.436] > Linux 5.4.250-9-velinux1u1-amd64 #velinux1u1 SMP Debian 5.4.250-9-velinux1u1 Fri Mar 7 03:24:24 U
[17:32:34.437] Platform: linux
[17:32:34.474] > /bin/bash
[17:32:34.474] Parent Shell: bash
[17:32:34.474] Parent Shell pid: 38931
[17:32:34.475] Waiting for subshell to start
[17:32:34.512] > 142308
[17:32:34.513] stdout -> '142308'
[17:32:34.513] sub-process detected
[17:32:34.549] > 4f4ac46486be: running
> Script executing under PID: 142308
[17:32:34.556] > Installing to /home/gaozhenxi/.vscode-server...
> 4f4ac46486be%%1%%
> Downloading with wget
> wget is from busybox: no
[17:32:34.558] stderr> Program 'wget' appears to support flag '--no-config'
[17:32:42.141] > wget download failed
> failed: Connection timed out.
> Trigger local server download
> 4f4ac46486be:trigger_server_download
> artifact==cli-alpine-x64==
> destFolder==/home/gaozhenxi/.vscode-server==
> destFolder2==/vscode-cli-7adae6a56e34cb64d08899664b814cf620465925.tar.gz==
> 4f4ac46486be:trigger_server_download_end
> Waiting for client to transfer server archive...
> Waiting for /home/gaozhenxi/.vscode-server/vscode-cli-7adae6a56e34cb64d08899664b814cf620465925.tar.gz.done and vscode-server.tar.gz to exist
>
[17:32:42.142] Got request to download on client for {"artifact":"cli-alpine-x64","destPath":"/home/gaozhenxi/.vscode-server/vscode-cli-7adae6a56e34cb64d08899664b814cf620465925.tar.gz"}
[17:32:42.142] server download URL: https://update.code.visualstudio.com/commit:7adae6a56e34cb64d08899664b814cf620465925/cli-alpine-x64/stable
[17:32:42.142] Downloading VS Code server locally...
[17:32:42.753] Downloaded VS Code server to /var/folders/6p/l0lz6gx94z158h00d8f55t2h0000gn/T/58968474-28a4-4164-818f-d1b0e49e63ff
[17:32:42.754] Renamed VS Code server to /var/folders/6p/l0lz6gx94z158h00d8f55t2h0000gn/T/vscode_server_1753090362753/vscode-cli-7adae6a56e34cb64d08899664b814cf620465925.tar.gz
[17:32:42.754] Preparing to scp to host 2605:340:cd50:a04:38b3:5d69:1cd2:2617
[17:32:42.756] PATH: /Users/bytedance/.local/bin:/Users/bytedance/Library/pnpm:/Users/bytedance/.workerctl/bin:/Users/bytedance/.nvm/versions/node/v20.19.2/bin:/opt/homebrew/opt/openjdk@17/bin:/Users/bytedance/.asdf/shims:/opt/homebrew/opt/asdf/libexec/bin:/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:/usr/local/go/bin:/opt/puppetlabs/bin
[17:32:42.756] Checking ssh with "ssh -V"
[17:32:42.762] > OpenSSH_9.4p1, LibreSSL 3.3.6
[17:32:42.763] Testing scp with "scp"
[17:32:42.798] scp exited with code: 1
[17:32:42.798] 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
[17:32:42.799] Copying file to remote with scp -o ConnectTimeout=15 'vscode-cli-7adae6a56e34cb64d08899664b814cf620465925.tar.gz' 'vscode-cli-7adae6a56e34cb64d08899664b814cf620465925.tar.gz.done' 'gaozhenxi@2605:340:cd50:a04:38b3:5d69:1cd2:2617':'/home/gaozhenxi/.vscode-server'
[17:32:42.799] Using cwd: file:///var/folders/6p/l0lz6gx94z158h00d8f55t2h0000gn/T/vscode_server_1753090362753
[17:32:42.948] > ssh: connect to host 0.0.10.45 port 22: No route to host
> scp: Connection closed
[17:32:43.189] "Copy server to host" terminal command done
[17:32:45.158] >
[17:32:48.142] >
[17:32:51.143] >
[17:32:54.144] >
[17:32:57.144] >
Expected Behavior
SCP should correctly concatenate IPv6 addresses in the command.
For example:
scp -6 -v /var/folders/6p/l0lz6gx94z158h00d8f55t2h0000gn/T/vscode_server_1753082551454/vscode-cli-7adae6a56e34cb64d08899664b814cf620465925.tar.gz 'username@[ipv6]':/tmp/
Actual Behavior
SCP generates the command without proper IPv6 formatting:
scp /var/folders/6p/l0lz6gx94z158h00d8f55t2h0000gn/T/vscode_server_1753082551454/vscode-cli-7adae6a56e34cb64d08899664b814cf620465925.tar.gz username@ipv6:/tmp/
Steps To Reproduce
visit the uri likes: vscode://vscode-remote/ssh-remote+user@[ipv6]/path/to/folder
Anything else?
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with a vscode://vscode-remote/ssh-remote+user@[ipv6]/path/to/folder URI and inspect the Remote-SSH log around the generated scp command. Done means the server archive transfer uses the IPv6 host in the bracketed form shown under Expected Behavior, rather than treating address segments as a host and port.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- vscode
- Domain
- devtools, networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100