ProblemI execute command that outputs LOTS of information through SSH. For example, I foolishly add debug information inside a loop that executes million times, or just run cat /dev/urandom for kicks.The terminal is flooded with information.I want to terminate the command ASAP and fix my program. I don't care what it prints. Now, the thing is that I press Ctrl+C ASAP (in the example above I pressed it immediately after running the command), but it still takes its time to print all the information I don't even need.What I've triedI tried pressing Ctrl+C so hard that it had funny results when terminal finally caught up:OUTPUT HERE^Crr-@burza:~/xor$ ^Crr-@burza:~/xor$ ^Crr-@burza:~/xor$ ^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^Crr-@burza:~/xor$ ^Crr-@burza:~/xor$ ^Crr-@burza:~/xor$ ^Crr-@burza:~/xor$ ^Crr-@burza:~/xor$ ^Crr-@burza:~/xor$ ^Crr-@burza:~/xor$ ^Crr-@burza:~/xor$ ^Crr-@burza:~/xor$ ^CI also read about Ctrl+S which apparently is used to tell terminal stop output, I need to catch up but apparently it does nothing.Miscellaneous detailsI'd like not to alter the command I run so I can rescue myself in any situation, even if I don't remember that the program I run could end up like that.My SSH client runs on Cygwin (CYGWIN_NT-6.1-WOW64 luna 1.7.30(0.272/5/3) 2014-05-23 10:36 i686 Cygwin) in MinTTY with terminal type set to xterm-256color.SSH server runs on Debian (Linux burza 3.2.0-4-686-pae #1 SMP Debian 3.2.51-1 i686 i686 i686 GNU/Linux).
Stopping output from a program run in SSH session NOW
ssh;terminal;cygwin
Some of that output will be buffered. You send your Ctrl+C to the remote end which interrupts the running program. The program exists and the shell send the characters to show you the prompt again. Before the prompt is shown your screen will first show all the data that was buffered and already on it's way to you.What you're asking is for the program to stop and the data in transit to somehow disappear. That can't happen as it's already en-route.The only way you can make sure that you don't see this data is to exit the terminal at your end and then re-connect to your remote - but that's probably far more effort than waiting for the buffered data to display.