Assignment of SSH Public Keys

Complete this procedure to add the SSH public keys to the Red Hat® Directory Server (RHDS) database.

Before you assign SSH public keys, you must extend the schema. Refer to Extending Red Hat® Directory Server Schema.

To assign SSH public keys:

  1. Open the Directory Server Console
  2. Navigate to the specific user container under Directory tab.
    Note: If users are stored in a different container, such as OU=External Partners, navigate to that container and expand it.
  3. Right click the user to modify and select Advanced Properties.
  4. To add an object class to an entry, in the Directory tab of the Directory Server Console, right-click the entry to modify, and select Advanced from the pop-up menu.
  5. Select the object class field and click Add Value.

    The Add Object Class window opens. It displays a list of object classes that can be added to the entry

  6. Select ldapPublicKey objectClass from the list as class name click OK.
  7. Before you can add an attribute sshPublicKey to an entry, the entry must contain an object class ldapPublicKey that either requires or allows the attribute.
  8. Click Add Attribute and select sshPublicKey on the list and click Edit.
  9. Open the SSH public key file.
  10. Copy the base64 key and paste it into a new text document. The base64 key is the lines between the BEGIN SSH2 PUBLIC KEY and END SSH2 PUBLIC KEY
    markers, excluding lines that start with keywords like Comment
  11. Remove newlines from the text, leaving a single long line of base64 text.
  12. Copy the single line of base64 text.
  13. In properties editor of RDS admin console, paste the single line into the Value to add field of attribute sshPublicKey to add field and click OK.
  14. Repeat step 8 through 12 for any other public keys. Click OK when all keys have been added
  15. Click Apply to save changes, then click OK to close the Properties dialog.