microsoft / microsoft/vscode-remote-release

IPv6 support issue

Open
#9,366 5 comments 11 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug ssh
Dominant language
Dockerfile
Stars
4.2k
Forks
470
Avg merge
1d 1h
Merged PRs (30d)
1

Description

adding ssh connection to a remote host that using IPv6 address does not work.
E.g. you can specify IPv4 connection.
ssh ubuntu@10.0.2.44
You will see 'connect to host 10.0.2.44', and it works.
But if you try to use IPv6 address in this scenario, it does NOT work.
E.g.
ssh ubuntu@fd9a:92ce:386e:bc05:1863:23ff:fe39:a42b
You will see 'connect to host fd9a'. (first word)
If you do try to connect, it is obvious that IPv6 address which uses ':' separator, is confused with [explicit] port number, which also uses same separator. There are messages in extension output along the lines
stderr> ~/.ssh/config line xx: Bad port 'ipv6 adds : ... : ... :...'

Note that at the same time direct connect
ssh ubuntu@fd9a:92ce:386e:bc05:1863:23ff:fe39:a42b
from bash in terminal works just fine.
Hence it appears a bug in parsing of ssh hostname.
In certain scenarios where ssh address is VM, there is no hostname resolution other than IP address, and host network uses IPv6 only, so ability to work with IPv6 host address is importamt.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure in VS Code Remote-SSH with the IPv6-only address from the issue, then compare it with the working bash SSH command. Trace the SSH host and port parsing entry point and verify that colon-separated IPv6 addresses are not truncated or treated as explicit ports; done means the remote connection succeeds.

Written by the indexing model from the issue text.

Assessment

Tech stack
vscode
Domain
developer-experience, networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.