Ssh's RemoteCommand facility can be used to automatically create/attach a tmux session, like this. In Windows, my sessions intermittently see the escape sequence ^0;10;1c
or ^[[>1;1c
, showing like this in my terminal:
This behaviour seems restricted to Windows 11, with both the Terminal and Console Host applications. It does not seem to occur on Windows 10 on any variant of cmd.exe. I'm presently working around it by running with the W11 Console Host in legacy mode, but I'd much rather use Windows Terminal.
How can I keep these escape sequences out of my tmux sessions?
Original question text with bad assumptions below:
(I now believe this is an incorrect assumption, based on the response from @user1686 below).
OpenSSH for Windows (including the current beta 9.2p1) seems to push some extra characters that look like escape sequences. In a given command window, the first ssh session has garbage inserted, such that my fresh tmux session looks like the image below. Same deal from cmd, powershell, and cygwin terminal. This does not happen if the remote command is absent, or a virgin bash
command. Mysteriously, it also doesn't happen on the second, fourth, etc ssh commands.