sshing into a box running tc ...
then running "stty -echo"
eg
( '>')
/) TC (\ Core is distributed with ABSOLUTELY NO WARRANTY.
(/-_--_-\) www.tinycorelinux.net
tinycore@pc:~$ stty -echo
Connection to *ip-address* closed.
ob@otherbox:~/
causes exit from ssh
presumably something to do with still somewhat mystic tty ...
see also :" the TTY demystified " @
https://forum.tinycorelinux.net/index.php?topic=27406.0background , trying (to copy)
various methods[2] to capture key press in script (awk)
i found "stty -echo" appeared to be used to prevent "asci control characters"
from being echoed
eg
awk 'function cmd(str){ cmd_str=( str == "" ? "echo foo" : str) ; while( (cmd_str | getline line) >0 ) print line }
BEGIN{ cmd("clear"); while(1) { getline xline < "/dev/tty" ; print xline ; } }'
run the above infinite loop
then pressing
>up down left right
arrow keys
*should* show
^[[A^[[C^[[D^[[C
** use
ctrl-c to exit the process ( though id assume that is obvious to most readers !)
awk 'function cmd(str){ cmd_str=( str == "" ? "echo foo" : str) ; while( (cmd_str | getline line) >0 ) print line }
BEGIN{ cmd("clear;stty -echo"); while(1) { getline xline < "/dev/tty" ; print xline ; } }'
adding (the mystical) command "stty -echo" to the command indeed prevents this echoing ;
when run locally
can any more knowledgeable mystic explain
what magic it is exactly
which makes "stty -echo" exit from ssh? ?.?.?
**[2]
comparing
key-press methods from fm.awk and
https://jellepelgrims.com/posts/awkventure
https://github.com/jpelgrims/awkventure