PowerShell / Win32-OpenSSH

Win32 port of OpenSSH
7.38k stars 759 forks source link

SSH Client Does Not Permit Passwords With Non-ASCII Characters #1178

Closed NoMoreFood closed 4 years ago

NoMoreFood commented 6 years ago

"OpenSSH for Windows" version v7.7.1.0p1-Beta

Server OperatingSystem Windows 10 Enterprise

Client OperatingSystem Windows 10 Enterprise

What is failing Cannot login using an account that has a password with non-ASCII characters (e.g., þþþþþ12345abcABC) using SSH client.

Expected output Login is successful.

Actual output Permission denied, please try again.

MathiasMagnus commented 6 years ago

This most likely is related to the same issue that non-ascii characters are not always tunneled properly, or at least the way Linux OpenSSH expects it. I remote to an Ubuntu Server 18.04 machine with Hungarian locale. This is the end of the prompt I receive:

150 csomag friss├şthet┼Ĺ.
54 friss├şt├ęs biztons├ígi friss├şt├ęs.

Instead of

150 csomag frissíthető
54 frissítés és biztonsági frissítés

Parens, brackets, pipes and the likes are now tunneled as they should be (there was an earlier issue around these), but the Hungarian extra chars don't show properly. áéíóöőúüű ÁÉÍÓÖŐÚÜŰ Also, before others might report, some Polish and other special characters present on a Hungarian keyboard also don't show: łŁđĐäÄ€§

Remote locale is hu_HU.UTF-8

FranklinYu commented 6 years ago

Unicode support is broken (recently) and it's easy to reproduce. SSH into any Linux with Bash 4.2 or later, then

echo -e '\u2620'

Expected to see Skull and Crossbones (☠), but saw Γÿá.

bagajjal commented 6 years ago

@MathiasMagnus @franklinyu - Your findings are unrelated to this issue. They land up in different code base.

Please note that ssh.exe uses conhost.exe (owned by console team) from win10 onwards to parse the incoming VTSequence. I advise you to file an issue here https://github.com/Microsoft/console/issues.

FranklinYu commented 6 years ago

@bagajjal If I understand correctly, both PowerShell Core and WSL Bash run on conhost.exe (Console Windows Host). I tried Latin Small Letter C with Acute (ć) on both of them and they display only one character (even though the font does not support that character). On SSH client it displays two, so I don't think Console Windows Host plays a role here.

bagajjal commented 6 years ago

@franklinyu - Please file a new bug, will look into this further.

bagajjal commented 4 years ago

fixed part part of https://github.com/PowerShell/openssh-portable/pull/322