You are not logged in.

#1 2015-07-06 17:56:32

lonaowna
Member
Registered: 2013-03-25
Posts: 28

systemctl remote authentication

If I run a systemctl command which requires authentication, while I'm logged in via SSH, I receive a password promp from polkit:

[lonaowna@server ~]$ systemctl restart httpd.service
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to manage system services or other units.
Authenticating as: root

When I run the same command, from a remote client, using the systemctl -H flag, I get a "Interactive authentication required." error:

[lonaowna@client ~]$ systemctl restart httpd.service -H server
Failed to restart httpd.service: Interactive authentication required.

Why can't systemctl start the same polkit authentication procedure as when I'm logged in through SSH? Is there a way to make this work? Should I open a feature request, or is what I'm asking for technically impossible?

(I know that I can circumvent this by running the last command with "-H root@server", but I'd rather not allow root to login over SSH, for security purposes)

Offline

#2 2015-07-07 11:07:19

revellion
Member
From: Sweden
Registered: 2007-04-10
Posts: 54

Re: systemctl remote authentication

First time i've seen one use systemctl for remoting hosts and services.

Is it only a few or single hosts you're restarting/managing services on or is it several?


Hurricane Electric Certified IPv6 Sage

CPU: Core i7-2600 @ 4.0Ghz | RAM: 16GB (4x4GB) | GFX: AMD Radeon R9 290 4096MB VRAM | HDD: 1x 120GB SATA3 Corsair SSD (~500MB/s RW), 1x SATA2 250GB, 1x SATA2 320GB, 1x 180GB SATA3 Intel SSD
*EDIT* Replaced Nvidia GTX 570 for a AMD Radeon R9 290, and added an extra SSD 180GB

Offline

Board footer

Powered by FluxBB