-
-
Notifications
You must be signed in to change notification settings - Fork 15.5k
sshd: disable trigger limit for systemd socket #103946
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
85337f5
to
9b0a4d0
Compare
I marked this as stale due to inactivity. → More info |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is worth merging. I actually believe I've encountered this in April:
…
Apr 13 00:50:39 natto systemd[1]: sshd.socket: Too many incoming connections (64), dropping connection.
Apr 13 00:50:39 natto systemd[1]: sshd.socket: Too many incoming connections (64), dropping connection.
Apr 13 00:50:39 natto systemd[1]: sshd.socket: Too many incoming connections (64), dropping connection.
Apr 13 00:50:40 natto systemd[1]: sshd.socket: Trigger limit hit, refusing further activation.
Apr 13 00:50:40 natto systemd[1]: sshd.socket: Failed with result 'trigger-limit-hit'.
Apr 13 00:50:40 natto systemd[1]: sshd.socket: Consumed 1min 3.131s CPU time, received 209.8G IP traffic, sent 9.8G IP traffic.
Apr 20 18:54:51 natto systemd[1]: Listening on SSH Socket.
I had physical access to the host on the 20th and could restart sshd.
@ofborg eval |
I marked this as stale due to inactivity. → More info |
I still use this patch and would like it to be merged. |
@ofborg eval |
@lopsided98 can you rebase on master to fix the github actions? |
When startWhenNeeded is enabled, a brute force attack on sshd will cause systemd to shut down the socket, locking out all SSH access to the machine. Setting TriggerLimitIntervalSec to 0 disables this behavior.
9b0a4d0
to
f5e0f29
Compare
@ofborg test openssh |
Motivation for this change
When
startWhenNeeded
is enabled, a brute force attack on sshd will cause systemd to shut down the socket, locking out all SSH access to the machine. SettingTriggerLimitIntervalSec
to 0 disables this behavior.This has been observed on other distros as well, for example: https://bugs.archlinux.org/task/62248
cc @edolstra @infinisil @FRidh
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)