Skip to content

"Broken pipe" when trying to connect with pseudo-terminal allocation disabled #2024

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
3 tasks done
nisargjhaveri opened this issue Jan 12, 2023 · 5 comments
Closed
3 tasks done

Comments

@nisargjhaveri
Copy link

nisargjhaveri commented Jan 12, 2023

Prerequisites

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

Steps to reproduce

I have OpenSSH server running on a Windows 11 machine.

When I try to ssh into that machine using -T options, the connection dies after successful authentication with client_loop: send disconnect: Broken pipe

Expected behavior

The connection should keep alive.

Actual behavior

The server crashes and the connection is closed with `client_loop: send disconnect: Broken pipe`

Error details

Server logs

debug1: server_input_channel_req: channel 0 request shell reply 1
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req shell
Starting session: shell for DOMAIN\\\\user from <ipv6> port 52084 id 0
debug2: fd 9 setting O_NONBLOCK
debug2: fd 11 setting O_NONBLOCK
debug2: fd 12 setting O_NONBLOCK
debug2: fd 13 setting O_NONBLOCK
debug2: fd 14 setting O_NONBLOCK
debug2: fd 15 setting O_NONBLOCK
debug3: shell: "c:\\\\windows\\\\system32\\\\cmd.exe"
debug3: shell_option: /c
debug3: exec_command: (null)
debug3: arg escape option: TRUE
debug3: spawn_argv[0]: "c:\\\\windows\\\\system32\\\\cmd.exe"
debug3: mm_request_receive: entering
debug1: do_cleanup
C:\Program Files\OpenSSH\sshd.exe exited on HOSTNAME with error code 255.

Client Logs

debug2: channel 0: request shell confirm 1
debug3: send packet: type 98
debug2: channel_input_open_confirmation: channel 0: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug3: send packet: type 1
client_loop: send disconnect: Broken pipe

Environment data

Server

OpenSSH_for_Windows_8.9p1, LibreSSL 3.4.3

Client

➜ ~ % ssh -V       
OpenSSH_9.0p1, LibreSSL 3.3.6
➜ ~ % uname -a                   
Darwin client-hostname 22.2.0 Darwin Kernel Version 22.2.0: Fri Nov 11 02:08:47 PST 2022; root:xnu-8792.61.2~4/RELEASE_X86_64 x86_64

Version

OpenSSH_for_Windows_8.9p1, LibreSSL 3.4.3

Visuals

No response

@tgauth
Copy link
Collaborator

tgauth commented Jan 12, 2023

This is an SSHD issue in 8.9 - #1993
Can you upgrade it to 9.1?

@nisargjhaveri
Copy link
Author

Okay, sorry for the trouble. Seems like it is already fixed in 9.1.

Did not try 9.1 earlier since it had an extra notice of being a beta-release and non-production ready. I'm curious as all the releases here are marked Beta. Where do I find production releases?

@tgauth
Copy link
Collaborator

tgauth commented Jan 12, 2023

Yes, all GitHub releases are beta releases. The production releases are available in Windows as a feature-on-demand - https://learn.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse?tabs=gui.
For Windows 11, the installing through feature-on-demand should install OpenSSH 8.6, which also does not have this issue.

@nisargjhaveri
Copy link
Author

I was getting the issue on OpenSSH 8.6, installed from Windows 11 directly. Then I updated to 8.9 to see if the issue resolves or not.

I was getting the same issue on multiple Windows 11 machine when installed with Optional Features. Just in case this helps.

I'll anyway resolve this issue since it is fixed in an upcoming version.

@geekwilliams
Copy link

geekwilliams commented Sep 22, 2023

Still having this exact issue on 9.1, but seems to be fixed in 9.2. Installed 9.2 via winget install "openssh beta"

Leaving a comment in case someone else sees this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants