SSH sessions break randomly #20888

Closed
opened 2026-01-31 07:26:51 +00:00 by claunia · 2 comments
Owner

Originally created by @Feniksovich on GitHub (Nov 24, 2023).

Windows Terminal version

1.18.2822.0

Windows build number

10.0.22621.2715

Other Software

SSH Client: OpenSSH_for_Windows_8.6p1, LibreSSL 3.4.3
SSH Server: OpenSSH_8.9p1 Ubuntu-3ubuntu0.4, OpenSSL 3.0.2 15 Mar 2022

Steps to reproduce

  1. Open SSH session with ssh user@host (actually I use authentication via pubkey: -i "/path/to/pubkey")
  2. Do not use the terminal for a while (~5 minutes or even less)
  3. Try writing a command and notice that it doesn't happening
  4. Finally get an error:
user@host ~ # client_loop: send disconnect: Connection reset

[process exited with code 255 (0x000000ff)]
You can now close this terminal with Ctrl+D, or press Enter to restart.

Expected Behavior

There should be no error ¯_(ツ)_/¯

Actual Behavior

SSH session breaks and process exits with non-zero code.

Originally created by @Feniksovich on GitHub (Nov 24, 2023). ### Windows Terminal version 1.18.2822.0 ### Windows build number 10.0.22621.2715 ### Other Software SSH Client: OpenSSH_for_Windows_8.6p1, LibreSSL 3.4.3 SSH Server: OpenSSH_8.9p1 Ubuntu-3ubuntu0.4, OpenSSL 3.0.2 15 Mar 2022 ### Steps to reproduce 1. Open SSH session with `ssh user@host` (actually I use authentication via pubkey: `-i "/path/to/pubkey"`) 2. Do not use the terminal for a while (~5 minutes or even less) 3. Try writing a command and notice that it doesn't happening 4. Finally get an error: ``` user@host ~ # client_loop: send disconnect: Connection reset [process exited with code 255 (0x000000ff)] You can now close this terminal with Ctrl+D, or press Enter to restart. ``` ### Expected Behavior There should be no error ¯\_(ツ)_/¯ ### Actual Behavior SSH session breaks and process exits with non-zero code.
claunia added the Needs-TriageIssue-BugNeeds-Attention labels 2026-01-31 07:26:51 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Nov 27, 2023):

Does this happen even if you're using ssh from the vintage console host (conhost.exe)/? If so, then I'm guessing this is either an issue with your ssh client or server config.

see also #11099

@zadjii-msft commented on GitHub (Nov 27, 2023): Does this happen even if you're using ssh from the vintage console host (`conhost.exe`)/? If so, then I'm guessing this is either an issue with your ssh client or server config. see also #11099
Author
Owner

@Feniksovich commented on GitHub (Nov 27, 2023):

It seems the problem really lay in network issues on the server side. I was confused a bit that other SSH clients (Bitvise e.g.) didn't lose the connection at the same time as happened with Windows Terminal. Most likely they were just sending packets to maintain the connection state or smth. Anyway, thank you for your feedback!

@Feniksovich commented on GitHub (Nov 27, 2023): It seems the problem really lay in network issues on the server side. I was confused a bit that other SSH clients (Bitvise e.g.) didn't lose the connection at the same time as happened with Windows Terminal. Most likely they were just sending packets to maintain the connection state or smth. Anyway, thank you for your feedback!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#20888