sudo systemctl is-active ssh

Category: VPS Management

sudo systemctl is-active ssh

Report whether SSH service is running

Prints a single word — active, inactive, or failed — that scripts can parse, unlike the verbose status output. is-active checks only the current state, while is-enabled asks whether the unit starts at boot. Both exit non-zero when the answer is no, which makes them natural if conditions in shell scripts.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.