"hostnamectl -H" uses ssh to connect to remote hosts. If you set up ssh to not require a password you should get what you are looking for.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.