Bug 2033

Summary: Should exit correctly when connection is lost
Product: Portable OpenSSH Reporter: icegood <icegood1980>
Component: sshAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED WORKSFORME    
Severity: enhancement CC: djm
Priority: P5    
Version: 5.9p1   
Hardware: Other   
OS: Linux   
Attachments:
Description Flags
Cleanup channels when using ControlMaster and ~. none

Description icegood 2012-08-14 19:35:23 AEST
When connection is lost whole terminal hangs. Should be able closed correctly by typing ctrl+C or so (in particular be able to retransmit key proceed from remote to local machine)
=============================
ssh -V
OpenSSH_5.9p1 Debian-5ubuntu1, OpenSSL 1.0.1 14 Mar 2012

uname -a
Linux ubuntu 3.2.0-29-generic #46-Ubuntu SMP Fri Jul 27 17:03:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
Comment 1 Damien Miller 2012-08-17 10:16:57 AEST
If you are using an interactive session, then ctrl-C can't kill the local ssh process (think about it for a moment and you'll realise why). For interactive sessions you should use the Disconnect escape sequence described in the "ESCAPE CHARACTERS" section of "man ssh".

Usually "<enter>~." unless you have overridden it.
Comment 2 Darren Tucker 2012-08-17 10:40:22 AEST
Created attachment 2181 [details]
Cleanup channels when using ControlMaster and ~.

Also note that there is a known bug when using ControlMaster (ie mux mode) where the escape sequence ~. does not work in the ControlMaster client.  If this is what you're seeing please try the attached patch.
Comment 3 Damien Miller 2016-08-02 10:42:05 AEST
Close all resolved bugs after 7.3p1 release