hostnamectl
command on a remote system, use the -H, --host
option as follows:
~]# hostnamectl set-hostname -H
[username]@hostname
Where hostname is the remote host you wish to configure. The username is optional. The hostnamectl tool will use SSH
to connect to the remote system.