Skip to content

Terminate SSHServerProcess when client sends ctrl+c (without Break for 0 msec error) #729

Answered by ronf
LogFlames asked this question in Q&A
Discussion options

You must be logged in to vote

I'm going to assume that you're running with the defaults on the server, meaning the line_editor feature is enabled, and that you are using an interactive SSH client like OpenSSH, with it requesting a PTY (and sending terminal type information).

In such a setup, the line editor on the server takes responsibility for doing things like echoing the user's input and allowing them to edit it a line at a time before actually sending it to the server application. It also does things like convert a received Ctrl-C into a "break" (like what you'd get from OpenSSH by entering "~B") and converting a received Ctrl-D as a "soft" end-of-file, similar to what you get when a client half-closes a connecti…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@LogFlames
Comment options

@ronf
Comment options

ronf Jan 8, 2025
Maintainer

Answer selected by LogFlames
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants