Bug 498702 - After disconnecting from internet while an ssh session was running in a tab, the shell becomes unresponsive
Summary: After disconnecting from internet while an ssh session was running in a tab, ...
Status: RESOLVED DOWNSTREAM
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 24.12.0
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-15 18:06 UTC by alt
Modified: 2025-01-20 07:13 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description alt 2025-01-15 18:06:14 UTC
SUMMARY
If you run an ssh session in a tab, when you disconnect from the internet for sufficient time for whatever reason (including suspension), the shell inside that tab becomes unresponsive (not responding to any keyboard input) and is stuck to what was displayed before instead of displaying "connection timed out" and regaining control. 
The only option is to close the tab and open a new one, destroying the environment (set variables, etc). Other tabs will continue to work normally.
Sometimes if you wait for long it will finally display "connection timed out" and you'll regain control of the shell. 
Instead of waiting for long hoping it will resolve itself, it would be preferable to cut it short.

STEPS TO REPRODUCE
1. run ssh in Konsole, establishing a connection to a server
2. disconnect from the internet for sufficient time (how much time can also depend on the server, I guess, if the connection is reestablished after a short while)
3. observe the tab running ssh, the shell should get stuck and unresponsive 

OBSERVED RESULT
shell inside the tab gets stuck and unresponsive

EXPECTED RESULT
displaying "Connection timed out" soon after the connection is reestablished


SOFTWARE/OS VERSIONS
Operating System: Manjaro Linux 
KDE Plasma Version: 6.2.5
KDE Frameworks Version: 6.9.0
Qt Version: 6.8.1
Kernel Version: 6.6.69-1-MANJARO (64-bit)
Graphics Platform: Wayland


ADDITIONAL INFORMATION
Comment 1 John Kizer 2025-01-20 07:13:29 UTC
Hi - the shell not accepting input there would appear to be because the OpenSSH program is waiting (for potentially a very long time) to see if it can reestablish a connection.

OpenSSH does have a built-in feature to exit that state and disconnect - you can press Enter, ~, then . to disconnect and return to your local shell.