1 Reply Latest reply on Aug 10, 2013 8:04 PM by user2996779

    emcli create_credential_set -target_type=oracle_database  fails

      I'm trying to create a new credential set for a database instance, we need to access using an ssh key, the failing command is:

      $ ./emcli create_credential_set -target_type=oracle_database -set_name=DbSSHCredSet -supported_cred_types=HostSSHCreds
      Invalid credential type. Check authenticating target type and credential type.

      We have OEM12c R2, and:

      $ ./emcli show_credential_type_info -target_type=oracle_database
      Target Type Cred Type Name Cred Type Column Name Key Column
      oracle_database DBCreds DBPassword No
      DBRole No
      DBUserName Yes
      DBHostCreds HostPassword No
      HostUserName Yes
      DBKerberosCreds DBKerberosPassword No
      DBKerberosUserName Yes
      HostSSHCreds SSH_PUB_KEY No
      SSH_PVT_KEY No
      USERNAME Yes

      What I'm missing? any help is appreciated

      Best Regards
        • 1. Re: emcli create_credential_set -target_type=oracle_database  fails

          For others' reference, setting up an SSH Key credential and setting it as the "Default Preferred Host Credential" is explained well (with screenshots) in the following MOS article:
          How to set SSH-key Named Credential as preferred credential (Doc ID 1453530.1)


          A similar approach works for using SSH Key-based credential for the "Database Host Credential", except that the credential set has an auth_target_type (host) that is different from the target_type (oracle_database).   The reason seems to be that the credential is associated with a database instance, but is used to authenticate against a host.  The code below works...


          $ ./emcli create_credential_set -set_name="SSH-Key DB Host Credentials" -target_type=oracle_database -supported_cred_types=HostSSHCreds -auth_target_type=host -description="SSH Key-based DB Host Credentials"

          Credential set "SSH-Key DB Host Credentials" created successfully.


          Once that is done, you can select the new credential set as an alternative to "Database Host Credentials"