4 ms·
I thought that SSH used it to pass ^C up faster than the rest of the stream so that you can quickly kill programs that flood the terminal. I've never verified t
by ketralnis 12y ago
I thought that SSH used it to pass ^C up faster than the rest of the stream so that you can quickly kill programs that flood the terminal. I've never verified this though.
- derefr 12y agoSSH uses the URG flag, IIRC.
- caf 12y agoThe TCP URG flag and the OOB data described here are the same thing.
- MBCook 12y agoThe article says Telnet works that way, it seems reasonable to think SSH might use it for the same purpose.
- deleted 12y ago[deleted]
- 0x0 12y agoBut the ^C should be encrypted. If SSH sets the URG flag on a packet containing an encrypted ^C, it would be leaking plain-text - even for just one byte :)
- krakensden 12y agoNot just encrypted, authenticated- it would be bad if a MITM could send ^Cs out to fuck with you at any time.
- ambrop7 12y agoI don't know how it actually works, but I can't see how this would be needed in that situation. The ^C signal goes from client to server, while the program is flooding in the opposite direction. So the flood of data shouldn't delay the ^C transmission.
- kentonv 12y agoThe real problem is not with programs flooding the terminal, but rather that if the foreground program isn't accepting input (perfectly normal for many programs) then by design the socket buffer will fill up, TCP flow control will kick in, and the client machine will stop even sending the bytes to the server. In order for a ctrl+C to get around the backed up buffer, it has to bypass the regular queue.