systemd-stdio-bridge and D-Bus errors when trying to execute 'hostnamectl' remotely

0

Executing hostnamectl command to know host's chassis.

Want to write a proper script to run on a certain list of hosts, but having a problem when executing hostnamectl -H.

Note!

  1. works as expected when performing locally
  2. Can't install or use different command
  3. Can't perform any changes in the host (like soft links etc...)

Is there any other way to get this information remotely?

Error:

[root@Collector:monitoring]#hostnamectl -H host_ip 
root@host_ip's password: 
bash: systemd-stdio-bridge: command not found 
Failed to get D-Bus connection: Connection terminated during authentication.

igor

Posted 2018-12-27T08:03:14.553

Reputation: 253

Your requirements contradict each other. You ask for a different method to obtain this information, but you also say "Can't install or use different command". – user1686 – 2018-12-27T08:05:53.920

Maybe hostnamectl uses a certain file that I am not aware of, and can easily be opened remotely. Or other easy workaround... – igor – 2018-12-27T09:19:38.760

No answers