Skip to content

Commit 79244a7

Browse files
committed
ssh-session-open: Check for OpenSSH 9.8 sshd-session
Since OpenSSH 9.8 open sessions are managed by a separate sshd-session binary instead of sshd, so update the regex in ssh-session-open to match the new binary. Keeping the "-session" part optional preserves compatibility with OpenSSH <= 9.7.
1 parent 04ddc5e commit 79244a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/sh
22
# Check for active SSH connections/sessions *to* the system
33

4-
pgrep -f 'sshd(\.[^:]+)?:.*pts' >/dev/null && exit 254
4+
pgrep -f 'sshd(-session)?(\.[^:]+)?:.*pts' >/dev/null && exit 254
55
exit 0

0 commit comments

Comments
 (0)