PowerShell / PowerShell/Win32-OpenSSH

BUG in ssh-shellhost.exe

Open
#2,186 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-Terminal Issue-Bug
Dominant language
No language data
Stars
8.3k
Forks
819
PR merge metrics
No merged PRs in 30d

Description

Prerequisites
  • Write a descriptive title.
  • Make sure you are able to repro it on the latest version
  • Search the existing issues.
Steps to reproduce

Server side-------------------
C:\Program Files\OpenSSH>"C:\Program Files\OpenSSH"sshd -ddd
...
debug1: sshd version OpenSSH_for_Windows_9.4, LibreSSL 3.7.3
...
debug3: shell: "c:\\windows\\system32\\cmd.exe"
debug3: shell_option: /c
debug3: couldn't find CreatePseudoConsole() in kernel32.dll dll
debug3: This windows OS doesn't support conpty
debug3: pty commandline: "C:\\Program Files\\OpenSSH\\ssh-shellhost.exe" ---pty "c:\\windows\\system32\\cmd.exe"

Client side----------------------------------
mode con cols=80 lines=9999
ssh -vvv Konstantin.Abakumov@127.0.0.1
...
debug1: Local version string SSH-2.0-OpenSSH_for_Windows_9.4
debug1: Remote protocol version 2.0, remote software version OpenSSH_for_Windows_9.4
...
debug3: client_repledge: enter
debug1: ENABLE_VIRTUAL_TERMINAL_INPUT is supported. Reading the VTSequence from console
debug3: couldn't find CreatePseudoConsole() in kernel32.dll dll
debug3: This windows OS doesn't support conpty
debug1: ENABLE_VIRTUAL_TERMINAL_PROCESSING is supported. Console supports the ansi parsing
....

uf\konstantin.abakumov@WUFRS0661151 C:\Users\user>mode con

Состояние устройства CON:

Строки:                9999
Столбцы:               80
Скорость клавиатуры:   31
Задержка клавиатуры:   1
Кодовая страница:      866

------------------------------------ ssh-shellhost.exe work well on start-----------------------------------------------

------------------------------------I enlarge width of console-----------------------------------------------

Client side----------------------------------
debug2: client_check_window_change: changed
debug2: channel 0: request window-change confirm 0
debug3: send packet: type 98
debug2: client_check_window_change: changed
debug2: channel 0: request window-change confirm 0
debug3: send packet: type 98
debug2: client_check_window_change: changed
debug2: channel 0: request window-change confirm 0
debug3: send packet: type 98
debug2: client_check_window_change: changed
debug2: channel 0: request window-change confirm 0
debug3: send packet: type 98

Server side-------------------
debug3: receive packet: type 98
debug1: server_input_channel_req: channel 0 request window-change reply 0
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req window-change
debug3: receive packet: type 98
debug1: server_input_channel_req: channel 0 request window-change reply 0
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req window-change

Client side----------------------------------
uf\konstantin.abakumov@WUFRS0661151 C:\Users\user>mode con

Состояние устройства CON:

Строки:                9999
Столбцы:               80
Скорость клавиатуры:   31
Задержка клавиатуры:   1
Кодовая страница:      866

------------------------------------Nothing happend!!! BUG in ssh-shellhost.exe -----------------------------------------------

exit
------------------------------------End session-----------------------------------------------
------------------------------------New session with same console-----------------------------------------------

ssh Konstantin.Abakumov@127.0.0.1
uf\konstantin.abakumov@WUFRS0661151 C:\Users\user>mode con

Состояние устройства CON:

Строки:                9999
Столбцы:               102
Скорость клавиатуры:   31
Задержка клавиатуры:   1
Кодовая страница:      866    

------------------------------------ ssh-shellhost.exe work well on start-----------------------------------------------

Expected behavior
After enlarge width of console
Columns:               102
Actual behavior
Columns:               80
Error details
The width of the console on the server side does not change
Environment data
Name                           Value
----                           -----
PSVersion                      5.1.14393.5582
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14393.5582
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
Version

OpenSSH_for_Windows_9.4, LibreSSL 3.7.3

Visuals

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the session using sshd -ddd and ssh-shellhost.exe, then trace how the server handles the window-change requests shown in the report. Compare the reported 80-column session with the expected 102-column result; done means the server-side console width updates after the client is resized.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
cli, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.