4

windows terminal 连 SSH 后无法输入中文标点符号 « 阅微堂

 3 years ago
source link: https://zhiqiang.org/it/windows-terminal-cannot-type-chinese-punctuations-in-ssh.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

windows terminal 连 SSH 后无法输入中文标点符号

作者: 张志强

, 发表于 2021-03-02

, 共 669 字 , 共阅读 132 次

当用 windows terminal 登录 SSH 服务器后:

ssh 127.0.0.1

无法输入全角的标点符号。普通汉字则正常。而且该问题只出现在用 terminal 连 SSH 之后, powershell 和自带的 wsl ubuntu 没问题。

查到 terminal 的一个 issue: https://github.com/microsoft/terminal/issues/9035,把问题指向了 portable-openssh。命令ssh -V可以查看 openssh 的版本,当前为OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5

https://github.com/PowerShell/Win32-OpenSSH/releases/下载最新的 openssh ,解压到D:\download\OpenSSH-Win32\ssh.exe,然后下面命令连接到 WSL SSH ,标点符号正常了:

D:/download/OpenSSH-Win32/ssh.exe 127.0.0.1

此时D:/download/OpenSSH-Win32/ssh.exe -V得到的版本信息是OpenSSH_for_Windows_8.1p1, LibreSSL 2.9.2

现在还不知道怎么更新系统自带的 openssh ,找到其路径在C:/windows/sysmtem32/OpenSSH/ssh.exe,但直接替换后会报找不到 libcrypto.dll 的错误。

Q. E. D.

avatar-0.jpg
avatar-7.jpg
bpefei
2021-03-31

把新版SSH添加到环境变量里,旧版的从环境变量里撤掉,就可以快速用命令行启动新版ssh


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK