bugzilla-daemon at mindrot.org
2025-Jun-09 05:16 UTC
[Bug 3837] New: Feature Request: A new TOKEN expanding to PID
https://bugzilla.mindrot.org/show_bug.cgi?id=3837 Bug ID: 3837 Summary: Feature Request: A new TOKEN expanding to PID Product: Portable OpenSSH Version: 10.0p2 Hardware: All OS: Linux Status: NEW Severity: enhancement Priority: P5 Component: ssh Assignee: unassigned-bugs at mindrot.org Reporter: shen_jiamin at comp.nus.edu.sg Could it be possible to add a new token (e.g. `%P`) that expands to the PID of the SSH client process. This token would be used in the `ControlPath` setting in `ssh_config`. When using `ControlMaster`, SSH creates a background master process. However, there's currently no clean or reliable way to identify the PID of this process via the socket name. This makes it difficult to manage or clean up background SSH processes. Introducing a new token (e.g. `%P`) for use in `ControlPath`, which would expand to the PID of the SSH client process, would allow users to easily associate a control socket with the actual running SSH process, making it easier to manage or terminate it. -- You are receiving this mail because: You are watching the assignee of the bug.
bugzilla-daemon at mindrot.org
2025-Jun-16 09:15 UTC
[Bug 3837] Feature Request: A new TOKEN expanding to PID
https://bugzilla.mindrot.org/show_bug.cgi?id=3837 Damien Miller <djm at mindrot.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |djm at mindrot.org --- Comment #1 from Damien Miller <djm at mindrot.org> --- Adding a PID token isn't very useful, because it will be different for each ssh ControlMaster and so multiplexing client's won't be able to connect to it unless the ControlPath is explicitly specified.> there's currently no clean or reliable way to identify the PID of this process via the socket nameSure there is: $ ssh -F none -oControlPath=~/.ssh/ctl-djm at sv32:22 -O check blah Master running (pid=29435) -- You are receiving this mail because: You are watching someone on the CC list of the bug. You are watching the assignee of the bug.