Chapter 2. Register and connect RHEL systems using the rhc client
The rhc client performs critical system tasks, such as registering your system to the Red Hat Hybrid Cloud Console, retrieving the current configuration of various services that the remote host configuration manager supports, and updating the current configuration of services. It also maintains a history of configuration changes, and ensures that newly connected systems are kept up to date with the latest configuration.
The rhc client updates a system through a change in the remote host configuration manager, and through a new remote host configuration connection event from Red Hat Insights for Red Hat Enterprise Linux inventory.
Currently, settings apply to all systems connected with the rhc client. You cannot configure a system or group of systems independently.
Before configuring your system to connect using the rhc client, review the configuration in Red Hat Hybrid Cloud Console > Red Hat Insights > Inventory > System Configuration > Remote Host Configuration (RHC). The remote host configuration manager settings determine your system’s configuration.
Setup procedures for the rhc client differ depending on the Red Hat Enterprise Linux (RHEL) version on the system.
RHEL 8.6 and later and RHEL 9.0 and later support simplified registration to Red Hat Subscription Management (RHSM) and Insights for Red Hat Enterprise Linux.
RHEL 8.5 supports the other features of remote host configuration, but configuration and setup involve a few more steps.
Timing of registration
Consider the timing of registration. To register the system to Red Hat Subscription Management (RHSM) and Insights for Red Hat Enterprise Linux with a single command, you can run the rhc connect
command during the RHEL installation workflow, after you configure the network. For RHEL 8.6 and later, this preceding step completes the registration to Red Hat Subscription Management (RHSM), but you can still use RHSM for advanced configurations.
If you have already installed and registered the RHEL installation with RHSM, or registered with Insights for Red Hat Enterprise Linux, you can still use rhc connect
to enable the rhc client at any time to get the benefits of the remote host configuration manager and direct remediations.
Additional resources
2.1. Registering your Red Hat Enterprise Linux system version 10 Copy linkLink copied to clipboard!
Register your RHEL 10 system by using the remote host configuration (rhc) client to connect to Red Hat services with the default feature levels. This connection enables all available features: access to Red Hat content, analytics for Red Hat Insights, and remote management. You can also disable any of the default feature levels.
Prerequisites
- You have an activation key and an organization ID to register your system.
- You have TCP ports and destinations enabled for the rhc daemon, Insights client, and Red Hat Subscription Manager.
For more information, refer to TCP ports and destinations.
Procedure
- Open a terminal window.
Do one of the following:
Register the system with the default feature levels and ensure the system can execute remediations and tasks from Insights, enter the following commands:
rhc connect --activation-key=<activation_key> --organization=<organization_ID>
# rhc connect --activation-key=<activation_key> --organization=<organization_ID>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow dnf install -y rhc-worker-playbook
# dnf install -y rhc-worker-playbook
Copy to Clipboard Copied! Toggle word wrap Toggle overflow To disable any of the features while you register your system, enter the following command:
rhc connect --activation-key=<activation_key_name> --organization=<organization_ID> --disable-feature <feature>
# rhc connect --activation-key=<activation_key_name> --organization=<organization_ID> --disable-feature <feature>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow + Where you can replace feature with: * content - Provides access to Red Hat CDN repositories. * analytics - Enables data collection for Insights. * remote-management - Establishes an additional MQTT network connection to Red Hat services for remote execution of certain actions from https://console.redhat.com.
+ .Example To register your system with remote management disabled, but allow the system access to RHEL content and data for Insights analytics, enter:
+
rhc connect --activation-key=<activation_key_name> --organization=<organization_ID> --disable-feature remote-management
# rhc connect --activation-key=<activation_key_name> --organization=<organization_ID> --disable-feature remote-management
Verification
Confirm the active features when registering with default options:
rhc status
# rhc status
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Connection status for hostname.example.com: ✓ Connected to Red Hat Subscription Manager ✓ Content ... Red Hat repository file generated ✓ Analytics ... Connected to Red Hat Insights ✓ Remote Management ... The yggdrasil service is active
Connection status for hostname.example.com: ✓ Connected to Red Hat Subscription Manager ✓ Content ... Red Hat repository file generated ✓ Analytics ... Connected to Red Hat Insights ✓ Remote Management ... The yggdrasil service is active
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Confirm the active features with remote-management disabled:
rhc status
# rhc status
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Connection status for hostname.example.com: ✓ Connected to Red Hat Subscription Manager ✓ Content ... Red Hat repository file generated ✓ Analytics ... Connected to Red Hat Insights [ ] Remote Management ... The yggdrasil service is inactive
Connection status for hostname.example.com: ✓ Connected to Red Hat Subscription Manager ✓ Content ... Red Hat repository file generated ✓ Analytics ... Connected to Red Hat Insights [ ] Remote Management ... The yggdrasil service is inactive
Copy to Clipboard Copied! Toggle word wrap Toggle overflow ImportantYggdrasil
is required for the use of remote management. Whenyggdrasil
is inactive, remote management is also inactive.
Additional Resources
2.1.1. Customizing feature levels Copy linkLink copied to clipboard!
If you have a RHEL 10 system, you can use remote host configuration (rhc) to set feature levels when registering with the Red Hat Hybrid Cloud Console.
By default, rhc connects your systems with the remote management feature level. This feature level includes access to RHEL content, analytics for Insights for Red Hat Enterprise Linux, and remote management (remediations and tasks services). If you want to opt out of any of these features, you can disable them when you register your systems.
Customizing feature levels functionality is only available with Red Hat Enterprise Linux version 10.
See the following table for more details about feature levels:
Feature Level | Feature Level Name in the Command Line Interface | Description |
---|---|---|
Access to Red Hat content | Content | This feature level provides access to content in the Red Hat Content Delivery Network (CDN). This allows you to install and update packages. |
Analytics for Insights for Red Hat Enterprise Linux | Analytics | This feature level collects data from your system using the Insights client and sends it to the Red Hat Hybrid Cloud Console (HCC). Then, Red Hat Insights analyzes your data and returns recommendations. You need to have the content feature enabled as well in order to use the analytics feature. |
Remote Management (Default) | remote-management | This allows you to use the remediations and tasks services. You must have the content and analytics features enabled in order to use the remote management feature. |
2.2. Registering a Red Hat Enterprise Linux system version 9 Copy linkLink copied to clipboard!
If you have a Red Hat Enterprise Linux version 9 system, you can use remote host configuration (rhc) to register your system:
Prerequisites
- You are logged in to the system as root or have sudo permissions.
- You have an activation key and an organization ID to register your system.
- You have TCP ports and destinations enabled for the rhc daemon, Insights client, and Subscription Manager.
For more information, see TCP ports and destinations.
Procedure
Open your command-line interface (CLI), and run the following commands on your client system:
rhc connect --activation-key=<activation_key_name> --organization=<organization_ID>
# rhc connect --activation-key=<activation_key_name> --organization=<organization_ID>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow dnf install -y rhc-worker-playbook
# dnf install -y rhc-worker-playbook
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
Enter the following command in your CLI:
rhc status
# rhc status
If the procedure is successful, you will see the following output:
Connection status: ✓ Connected to Red Hat Insights ✓ Connected to Red Hat Subscription Manager ✓ The remote host configuration daemon is active
Connection status: ✓ Connected to Red Hat Insights ✓ Connected to Red Hat Subscription Manager ✓ The remote host configuration daemon is active
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
2.3. Registering a Red Hat Enterprise Linux system version 8 Copy linkLink copied to clipboard!
If you have a Red Hat Enterprise Linux 8 system, you can use remote host configuration (rhc) to register your system.
Prerequisites
- RHEL version is 8.6 or later.
- You are logged in to the system as root or have sudo permissions.
- You have an activation key and an organization ID to register your system.
- You have TCP ports and destinations enabled for the rhc daemon, Insights client, and Subscription Manager.
For more information, see TCP ports and destinations.
Procedure
Open your command-line interface (CLI), and run the following commands on your client system:
rhc connect --activation-key=<activation_key_name> --organization=<organization_ID>
# rhc connect --activation-key=<activation_key_name> --organization=<organization_ID>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow dnf install -y rhc-worker-playbook
# dnf install -y rhc-worker-playbook
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Run the following command:
rhc status
# rhc status
Copy to Clipboard Copied! Toggle word wrap Toggle overflow If the procedure is successful, you will see the following output:
Connection status: ✓ Connected to Red Hat Subscription Manager ✓ Connected to Red Hat Insights ✓ The remote host configuration daemon is active
Connection status: ✓ Connected to Red Hat Subscription Manager ✓ Connected to Red Hat Insights ✓ The remote host configuration daemon is active
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Additional Resources
2.4. Disconnecting a system using remote host configuration Copy linkLink copied to clipboard!
You can disconnect a system using remote host configuration. When you have RHEL 10 and later systems, you can also disconnect or unregister a system so that you can then re-register it to add different feature levels.
Prerequisites
-
You logged in to the system as
root
or have sudo permissions.
Procedure
Run the following command on each Red Hat Enterprise Linux (RHEL) system that you want to remove from the remote host configuration manager.
ImportantDisconnecting through the rhc client unregisters your system from both the Red Hat Customer Portal and Red Hat Insights for Red Hat Enterprise Linux and disables the
yggdrasil
service.rhc disconnect
# rhc disconnect
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
Review the log message:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
2.5. Enabling or disabling features after registering systems with RHEL 10 Copy linkLink copied to clipboard!
If you already registered a RHEL 10 system and want to change its feature levels, you have two options:
- Change features manually without the rhc-client commands that are available only during the initial registration process.
- Reregister the systems which requires unregistering and then registering the system again with the feature levels that you want
2.5.1. Changing features manually after registering a RHEL 10 system Copy linkLink copied to clipboard!
You cannot change the feature level using the rhc client after the initial registration phase is completed. If you already registered a system and want to change the feature level, you must manually enable and disable features. For example, to change how a system is accessed remotely, manually enable or disable the remote management feature.
Prerequisites
- You have logged in to the system as root or have sudo permissions.
Procedure
To enable the remote management feature manually:
Enable the insights-client by entering the following command:
insights-client --register
# insights-client --register
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Install the
rhc-worker-playbook
by entering the following command:dnf install -y rhc-worker-playbook
# dnf install -y rhc-worker-playbook
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Start the
yggdrasil
service by entering the following command:systemctl start yggdrasil
# systemctl start yggdrasil
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Enter the following command to enable the
yggdrasil
service:systemctl enable yggdrasil
# systemctl enable yggdrasil
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
To disable the remote management service manually:
Enter the following command to stop the
yggdrasil
service:systemctl stop yggdrasil
# systemctl stop yggdrasil
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Enter the following command to disable the
yggdrasil
service:systemctl disable yggdrasil
# systemctl disable yggdrasil
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
Verify that the
yggdrasil
service is active and enabled, or inactive and disabled by running the following on a command line:systemctl status yggdrasil
# systemctl status yggdrasil
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The log message indicates that the service is active or inactive.
Additional resources
2.5.2. Re-registering a system to change feature levels using remote host configuration Copy linkLink copied to clipboard!
You might need to change the feature levels on a system to do something like restrict remote access. One of the ways to change the feature level on an already registered system is to unregister and then re-register the system using the rhc-client
command.
It is important to properly unregister the system before you re-register. Re-registering a system will delete your customized configuration settings and also create a duplicate system record in your Inventory > Systems.
Disconnecting through the rhc client unregisters your system from both the Red Hat Customer Portal and Red Hat Insights for Red Hat Enterprise Linux and disables the yggdrasil
service.
Prerequisites
- You have logged in to the system as root or have sudo permissions.
- You have an activation key and an organization ID to register your system.
Procedure
In the command line in a terminal, enter the following command to unregister the system:
rhc disconnect
# rhc disconnect
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - After you unregister the system, re-register the system with the needed feature level enabled. Refer to Registering your Red Hat Enterprise Linux system version 10.