server-check: check SSH settings and open ports from the command line
Most server hardening advice ends with “now check your config”. Checking means reading sshd_config, remembering that files in sshd_config.d can override it, knowing which defaults apply to settings nobody wrote down, and then running ss and working out what each port is. It’s easy to skip, so it gets skipped. server-check does that part. It reads the settings sshd actually uses and the ports that…
Server hardening advice often concludes with "now check your configuration." This involves reading the sshd_config file, recognizing that files in sshd_config.d can override it, understanding which defaults apply to settings not explicitly written, and then using the ss command to determine which ports are open. It's easy to overlook this step, and server-check automates this process.
It examines the actual settings used by sshd and the ports currently in use, listing any adjustments needed in simple English with instructions on how to make the changes. The tool is free, licensed under the MIT license, and is available on GitHub. Server-check is also available on npm. To use it, you need Node.js 18 or later on the server.
Run it with sudo since sshd -T only works as root and ss displays program names only to root. Run the command like this: sudo npx alsops-server-check. It reads two things: the output of sshd -T, which reflects the final configuration after all includes and defaults, and the output of ss -tulpn (or netstat -tulpn if ss is not installed). This check does not send any data anywhere and does not alter anything on the server.
Rewritten by urgent.news; may contain errors — check the original.
Source: dev.to