Chapter 3. Establish authentication credentials to enable network scans


To run a scan on your network, you must first add a source that identifies the physical machines, virtual machines, or containers to scan. Then you must add credentials that contain the authentication data to access each asset.

3.1. Add network sources

Define network sources to identify the hosts, Internet Protocol (IP) addresses, and IP ranges that Discovery scans across your network.

Procedure

  1. Click the option to add a new credential based on your location:

    • From the Credentials view, click Add Source.
    • From the Sources view, click Add.
  2. On the Type page, select Network Range as the source type and click Next.
  3. On the Credentials page, enter the following information.

    1. In the Name field, enter a descriptive name.
    2. In the Search Addresses field, enter one or more network identifiers separated by commas. You can enter hostnames, IP addresses, and IP ranges.

      • Enter hostnames as Domain Name System (DNS) hostnames, for example, server1.example.com.
      • Enter IP ranges in Classless Inter-Domain Routing (CIDR) or Red Hat Ansible Automation Platform notation, for example, 192.168.1.0/24 for CIDR notation or 192.168.1.[1:254] for Red Hat Ansible Automation Platform notation.
    3. Optional: In the Port field, enter a different port if you do not want a scan for this source to run on the default port 22.
    4. In the Credentials list, select the credentials that are required to access the network resources for this source. If a required credential does not exist, click the Add a credential icon to open the Add Credential view.
  4. Click Save to save the source and then click Close to close the view.

Verification

  1. In the Sources view, verify that the new source appears in the sources list with the correct name and type.

3.2. Add network credentials

Create network credentials to authenticate Discovery scans against remote systems in your network by using Secure Shell (SSH)-based authentication.

Procedure

  1. Click the option to add a new credential based on your location:

    • From the Credentials view, click Add Network Credential.
    • From the Add Source wizard, click the Add a credential icon for the Credentials field.

    The Add Credential wizard opens.

  2. In the Credential Name field, enter a descriptive name.
  3. In the Authentication Type field, select the type of authentication that you want to use. You can select either Username and Password or SSH Key.
  4. Enter the authentication data in the appropriate fields, based on the authentication type.

    • For username and password authentication, enter a username and password for a user. This user must have root-level access to your network or to the subset of your network that you want to scan. Alternatively, this user must be able to obtain root-level access with the selected become method.
    • For SSH key authentication, enter a username and paste the contents of the ssh keyfile. Entering a passphrase is optional.
  5. Enter the become method for privilege elevation. Privilege elevation is required to run some commands during a network scan. Entering a username and password for the become method is optional.
  6. Click Save to save the credential and close the Add Credential wizard.

Verification

  1. In the Credentials view, verify that the new credential appears in the credentials list with the correct name and type.

3.3. Red Hat Discovery sources and credentials

To run a scan, you must configure data for two basic structures: sources and credentials. The type of source that you are going to inspect during the scan determines the type of data that is required for both source and credential configuration.

A source contains a single asset or a set of multiple assets that are to be inspected during the scan. You can configure any of the following types of sources:

Network source
One or more physical machines, virtual machines, or containers. These assets can be expressed as hostnames, IP addresses, IP ranges, or subnets.
vCenter source
A vCenter Server systems management solution that is managing all or part of your IT infrastructure.
Satellite source
A Satellite systems management solution that is managing all or part of your IT infrastructure.
Red Hat OpenShift source
A Red Hat OpenShift Container Platform cluster that is managing all or part of your Red Hat OpenShift Container Platform nodes and workloads.
Ansible source
An Red Hat Ansible Automation Platform management solution that is managing your Red Hat Ansible Automation Platform nodes and workloads.
Red Hat Advanced Cluster Security for Kubernetes source
A RHACS security platform solution that secures your Kubernetes environments.

When you are working with network sources, you determine how many individual assets you should group within a single source. Currently, you can add multiple assets to a source only for network sources. The following list contains some of the other factors that you should consider when you are adding sources:

  • Whether assets are part of a development, testing, or production environment, and if demands on computing power and similar concerns are a consideration for those assets.
  • Whether you want to scan a particular entity or group of entities more often because of internal business practices such as frequent changes to the installed software.

A credential contains data such as the username and password or SSH key of a user with sufficient authority to run the scan on all or part of the assets in that source. As with sources, credentials are configured as the network, vCenter, satellite, OpenShift, Red Hat Ansible Automation Platform, or RHACS type. A network source might require multiple network credentials to access all assets in a broad IP range. Conversely, a vCenter or satellite source typically uses a single credential to access a particular system management solution server. An OpenShift, Red Hat Ansible Automation Platform, or RHACS source uses a single credential to access a single cluster.

You can add new sources from the Sources view and you can add new credentials from the Credentials view. You can also add new or select previously existing credentials during source creation. It is during source creation that you associate a credential directly with a source.

Because sources and credentials must have matching types, any credential that you add during source creation shares the same type as the source. If you want to use an existing credential during source creation, the list of available credentials contains only credentials of the same type. For example, during network source creation, only network credentials are available for selection.

3.4. Network authentication for Red Hat Discovery

Network scans use Secure Shell (SSH) through Red Hat Ansible Automation Platform to inspect remote systems. Configure network credentials with either a username and password or a username and SSH keyfile pair, optionally including a passphrase.

Also during network credential configuration, you can enable a become method. The become method is used during a scan to elevate privileges. These elevated privileges are needed to run commands and obtain data on the systems that you are scanning.

During network scans, Discovery runs commands on remote systems using the credentials you provide. Some commands require elevated privileges through sudo to gather complete facts for your report.

Although it is possible to run a scan for a network source without elevated privileges, the results of that scan are incomplete. The incomplete results from the network scan affect the quality of the generated report for the scan.

The following information lists the commands that Discovery runs on remote hosts during a network scan. It includes the basic commands that can run without elevated privileges. It also lists the commands that must run with elevated privileges to gather the most accurate and complete information for the report.

Note

In addition to the following commands, Discovery also depends on standard shell facilities, such as those provided by the bash shell.

The following commands do not require elevated privileges to gather facts during a scan:

  • cat
  • egrep
  • sort
  • uname
  • ctime
  • grep
  • rpm
  • virsh
  • date
  • id
  • test
  • whereis
  • echo
  • sed
  • tune2fs
  • xargs

3.5.2. Commands that need elevated privileges

The following commands require elevated privileges to gather facts during a scan. Each command includes a list of individual facts or categories of facts that Discovery attempts to find during a scan. These facts cannot be included in reports if elevated privileges are not available for that command.

  • awk
  • cat
  • chkconfig
  • command
  • df
  • dirname
  • dmidecode
  • echo
  • egrep
  • fgrep
  • find
  • ifconfig
  • ip
  • java
  • locate
  • ls
  • ps
  • readlink
  • sed
  • sort
  • stat
  • subscription-manager
  • systemctl
  • tail
  • test
  • tr
  • unzip
  • virt-what
  • xargs
  • yum
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat Documentation

Legal Notice

Theme

© 2026 Red Hat
Back to top