logoalt Hacker News

mindcrimetoday at 12:17 PM1 replyview on HN

It wasn't literally today, but about 2 days ago I discovered the -H (and --host) arguments to systemctl. These allow you to pass a hostname of a remote server, so you can use systemctl to manage systemd services on remote machines. It layers over ssh, so the cleanest way to do it is to have passwordless ssh with certificates set up to the remote host. If you do, running systemctl commands remotely is totally seamless.

https://www.tecmint.com/control-systemd-services-on-remote-l...


Replies

yjftsjthsd-htoday at 2:32 PM

What's the advantage to

  systemctl --host foo status httpd.service
vs

  ssh -t foo systemctl status httpd.service

?
show 2 replies