1

Here's what happens:

I'm in an ssh session in Windows Terminal (Version: 1.11.3471.0, Windows 10 20H2).

I need to step away from my machine, so I lock it by typing Windows-L.

When I come back, usually after an hour or so, and unlock the machine, the tab with the ssh session in it is completely non-responsive. By that I mean that it doesn't respond to keyboard input at all. It's not that I've been logged out of the remote, just dead. No errors or anything in the terminal.

I know that the machine wasn't asleep because the monitor was displaying a pretty picture when I logged in to find the situation I described above. However, it's possible that it tried to go to sleep while I was away.

This happens fairly often, maybe every time I lock the machine for a while.

Any ideas as to why that's happening and how I might prevent it?

Thanks!

Greg Gomez
  • 11
  • 2
  • The same thing happens to me. I don't mind restarting the ssh session, but the terminal is completely unresponsive. I'm on Version: 1.15.2874.0. – Percy Blanket Nov 03 '22 at 23:35

2 Answers2

1

SSH Escape Sequences (aka Kill Dead SSH Sessions)

Enter, ~. in the unresponsive terminal to terminate connection

Nifle
  • 34,203
  • 26
  • 108
  • 137
bwolmarans
  • 11
  • 2
  • This does not provide an answer to the question. Once you have sufficient [reputation](https://superuser.com/help/whats-reputation) you will be able to [comment on any post](https://superuser.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/1174765) – Rohit Gupta Feb 24 '23 at 03:57
0

It is because the sessions are closed when no data is transmitted (something like your firewall or load-balancer is dropping idle sessions)

Check these two links for a solution:

ivanc
  • 1
  • Thanks for the suggestion. However, it's not a closed pipe. When that happens, the shell leaves a message saying that the pipe was closed, and I'm still able to use the open session. In the case I'm asking about, the session freezes, and I have no option other than to close the tab. – Greg Gomez Jan 24 '22 at 16:23