Bug 240407

Summary: ssh should save and restore terminal state
Product: [Fedora] Fedora Reporter: Jon Dufresne <jon.dufresne>
Component: opensshAssignee: Tomas Mraz <tmraz>
Status: CLOSED UPSTREAM QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 6   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-05-17 09:29:46 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Jon Dufresne 2007-05-17 08:00:21 EDT
Description of problem:
Please refer to gnome bug 438977
http://bugzilla.gnome.org/show_bug.cgi?id=438977 for the motivation behind this
bug report.

It seems when a ssh server closes a connection with a client unexpectadly the
terminal state remains in state from the ssh session. If this terminal state is
"fullscreen" (as emacs puts it in) then the user will lose their ability to
scroll in their terminal.

I propose that a fix for this would be that before a ssh sessions connects, ssh
should save the state, then upon exiting restore that state, regardless of what
happened inside the ssh session.

Program flow could be something like this

save terminal state
start ssh session
close ssh session
restore terminal state

In this case if the ssh session crashed while in "fullscreen" mode it would not
affect the user.

Version-Release number of selected component (if applicable):
$ ssh -v
OpenSSH_4.3p2, OpenSSL 0.9.8b 04 May 2006
Comment 1 Tomas Mraz 2007-05-17 09:29:46 EDT
The same thing happens if a program running locally (without the ssh connection)
which puts the terminal into a fullscreen mode crashes.

You can reset the terminal's mode using the 'reset' command.

You can propose this feature request upstream (http://bugzilla.mindrot.org/).