[Bug]: SSH environment added by ssh config alias breaks when the alias' port changes
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 23k
- Forks
- 5.9k
- Avg merge
- 11h 14m
- Merged PRs (30d)
- 357
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/desktop
Steps to reproduce
The alias here is the only stable way to reach the machine: its port is reassigned on every VM start, and the ssh config entry is kept current automatically.
- Create a VM reachable over SSH that gets assigned a high port on
127.0.0.1, with an entry added to~/.ssh/configunder an alias. The port changes on every VM start, the alias does not. - Confirm the alias works from a terminal:
ssh <alias>connects. - In the desktop app, open Settings > Connections > Add environment > SSH.
- Fill in two fields only: the host alias, so no address has to be typed, and the username. Leave the port empty, since the alias already carries it.
- Connect. The environment is created and works normally.
- Note that the saved connection is now labelled
SSH <user>@127.0.0.1:<port>, so the resolved address and port were captured instead of the alias. - Restart the VM so it is assigned a different port. The
~/.ssh/configentry is updated accordingly. Change nothing in T3 Code. - Confirm the alias still works from a terminal:
ssh <alias>connects. - Reconnect the saved environment in T3 Code.
Expected behavior
An environment added by alias keeps the alias as its address. Every connection attempt resolves the alias through the ssh config as it is at that moment, so a changed HostName or Port is picked up without touching T3 Code. A username typed by hand stays an override, because it was chosen deliberately.
Actual behavior
The alias is resolved once, when the environment is added, and the resolved host and port are persisted and reused. Step 9 fails: the connection is still aimed at the old port, even though ssh <alias> works from a terminal and the ssh config is correct. Nothing in the UI offers to go back to using the alias.
Impact
Major degradation or frequent failure
Version or commit
0.0.33
Environment
macOS, desktop app 0.0.33
Screenshots, recordings, or supporting files
Screenshot of the saved connection showing the captured address and port added in a comment below.
Workaround
Delete the saved connection and add it again with the same alias, on every port change.
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 in the apps/desktop SSH environment add-and-reconnect flow and reproduce the alias with a changing port described in the issue. Trace what is saved after the alias is resolved; done means the saved address remains the alias, while a manually entered username remains an override and reconnecting follows the current ~/.ssh/config.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- desktop, networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 64/100