Open FranklinYu opened 6 years ago
Please run ConEmu with -log
switch and provide the logs with duplicated lines.
When you run ssh (Win32-OpenSSH) it does not push ANSI to ConEmu, but writes process sequences internally and calls WinAPI functions to produce output. ConEmu just shows that output.
Sorry for late reply. I tried running "path\to\ConEmu.exe" -log
in cmd.exe
, but it does not produces any log in cmd.exe
. Is there any log file generated elsewhere? I scanned through %AppData%
but didn't find any ConEmu related folder.
Hmm? I didn't get your point with "log in cmd.exe". https://conemu.github.io/en/LogFiles.html
And perhaps more interesting are ANSI log files: https://conemu.github.io/en/AnsiLogFiles.html
This problem still exists. ConEmu build: 200928 x64 OS version: Windows 10 Pro Ver. 2004 SSH version: OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
BTW, I have tried PuTTY to ssh into Linux server, and it works correctly. PuTTY would display only one motd.
Found a feasible solution:
If I used chcp 65001
which is used to changes cmd console code page before ssh
, I would get only one motd message.
Probably, this problem is caused by some encoding issues related to UTF-8.
Here is the way to setup ConEmu with chcp 65001
while launching:
(1) Go to Settings > Startup > Environment
(2) Enter the following string into the right panel: chcp 65001
(This command will make cmd.exe change code page number to UTF-8.)
I'm not sure whether this is a third-party problem; both components seem necessary to reproduce it.
Versions
ConEmu build: 180626 x64 OS version: Windows 10 x64 Used shell version (Far Manager, git-bash, cmd, powershell, cygwin, whatever): cmd, Git Bash, PowerShell (5/6) Win32-OpenSSH: 7.7p1, LibreSSL 2.6.4
Problem description
When I SSH into Linux machines, the motd (Message of the Day) is duplicated. Win32-OpenSSH is required to reproduce this issue.
Steps to reproduce
%ProgramFiles%\OpenSSH-Win64\ssh.exe my-linux-machine
.Actual results
The motd is duplicated like
This happens to many Unix-like distributions, including Fedora, Ubuntu, Arch, and macOS.
Expected results
Control Group
These experiments do not show this issue:
From above I conclude that ConEmu and Win32-OpenSSH are required to reproduce.