PowerShell / PowerShell/Win32-OpenSSH

Broken terminal sequences

Open
#1,624 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
8.3k
Forks
819
PR merge metrics
No merged PRs in 30d

Description

"OpenSSH for Windows" version
8.1.0.1

Server OperatingSystem
Windows 10 Pro

Client OperatingSystem
Linux (CentOS 7, Ubuntu 16/18/20.04)

What is failing
There is a terminal emulation issue with line-shift scrolling. I believe this is the openssh server or windows console incorrectly intercepting terminal control sequences.
From a Linux client (could be in WSL on the same box) to Windows server running WSL2:

ssh -t WindowsBox wsl
vi multipagefile.txt
<downarrow / j many times such that the document must line-scroll>

I've tried with both cmd.exe and Powershell as my default shell for windows.
I've also tried a variety of terminal settings TERM=(xterm|xterm-color256|vt102|vt100)

Expected output
Expected output that the document shifts (all lines)

Actual output
Only the top and bottom line of the document are re-rendered leaving the core contents not-redrawn.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with ssh -t WindowsBox wsl, vi multipagefile.txt, and repeated scrolling, using the listed TERM values and shells. Start by tracing how Win32-OpenSSH handles terminal control sequences between the Linux client, WSL2, and the Windows console; done means all document lines redraw during line-shift scrolling.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
cli, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.