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.
RHEL version considerations
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
To register the system to Red Hat Subscription Management (RHSM) and Insights for Red Hat Enterprise Linux with a single command, it might make sense to run the rhc connect
command during the RHEL installation workflow, following network configuration. For RHEL 8.6 and later, this step will take care of the registration to Red Hat Subscription Management (RHSM), but you may 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
- Client Configuration Guide for Red Hat Insights
- Creating Red Hat Customer Portal Activation Keys
- Getting Started with RHEL System Registration
- Performing an advanced RHEL installation
- Performing a standard RHEL installation
- Registration Assistant - a registration method that uses a guided lab in Red Hat Customer Portal Labs.
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 enables all available features: access to Red Hat content, analytics for Red Hat Insights, and remote management.
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 Subscription Manager.
For more information, see TCP ports and destinations.
Procedure
- Open the terminal window.
Do one of the following:
To register the system with the default feature level and ensure the system executes the remediations and tasks from Insights:
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 registering your system:
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 feature can be replaced 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.
- For example, if you want to register your system with a remote management feature disabled so that your system cannot be managed remotely but the system has access to RHEL content and collects 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: ✓ Connected to Red Hat Red Hat Subscription Manager ✓ Connected to Red Hat Insights ✓ The yggdrasil service is active
Connection status: ✓ Connected to Red Hat Red Hat Subscription Manager ✓ Connected to Red Hat Insights ✓ 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: ✓ Connected to Red Hat Red Hat Subscription Manager ✓ Connected to Red Hat Red Hat Insights ✓ The yggdrasil service is inactive
Connection status: ✓ Connected to Red Hat Red Hat Subscription Manager ✓ Connected to Red Hat Red Hat Insights ✓ The yggdrasil service is inactive
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Yggdrasil is required for the use of remote management. So, when yggdrasil is inactive remote management is inactive as well.
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 Red Hat Subscription Manager ✓ The remote host configuration daemon is active
Connection status: ✓ Connected to Red Hat Insights ✓ Connected to Red Hat Red Hat Subscription Manager ✓ The remote host configuration daemon is active
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Additional Resources
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 Red Hat Subscription Manager ✓ Connected to Red Hat Insights ✓ The remote host configuration daemon is active
Connection status: ✓ Connected to Red Hat 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. Enabling or disabling features after registration Copy linkLink copied to clipboard!
If you have already registered a system but you want to change the feature level, there are two methods available: manual or reinstalling.
2.4.1. Manually changing feature levels Copy linkLink copied to clipboard!
You can manually enable or disable the remote management feature as follows:
Prerequisites
- You are logged in to the system as root or have sudo permissions.
Procedure
- Open your command-line interface and navigate to the specific client system you want to edit.
Ensure that the
rhc-worker-playbook
package is installed and run the following command in your CLI:dnf install -y rhc-worker-playbook
# dnf install -y rhc-worker-playbook
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Start and enable the yggdrasil service.
systemctl start yggdrasil
# systemctl start yggdrasil
Copy to Clipboard Copied! Toggle word wrap Toggle overflow systemctl enable yggdrasil
# systemctl enable yggdrasil
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Confirm that the yggdrasil service is active and enabled by running the following command in your CLI:
systemctl status yggdrasil
# systemctl status yggdrasil
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
2.4.2. Re-registering to change feature levels Copy linkLink copied to clipboard!
If you have an already registered system and you want to change the feature levels for that system you can unregister the system and re-register in order to disable or enable features.
Re-registering a system will delete your customized configuration settings. Re-registration can also create a duplicate system record in your Systems Inventory. Therefore it is important to properly unregister the system before re-registering.
Unregistering 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 unregister your system.
Procedure
- Open the rterminal window.
Run the following command:
rhc disconnect
# rhc disconnect
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Re-Register the system with the desired feature level. Follow the instructions from section 2.1 Registering your Red Hat Enterprise Linux system version 10.
Additional resources
2.5. Disconnecting a system using remote host configuration Copy linkLink copied to clipboard!
Prerequisites
-
You are 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.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
2.6. Using additional CLI options Copy linkLink copied to clipboard!
View additional options for the rhc
command.
Prerequisites
-
You are logged in to the system as
root
or have sudo permissions.
Procedure
Run
ps
and pipe throughgrep
to display the connectorrhcd
process.PID TTY TIME COMMAND 14992 ? 0:00 /usr/sbin/rhcd
PID TTY TIME COMMAND 14992 ? 0:00 /usr/sbin/rhcd
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Run
systemctl status rhcd
to view the on/off status of therhcd daemon
.systemctl status rhcd
# systemctl status rhcd
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Enter
rhc --help
with no other options.GLOBAL OPTIONS: --version, -v print the version (default: false)
GLOBAL OPTIONS: --version, -v print the version (default: false)
Copy to Clipboard Copied! Toggle word wrap Toggle overflow