Openbsd /
Sysctls
If you find ssh connections from OpenBSD to other servers frequently time out, try forcing TCP Keep Alives:
# sysctl net.inet.tcp.always_keepalive=1
To apply all sysctls in /etc/sysctl.conf, run this command as root:
$ doas sysctl -f /etc/sysctl.conf
You may get the following error:
sysctl: unknown option -- f usage: sysctl [-Aanq] [name[=value] ...]
In that case, you are running an older version of OpenBSD that does not support -f
argument.
you may use the following script to do it:
# for c in $(cat /etc/sysctl.conf | egrep -v "^#"); do sysctl $c; done