SSH credentials
Discovery, Orchestration, and Integration Hub explore UNIX and Linux devices by using SSH credentials to execute commands over Secure Shell (SSH). SSH commands must run with root privileges, either with root credentials or through the use of sudo. SSH private key credentials provide additional security.
Granting root privileges
Before granting root privileges, review your security policy and options with your organization's security team.
- Give other credentials for Discovery,
Orchestration, or Integration Hub, but
grant the user in those credentials the right to
execute certain commands with root privileges, using
sudo. This
is a secure way to grant limited privileges. Discovery, Orchestration, or Integration Hub use sudo on any probe
that has the
must_sudoparameter set to true (it defaults to false). However, each system must be configured to allow sudo to work. This is done by editing the /etc/sudoers file using the visudo command. - Give root credentials. These are obviously the most powerful credentials, but may not be desirable from a security perspective. If Discovery, Orchestration, or Integration Hub have the root credentials to any UNIX or Linux system, no further configuration is required.
Privileged commands
The platform provides default privileged commands for the MID Server to use and the ability to add additional commands to the system. For details about using sudo and other privileged commands, see MID Server privileged commands.
SSH private key credential type
| Field | Input value |
|---|---|
| Name | Unique and descriptive name for this credential. For example, you might call it SSH Atlanta. |
| Active | Enable or disable these credentials for use. |
| User name | Enter a UNIX or Linux user name. Avoid leading or trailing spaces in user names. A warning appears if the platform detects leading or trailing spaces in the user name. |
| Password | Enter the UNIX or Linux password. For SSH Private Key type credentials, enter the sudo password if one is required for the user name. |
| SSH passphrase | Type a secure SSH passphrase. This field is available only for SSH Private Key credentials. |
| SSH private key | Enter a secure, RSA, DSA, ECDSA or ED25519 private key. The private
key must be entered in the proper format to ensure it is correctly
encrypted. The private key must start with the string
Here is an example of a
correctly formatted RSA private
key: An example of a DSA
key: An example of a ECDSA
key: And an example of an
ED25519 private
key: Note: For an ED25519 private key, only the OpenSSH
key format is supported, which is generated using OpenSSH
SSH-keygen utility. The ServiceNow AI Platform supports private keys in the PEM format generated by the OpenSSH ssh-keygen utility. To convert PPK keys that were generated by PuTTY:
|
| SSH Certificate | Enter an RSA or ED25519 based OpenSSH certificate. When the certificate is entered, a private key is used for certificate based authentication. This authentication is supported from OpenSSH 7.8 onwards. |
| Credential alias |
|
| External credential store | Select this check box to use an external credential storage system. When you select this option the User name and Password fields are replaced with the Credential ID field. Currently, the only supported external storage system is CyberArk. |
| MID servers | Select one or more MID Servers from the list of available MID Servers. The credentials configured in this record are available to the MID Servers in this list. This field is available only when you select Specific MID servers from the Applies to field. |
| Applies to | Select whether to apply these credentials to All MID servers in your network, or to one or more Specific MID servers. Specify the MID Servers that should use these credentials in the MID servers field. |
| Order | The order (sequence) in which the platform tries this credential as it attempts to log onto devices. The smaller the number, the higher in the list this credential appears. Establish credential order when using large numbers of credentials or when security locks out users after three failed login attempts. If all the credentials have the same order number (or none), Discovery or Orchestration tries the credentials in a random order. |
SSH credential type
| Field | Description |
|---|---|
| Name | Enter a unique and descriptive name for this credential. |
| Active | Enable or disable these credentials for use. |
| User name | Enter the user name to create in the Credentials table. Avoid leading or trailing spaces in user names. A warning appears if the platform detects leading or trailing spaces in the user name. For CIM discovery, the user must have the admin role. |
| Password | Enter the password. |
| Credential ID | Enter the unique key configured for
external credentials in the JAR file uploaded to
the MID Server for an external credential system.
The Credential ID field has
a limit of 40 characters. This field is only visible when the External credential store check box is selected. |
| Credential alias |
|
| External credential store | Select this check box to use an external
credential storage system. When you select this
option the User name and
Password fields are
replaced with the Credential
ID field. External credential
storage is only available when the External
Credential Storage plugin in activated. Note: Currently, the only supported external
storage system is CyberArk. |
| Applies to | Select whether to apply these credentials to All MID servers in your network, or to one or more Specific MID servers. Specify the MID Servers that should use these credentials in the MID servers field. |
| MID servers | Select one or more MID Servers from the list of available MID Servers. The credentials configured in this record are available to the MID Servers in this list. This field is available only when you select Specific MID servers from the Applies to field. |
| Order | Order (sequence) in which Discovery tries this credential as it attempts to log on to devices. The smaller the number, the higher in the list this credential appears. Establish credential order when using large numbers of credentials or when security locks out users after three failed login attempts. If all the credentials have the same order number (or none), the instance tries the credentials in a random order. |
Commands that require root privileges for Discovery, Orchestration, and Integration Hub
disco
ALL=(root)
NOPASSWD:/usr/sbin/dmidecode,/usr/sbin/lsof,/sbin/ifconfig.| Command | Purpose |
|---|---|
| HP-UX | |
| adb | Gathers CPU speed and memory.
|
| All Linux and UNIX versions | |
| chage | Changes the number of days between password
changes and the date of the last password
change.
|
| chpasswd | Changes user passwords.
|
| All Linux | |
| dmidecode | Gathers several pieces of information about
the hardware, including the serial number embedded
within the motherboard.
|
| fdisk | Gathers the disks and size information on
the system.
|
| multipath | Gathers device mappings for MPIO.
|
| ls | Gathers the contents of a directory.
|
| Linux and Solaris | |
| dmsetup | Examines a low level volume.
|
| All UNIX versions | |
| lsof | Determines the relationship between
processes and the connections being made to the
system.
|
| oratab | Grants read access to the oratab file for
locating the Oracle Home and pfile.
|
| Solaris | |
| iscsiadm | Gets iSCSI IQNs
|
| fcinfo | Gets WWPNs for ports.
|
| prtvtoc | Reports information about disk
partitions.
|
| pfiles | Used for gathering TCP connections information.
|
| pgrep | Used for listing process IDs of a particular region to run pfiles on.
|
| /usr/bin/ps | Lists running process. As an alternative to
running with root access, add a proc_owner
role.
|
| /usr/ucb/ps | Lists running process. As an alternative to
running with root access, add a proc_owner role.
The use of the /usr/ucb/ps
command is deprecated as of Solaris 11. Because
Discovery, Orchestration, and Integration Hub require the use of this command for all Solaris
versions, you must install the ucb utility
manually on Solaris 11 systems. For instructions,
see KB0564262.
|
For a list of privileged commands that you need for Discovery and Service Mapping, see Service Mapping commands requiring a privileged user. This list includes commands that require elevated rights to discover and map Unix-based hosts in your organization.
Access Requirements for Non-Root Credentials
| Application | File or Directory | Access Required |
|---|---|---|
| Apache | httpd.conf | Read |
| Hbase | hbase-site.xml | Read |
| JBoss | jboss-service.xml | Read |
| JBoss home directory | Read | |
| web.xml | Read | |
| MySQL | my.cnf | Read |
| NGINX | nginx.conf | Read |
| Oracle | oratab | Read |
| Associated (s) pfiles | Read | |
| Oracle Listener | lsnrctl | Execute |
| listener.ora | Read | |
| Tomcat | catalina.jar | Read |
| server.xml | Read | |
| web.xml | Read | |
| Unix | /etc/*release | Read |
| /etc/bashrc | Read | |
| /etc/profile | Read | |
| /proc/cpuinfo | Read | |
| /proc/vmware/sched/ncpus | Read | |
| /var/log/dmesg | Read | |
| APD directory | Read | |
| WebSphere | cell.xml | Read |
| server.xml | Read | |
| serverindex.xml | Read |