Skip to content

broken terminal using powershell over ssh from windows  #4075

@marekr

Description

@marekr

It appears powershell over SSH going to a Windows console is broken strangely. If you use powershell on Windows to ssh and then powershell, you get the last line repeated everytime you press a character. If you use cmd, it basically keeps writing a single line in place rather than ever moving.

Any other linux tool, nano, vim, etc over SSH work fine. So not sure what powershell is doing in particular that the windows powershell terminal cannot handle while handling more complex terminal abusing applications.

Steps to reproduce

Setup for example the "OpenSSH for Windows" or a msys2 ssh implementation (it doesn't matter which one).

Launch powershell on Windows. Execute the ssh client to a debian 8 machine which has powershell installed via the deb packages.

Execute powershell.

Try typing.

It ends up broken like this:

PS /home/mroszko> PS /home/mroszko> $
PS /home/mroszko> $P
PS /home/mroszko> $PS
PS /home/mroszko> $PSV
PS /home/mroszko> $PSVE
PS /home/mroszko> $PSVER
PS /home/mroszko> $PSVERS
PS /home/mroszko> $PSVERSI
PS /home/mroszko> $PSVERSIO
PS /home/mroszko> $PSVERSION
PS /home/mroszko> $PSVERSIONT
PS /home/mroszko> $PSVERSIONTA
PS /home/mroszko> $PSVERSIONTAB
PS /home/mroszko> $PSVERSIONTABL
PS /home/mroszko> $PSVERSIONTABLE

When I was simply trying to type $PSVERSIONTABLE, it automatically kept regenerating the line.
Other strange artifacts can occur instead too, cursor not moving, lines jumping, buffer bleeding.

Environment data

`
Name Value


PSVersion 6.0.0-beta
PSEdition Core
BuildVersion 3.0.0.0
CLRVersion
GitCommitId v6.0.0-beta.2
OS Linux 3.16.0-4-amd64 #1 SMP Debian 3.16.39-1 (2016-12-30)
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
`

What I've tried:

Cmder/Conemu which wrap Cmd.exe and PowerShell.exe

Powershell.exe standalone with OpenSSH for Windows and msys2 ssh separately
Cmd.exe standalone with OpenSSH for Windows and msys2 ssh separately

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifResolution-FixedThe issue is fixed.WG-Interactive-PSReadLinePSReadline related issues

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions