console output/history auto clears after logout from ssh session #19841

Open
opened 2026-01-31 06:55:05 +00:00 by claunia · 0 comments
Owner

Originally created by @mfatty on GitHub (May 9, 2023).

Windows Terminal version

1.16.10262.0

Windows build number

10.0.22621

Other Software

Cygwin
Windows Powershell

Steps to reproduce

Start a new local terminal session (either Powershell or Cygwin)
Ssh to remote linux host (ssh user@ip)
On remote host via the ssh session, run some linux commands and get some output on console
Now I like 100 lines of output on console.
Type 'exit' to logout of ssh session
All the 100 lines of console output/history I had generated from the ssh session are gone.

remote-session.txt

when I type 'exit', everything clears on the console and all I get on the terminal is
Connection to <ip-address> closed.
PS C:\Users\username>

Expected Behavior

I expect to the terminal to keep the console output/history as I switch between local to remote sessions on the same terminal tab.

Actual Behavior

Terminal deletes console output/history when I logout from remote ssh session.

Originally created by @mfatty on GitHub (May 9, 2023). ### Windows Terminal version 1.16.10262.0 ### Windows build number 10.0.22621 ### Other Software Cygwin Windows Powershell ### Steps to reproduce Start a new local terminal session (either Powershell or Cygwin) Ssh to remote linux host (ssh user@ip) On remote host via the ssh session, run some linux commands and get some output on console Now I like 100 lines of output on console. Type 'exit' to logout of ssh session All the 100 lines of console output/history I had generated from the ssh session are gone. [remote-session.txt](https://github.com/microsoft/terminal/files/11428474/remote-session.txt) when I type 'exit', everything clears on the console and all I get on the terminal is `Connection to <ip-address> closed.` `PS C:\Users\username>` ### Expected Behavior I expect to the terminal to keep the console output/history as I switch between local to remote sessions on the same terminal tab. ### Actual Behavior Terminal deletes console output/history when I logout from remote ssh session.
claunia added the Needs-TriageIssue-BugNeeds-Attention labels 2026-01-31 06:55:05 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#19841