Skip to content

Commit 02a5bd2

Browse files
skulidropekclaude
andcommitted
fix(app): add User to SSH config block — VS Code used local Windows username
Without User directive VS Code Remote SSH falls back to the local OS username. Added User ${sshUser} so the config specifies dev@ explicitly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent eb1e0cf commit 02a5bd2

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

packages/app/src/web/app-ready-terminal-pane.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ type CfTunnelState =
167167
| { readonly tag: "ready"; readonly hostname: string; readonly sshPassword: string }
168168
| { readonly tag: "failed" }
169169

170-
const hostSshConfig = (hostname: string): string =>
171-
`Host ${hostname}\n ProxyCommand cloudflared access ssh --hostname %h\n StrictHostKeyChecking no\n UserKnownHostsFile /dev/null`
170+
const hostSshConfig = (hostname: string, sshUser: string): string =>
171+
`Host ${hostname}\n User ${sshUser}\n ProxyCommand cloudflared access ssh --hostname %h\n StrictHostKeyChecking no\n UserKnownHostsFile /dev/null`
172172

173173
const copyText = (text: string): void => { void navigator.clipboard.writeText(text).catch(() => {}) }
174174

@@ -213,7 +213,7 @@ const VsCodeAccessPanel = (
213213
readonly onRetry: () => void
214214
}
215215
): JSX.Element => {
216-
const cfSshConfig = cfState.tag === "ready" ? hostSshConfig(cfState.hostname) : null
216+
const cfSshConfig = cfState.tag === "ready" ? hostSshConfig(cfState.hostname, info.sshUser) : null
217217
const cfSshCommand = cfState.tag === "ready"
218218
? `ssh -o "ProxyCommand=cloudflared access ssh --hostname %h" ${info.sshUser}@${cfState.hostname}`
219219
: null

0 commit comments

Comments
 (0)