Hacker News new | ask | show | jobs
by reidacdc 1093 days ago
Seconding this, for sure. "/usr/sbin/sshd -T" (T for "test") has been a life-saver more than once.

My strongest version of this is that any application that manages any state should be able to report on that state in a human- and machine-readable way.

1 comments

This doesn't tell you the current running configuration, it tells you the current configuration on disk. These should be the same, but aren't always. I personally have a nasty habit of forgetting to reload configs. I make sure to leave them in a syntactically valid state, but I really don't care if someone can't access my webserver for a while; if I have to go, I add a quote and a curly bracket, save, and close my ssh session. If my 5 minutes away runs into tomorrow, then I no longer remember what's been changed (I manage this these days by making /etc a git repo with an ignore list and stashing incomplete changes...then forgetting to commit them when I'm done)