Skip to content

feat!: give et short flags their OpenSSH meanings - #867

Merged
MisterTea merged 1 commit into
masterfrom
openssh_parity
Sep 26, 2026
Merged

MisterTea merged 1 commit into
masterfrom
openssh_parity

Conversation

@MisterTea

Copy link
Copy Markdown
Owner

Summary

Lets VS Code / Cursor Remote-SSH use et (or et1) as remote.SSH.path: short letters on the et client now mean what they mean in ssh(1). Long options keep ET behavior. etserver, etterminal, and htm are unchanged.

Breaking: these short letters changed meaning on the client. Use the long form for the old behavior.

Letter Now (OpenSSH) Old behavior, now long-only
-c cipher --command (or positional command)
-t request pty --tunnel (or -L)
-p sshd port for the bootstrap ssh --port / host:port (etserver)
-l login user --logdir
-x disable X11 (no-op) --kill-other-sessions
-f background after connect --forward-ssh-agent
-N no remote command (no_shell) --no-terminal
-v repeatable count --verbose=N
-e escape char (accepted, not applied) --noexit

Also:

  • New -L/-R (including OpenSSH 3-field port:host:hostport, bound to localhost), -i, -J.
  • A pre-pass expands short clusters and attached values (-vvv, -NT, -p22, -Cl alice) and stops at the host, so flags in the remote command stay there. Unhandled ssh letters no longer end a cluster; unhandled value letters drop their value.
  • -p reaches the bootstrap ssh only when given, so ssh config and --ssh-option Port= keep working.
  • Two fixes found while running VS Code Remote-SSH through et1: with -T, SSH login output no longer goes to stdout (the remote command's channel); the bootstrap ssh now gets stdin from /dev/null, so it cannot swallow the install script VS Code writes before the session is up.
  • Callers updated: scripts/ssh-et, system tests, iTerm2 e2e, README, docs/protocol.md, bash/zsh completions.

The server side needed for VS Code (-T raw channel #854, runtime -D/-W #849) is already on master; no release contains it yet.

Test plan

  • ctest --parallel (408/408) in build/
  • New unit tests in ClientArgParsingTest, TunnelUtilsTest, SubprocessUtilsTest, SshSetupHandlerTest
  • clang-format 18 (--style=Google) clean on changed C++ files
  • Manual: VS Code 1.137 Remote-SSH with remote.SSH.path = et1, connecting to a Linux host running master's etserver; VS Code server installed and extension host started
  • CI on this pull request

Let editors such as VS Code Remote-SSH use et (or et1) as their ssh
binary. Short letters on the et client now match ssh(1); long options
keep ET behavior.

- -c cipher, -t pty, -p sshd port, -l login user, -x no-op, -f
  background, -N no remote command, -v repeatable, -e accepted.
- New -L/-R (incl. 3-field port:host:hostport), -i, -J.
- Pre-pass expands short clusters and stops at the host so remote
  command flags stay in the command.
- -T no longer prints SSH login output on stdout, and the bootstrap
  ssh gets stdin=/dev/null so it cannot eat the caller's stdin.

BREAKING CHANGE: et -c/-t/-p/-l/-x/-f/-N/-v/-e changed meaning. Use
--command, --tunnel, --port, --logdir, --kill-other-sessions,
--forward-ssh-agent, --no-terminal, --verbose=N, --noexit.

Co-authored-by: Cursor <cursoragent@cursor.com>
@codecov

codecov Bot commented Sep 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.66355% with 66 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.75%. Comparing base (fe0795c) to head (962bcdd).

Files with missing lines Patch % Lines
src/terminal/MuxProtocol.cpp 74.70% 29 Missing and 14 partials ⚠️
src/base/SubprocessUtils.cpp 22.22% 4 Missing and 3 partials ⚠️
src/terminal/SshSetupHandler.hpp 60.00% 4 Missing and 2 partials ⚠️
src/base/TunnelUtils.cpp 87.50% 3 Missing and 2 partials ⚠️
src/terminal/MuxProtocol.hpp 86.20% 1 Missing and 3 partials ⚠️
src/terminal/TerminalClient.cpp 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #867      +/-   ##
==========================================
+ Coverage   78.55%   78.75%   +0.19%     
==========================================
  Files         143      143              
  Lines       17624    18065     +441     
  Branches    11233    11537     +304     
==========================================
+ Hits        13845    14227     +382     
- Misses       2254     2299      +45     
- Partials     1525     1539      +14     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@MisterTea
MisterTea merged commit f3137ce into master Sep 26, 2026
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants