On the impossibility to use escape sequences when the networks hangs

Steffen Nurpmeso steffen at sdaoden.eu
Thu Oct 16 11:43:00 AEDT 2025


Steffen Nurpmeso wrote in
 <20251016000338.fpc0phas at steffen%sdaoden.eu>:
 |Damien Miller wrote in
 | <678cc9a1-1129-61d9-49e5-c8eac5c54547 at mindrot.org>:
 ||On Tue, 14 Oct 2025, Steffen Nurpmeso wrote:
 ||> Steffen Nurpmeso wrote in
 ||>  <20251014153948.s43LKday at steffen%sdaoden.eu>:
 ||>|Theo de Raadt wrote in
 ||>| <6240.1760455482 at cvs.openbsd.org>:
 ||>  ...
 ||>||I think you are confused.  <newline>~[letter] parsing is in the client
 ||>||character input side, and the server or the link to the server has \
 ||>||nothing
 ||>||to do with it.
 ||>|
 ||>|But input is impossible.  It is stuck.  Not even ^C processing
 ||>|happens.  And, as i wrote, the code looks for newline (that much
 ||>|i grasped before posting), and that i cannot input.
 ||> 
 ||> i mean ok that after ^C .. maybe some special shell does *not*
 ||> "restart line processing" if it gets that, so maybe ssh cannot
 ||> assume anything after that ^C; still, i cannot input even that.
 | ...
 ||of course. ^C, ^Z etc are processed *by the server*. If there is no
 ||connectivity to the server then they can't be processed.
 ||
 ||~. is processed by the ssh client, so you should be able to use it
 ||under most circumstances.
 ||
 ||Use [enter]~. to terminate a stuck ssh connection.
 |
 |But this only works at the beginning of a line.
 |Only then the client turns this mechanism "hot".
 |This condition requires that the network gets stuck at exactly
 |that time, directly after i hit a newline, otherwise i sit
 |completely helpless at the client prompt.[.]
 ...
 |In the end this is why i asked.  The network stuck, and my
 |terminal did, too.  You can also not backspace back "like grazy"
 |until you think you surely reached the start of the line, then hit
 |RETURN for newline, to hotten the trigger, since all that is
 |only line processing by the shell on the server side.
 ...
 |[.]there is plenty of state surrounding that
 |user input and the queue and the timer, right, what do i know,
 |echo "poo, queue fills packets are stuck, if you type the escape
 |in the next five seconds i will interpret it" and doing so surely
 |isn't it, not even without the echo, is it?

Or, you know, if the input queue grows and cannot be sent out, and
i then start hitting ^C, aka (would) create SIGINT through the
keyboard, then echo "i hear you master, i do not place this SIGINT
in the queue, but if you now use an escape, i'll dig it as that".
And i would say "thank you" in turn.
Just an idea...

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)


More information about the openssh-unix-dev mailing list