posit-dev / posit-dev/positron
Remote SSH: `Hostname` instead of `HostName` fails with `getaddrinfo ENOTFOUND` in Match cases
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 4.3k
- Forks
- 184
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 206
Description
System details:
Positron and OS details:
positron/OS
Positron Version: 2025.04.0 (Universal) build 250 Code - OSS Version: 1.98.0 Commit: 627b3d723ee0b3a5bd86731a75902d419cafe22d Date: 2025-04-03T16:31:38.728Z Electron: 34.2.0 Chromium: 132.0.6834.196 Node.js: 20.18.2 V8: 13.2.152.36-electron.0 OS: Darwin arm64 24.4.0
Interpreter details:
remote SSH
Describe the issue:
I cannot use non-trivial SSH alias entries in "Connect to Host".
The "Remote Host" menu correctly identifies my ~/.ssh/config file, and it opens it and I can edit it if needed. I have an entry that looks like:
# this alias works
Host goodalias
ForwardAgent yes
User r2evans
Hostname 111.222.33.44
Port 2222
# this alias does not work
Host badalias
ForwardAgent yes
User r2evans
# change the hostname based on current network
Match originalhost badalias exec "ipconfig getsummary en0 | sed -nE 's/.* SSID : //gp' | grep -q 'MyClientWifi'"
Hostname 11.22.33.44
Port 22
Match originalhost badalias
Hostname 111.222.33.44
Port 2222
The first goodalias works fine, the second badalias does not.
Steps to reproduce the issue:
- Define an alias in
~/.ssh/configthat points to a "real" hostname/ipaddr usingMatch originalhost(or perhaps other non-trivial conditioning). - Confirm that
goodaliasworks in "Connect to Host...". (Disconnect.) - Try to use
badalias, it fails withError: getaddrinfo ENOTFOUND badalias
Expected or desired behavior:
if ssh badalias works in a terminal, I hope for it to work in Positron as well.
Were there any error messages in the UI, Output panel, or Developer Tools console?
In the "Output" pane:
[Info - 19:20:29.240] Resolving ssh remote authority 'ssh-remote+badalias' (attemp #1)
[Trace - 19:20:29.281] Identity keys:
ssh-rsa SHA256:G...
ssh-rsa SHA256:I...
ssh-rsa SHA256:h...
ssh-rsa SHA256:w...
[Error - 19:20:29.288] Error resolving authority
Error: getaddrinfo ENOTFOUND badalias
at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:120:26)
(BTW, typo: attemp -> attempt)
In the dev-console:
workbench.desktop.main.js:20958 DEBUG Comments: URIs of continue on comments to add to storage .
workbench.desktop.main.js:20985 ERR getaddrinfo ENOTFOUND badalias: CodeExpectedError: getaddrinfo ENOTFOUND badalias
at $NNc2.tb (vscode-file://vscode-app/Applications/Positron.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:687039:11)
at async $NNc2.sb (vscode-file://vscode-app/Applications/Positron.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:687007:22)
at async $NNc2.fc (vscode-file://vscode-app/Applications/Positron.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:688847:26)
at async vscode-file://vscode-app/Applications/Positron.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:10290:9
error @ workbench.desktop.main.js:20985
workbench.desktop.main.js:20985 ERR getaddrinfo ENOTFOUND badalias: CodeExpectedError: getaddrinfo ENOTFOUND badalias
at $NNc2.tb (vscode-file://vscode-app/Applications/Positron.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:687039:11)
at async $NNc2.sb (vscode-file://vscode-app/Applications/Positron.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:687007:22)
at async $NNc2.fc (vscode-file://vscode-app/Applications/Positron.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:688847:26)
at async vscode-file://vscode-app/Applications/Positron.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:10290:9
error @ workbench.desktop.main.js:20985
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 with the Remote SSH authority-resolution path that emits the reported getaddrinfo ENOTFOUND badalias error; no source file or test is named in the issue. Reproduce using the provided ~/.ssh/config entries and compare Positron's resolution with ssh badalias in a terminal. Done means aliases using Match originalhost resolve and connect through Positron as they do in SSH.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- electron, node.js, typescript
- Domain
- devtools, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100