-
Notifications
You must be signed in to change notification settings - Fork 745
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong CR/LF behavior in ssh.exe #1256
Comments
I'm observing an issue that appears to be related to this one when connecting to a linux machine from windows in a powershell console. I.e. after starting the powershell.exe I observe "user@some-host" to be duplicated on the same line: PS D:\Workspace> ssh some-host
user@some-host:~$ clear
user@some-host:~$ user@some-host:~$ echo "hello"
hello
user@some-host:~$ clear
user@some-host:~$ user@some-host:~$ <enter>
user@some-host:~$ <enter>
user@some-host:~$ lsb_release -r
Release: 18.04
user@some-host:~$ man clear
(hit <q>)
user@some-host:~$ user@some-host:~$ It appears that the way how Noteworthy, too, is that with the |
I am also seeing the exact issue that dpsenner reported above. Issue is the same regardless of using any combination of CMD, PowerShell 5.1, or PowerShell 6.1 with Win32-OpenSSH client 7.7 or 7.9. Also interesting, but probably unrelated, is that ssh.exe seems to always change the cursor size to "small" even it if it set as "large" in PowerShell. |
@DHowett-MSFT , this appears to be a console issue, can you take a look? |
This probably has the same root cause as the login/motd duplication issue that was fixed in PowerShell/openssh-portable#426. |
Sorry, I was reading the comments #1256 (comment) and #1256 (comment) which are off-topic for this issue. 😬 This At the same time, when Win32-OpenSSH is running on windows 7, it does a significant amount of preprocessing before sending output to the console. I'd start debugging there 😄 |
For Windows 7, we support only VT100. We are not investing to fix bugs in VT100. |
"OpenSSH for Windows" version
7.7.2.0
Server OperatingSystem
FreeBSD 10.4-RELEASE amd64
TERM=cons25r
Client OperatingSystem
Windows 7 x64 russian
TERM=cons25r
What is failing
CR worked as CR+LF, LF are ignored. This leads to multiple output issues in my case.
Background:
The server assumes the historical behavior of the terminal, in which it works as mechanical teletype or typewriter.
One or more of CR should cause the mechanical carriage will be move to the position of the first character of the same line, without scrolling the paper.
Each LF should cause the paper to scroll to the next line, without moving the carriage to anywhere.
Expected output
![sc1](https://user-images.githubusercontent.com/43574636/46017239-b1524900-c0df-11e8-90fd-116bda3bb848.jpg)
Server sends
0x0d 0x0d 0x0a
and prompt, each time you press Return:On exit from Midnight Commander, server sends
![sc3](https://user-images.githubusercontent.com/43574636/46017247-badbb100-c0df-11e8-8093-e8b3fb5df8b3.jpg)
0x1b 0x5b 0x4b 0x0a
20+ times, for line by line screen cleaning and move cursor to last line:Actual output
![sc2](https://user-images.githubusercontent.com/43574636/46017258-c038fb80-c0df-11e8-9c08-755922ffe3f5.jpg)
Unwanted blank lines:
The screen is not cleared, prompt is in the second line from upper end:
![sc4](https://user-images.githubusercontent.com/43574636/46017272-c4fdaf80-c0df-11e8-84fe-3a058feddd56.jpg)
The text was updated successfully, but these errors were encountered: