Repository navigation
Closed
Labels
Needs-Author-FeedbackThe original author of the issue/PR needs to come back and respond to somethingThe original author of the issue/PR needs to come back and respond to somethingNeeds-Tag-FixDoesn't match tag requirementsDoesn't match tag requirementsNeeds-TriageIt's a new issue that the core contributor team needs to triage at the next triage meetingIt's a new issue that the core contributor team needs to triage at the next triage meetingResolution-ExternalFor issues that are outside this codebaseFor issues that are outside this codebaseResolution-Fix-AvailableIt's available in an Insiders build or a releaseIt's available in an Insiders build or a releaseTracking-ExternalThis bug isn't resolved, but it's following an external workitem.This bug isn't resolved, but it's following an external workitem.
Description
Windows: Microsoft Windows [版本 10.0.19041.804]
Terminal: 1.6.10571.0
Hi, I'm using OpenSSH to connect to a remote Linux server under Windows Terminal. But the output of "less -SN" seems not normal. The first screenshot shows it: the 19th line appears besides the 1st line. The second screenshot is the normal output (after I quit and type that command again). Unexpected output were not about a fixed line. Sometimes it's the 1st line overlapping with another line but other times it was some other lines repeating themselves. I had been using Putty to connect to a remote servers before but nerver met this problem so I think it might be a bug of Windows Terminal. Thanks.

Metadata
Metadata
Assignees
Labels
Needs-Author-FeedbackThe original author of the issue/PR needs to come back and respond to somethingThe original author of the issue/PR needs to come back and respond to somethingNeeds-Tag-FixDoesn't match tag requirementsDoesn't match tag requirementsNeeds-TriageIt's a new issue that the core contributor team needs to triage at the next triage meetingIt's a new issue that the core contributor team needs to triage at the next triage meetingResolution-ExternalFor issues that are outside this codebaseFor issues that are outside this codebaseResolution-Fix-AvailableIt's available in an Insiders build or a releaseIt's available in an Insiders build or a releaseTracking-ExternalThis bug isn't resolved, but it's following an external workitem.This bug isn't resolved, but it's following an external workitem.

Activity
zadjii-msft commentedon Mar 10, 2021
TypicalSEE Which version of
sshare you using?DHowett commentedon Mar 10, 2021
This sounds like #9176.
TypicalSEE commentedon Mar 11, 2021
"OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5", installed from Windows 10 “Optional Feature”.
DHowett commentedon Mar 11, 2021
In that case, I suspect that you're hitting the screen size change buffering issue in PowerShell/openssh-portable#426. Even though it doesn't look like the screen size is changing, less is turning on the "alternate buffer" which reports a window resize. OpenSSH, until pull 426, had trouble handling the resize event.
If you run OpenSSH 8.1 from the win32-openssh releases page, does it go away?
TypicalSEE commentedon Mar 12, 2021
Downloaded OpenSSH 8.1 from that page and tried it, the problem still exists. By the way, ssh version of my remote server is "OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017". Should I also upgrade that one?
jdebp commentedon Mar 12, 2021
Three answers will help the Microsoft (and other) people:
lessfirst displays the file?lessto redraw the screen?TERMenvironment variable on the system that is actually running thelessprogram?DHowett commentedon Mar 12, 2021
I apologize. The pull request that fixes the buffering/repeat issue merged on April 2, 2020 but the 8.1 release came out in Dec 2019. I do not know why I thought it might help. 😄
zadjii-msft commentedon Nov 23, 2021
TypicalSEE There's now an OpenSSH 8.6 (https://github.com/PowerShell/Win32-OpenSSH/releases/tag/V8.6.0.0p1-Beta), mind trying that one? We think that might have the fix
sarbian commentedon Nov 28, 2021
I had a similar issue and that version fixed it.
zadjii-msft commentedon Nov 29, 2021
I'll count that, thanks for confirming!