openssh-portable icon indicating copy to clipboard operation
openssh-portable copied to clipboard

Implementing RFC 4254 section 6.9 : Signals

Open JawaGL opened this issue 7 years ago • 1 comments

Hello every one,

Following the discussion “trying to resurrect discussion about "Cannot signal a process over a channel (rfc 4254, section 6.9)"” on the mailing list (link: https://marc.info/?t=153077282000003&r=1&w=2), I would like to put an eventual patch here so it is not forgotten.

The code is a gathering of other codes that were proposed on Bugzilla with some modifications.

This patch allows the ssh client to send “signal” messages (Section 6.9 of RFC 4254) via the mechanism of escape characters, eg : ‘~ST’ to send a SIGTERM to the remote process.

Upon reception of such message, the server will send the chosen signal to the process group of the last forked process or the process on the foreground depending if it is in exec or shell mode.

There is also a rudimentary test for these functionalities in the test suite.

Best regards

JawaGL avatar Aug 28 '18 10:08 JawaGL

The server side of this landed in openssh-7.9, but we didn't commit the client side. If you have a use-case for that then we could consider it.

djmdjm avatar Jun 07 '19 05:06 djmdjm