Considere usar a capacidade de systemctl
de enviar seus próprios comandos via ssh para hosts remotos.
Da página do manual:
-H, --host=
Execute the operation remotely. Specify a hostname, or a username
and hostname separated by "@", to connect to. The hostname may
optionally be suffixed by a container name, separated by ":", which
connects directly to a specific container on the specified host.
This will use SSH to talk to the remote machine manager instance.
Container names may be enumerated with machinectl -H HOST.
Funciona muito assim:
# ssh-copy-id -i ~/.ssh/id_ed25519.pub 172.25.50.100
...
# systemctl -H 172.25.50.100 status
● 172.25.50.100
State: degraded
Jobs: 0 queued
Failed: 1 units
Since: Thu 2017-03-02 01:56:07 EST; 17h ago
CGroup: /
# systemctl -H 172.25.50.100 poweroff
# echo $?
0