Skip to content

Commit eb1e0cf

Browse files
skulidropekclaude
andcommitted
fix(app): remove RemoteCommand from SSH config — breaks VS Code Remote SSH
RemoteCommand intercepts VS Code's own installer and server-start commands, causing "Cannot execute command-line and remote command" and failing to parse the remote port. VS Code needs a clean shell on connect to run vscode-server. The folder is already handled via the VS Code URI (folder=). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent d455535 commit eb1e0cf

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, targetDir: string): string =>
171-
`Host ${hostname}\n ProxyCommand cloudflared access ssh --hostname %h\n StrictHostKeyChecking no\n UserKnownHostsFile /dev/null\n RemoteCommand cd ${targetDir} && exec $SHELL\n RequestTTY yes`
170+
const hostSshConfig = (hostname: string): string =>
171+
`Host ${hostname}\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, info.targetDir) : null
216+
const cfSshConfig = cfState.tag === "ready" ? hostSshConfig(cfState.hostname) : 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)