此内容没有您所选择的语言版本。

Chapter 11. SSH Keys


Decision Central provides an SSH keystore service to enable user SSH authentication. It provides a configurable default SSH keystore, extensible APIs (for custom implementations), and support for multiple SSH public keys formats.

You can access the SSH Keys option from the Admin page to register your SSH public keys.

11.1. Default SSH keystore

The default SSH keystore included with Decision Central provides a file-based storage mechanism to store a user’s public keys. By default, Decision Central uses the *.security folder as the root directory. However, it is possible to use a custom storage path by setting the value of the appformer.ssh.keys.storage.folder system property point to a different folder.

The SSH public keys are stored in the {securityFolderPath}/pkeys/{userName}/ folder structure.

Each SSH public key consists of the following files, located in the storage folder:

  • {keyId}.pub: This file contains the SSH public key content. As the file name determines the logic key ID on the system, ensure that the file name is not modified during runtime.

    For example:

    ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDmak4Wu23RZ6XmN94bOsqecZxuTa4RRhhQmHmTZjMB7HM57/90u/B/gB/GhsPEu1nAXL0npY56tT/MPQ8vRm2C2W9A7CzN5+z5yyL3W01YZy3kzslk77CjULjfhrcfQSL3b2sPG5jv5E5/nyC/swSytucwT/PE7aXTS9H6cHIKUdYPzIt94SHoBxWRIK7PJi9d+eLB+hmDzvbVa1ezu5a8yu2kcHi6NxxfI5iRj2rsceDTp0imC1jMoC6ZDfBvZSxL9FXTMwFdNnmTlJveBtv9nAbnAvIWlilS0VOkdj1s3GxBxeZYAcKbcsK9sJzusptk5dxGsG2Z8vInaglN6OaOQ7b7tcomzCYYwviGQ9gRX8sGsVrw39gsDIGYP2tA4bRr7ecHnlNg1b0HCchA5+QCDk4Hbz1UrnHmPA2Lg9c3WGm2qedvQdVJXuS3mlwYOqL40aXPs6890PvFJUlpiVSznF50djPnwsMxJZEf1HdTXgZD1Bh54ogZf7czyUNfkNkE69yJDbTHjpQd0cKUQnu9tVxqmBzhX31yF4VcsMeADcf2Z8wlA3n4LZnC/GwonYlq5+G93zJpFOkPhme8c2XuPuCXF795lsxyJ8SB/AlwPJAhEtm0y0s0l1l4eWqxsDxkBOgN+ivU0czrVMssHJEJb4o0FLf7iHhOW56/iMdD9w== userName
    Copy to Clipboard
  • .{keyId}.pub.meta: This file contains the key metadata in JSON format. A new metadata file is dynamically generated if a key has no metadata.

    For example:

    {
      "name":"Key",
      "creationDate":"Oct 10, 2018 10:10:50 PM",
      "lastTimeUsed":"Oct 11, 2018 12:11:23 PM"
    }
    Copy to Clipboard

11.2. Custom SSH keystore

You can extend and customize the default SSH keystore according to your requirements. Use the appformer.ssh.keystore system property to specify the Java class name of the SSH service to use. If this property is not defined or it contains an incorrect value then the default SSH keystore is loaded.

Note

To create a custom implementation of the SSH keystore, your java class must implement the org.uberfire.ssh.service.backend.keystore.SSHKeyStore class defined in the uberfire-ssh-api module.

11.3. Creating an SSH key

Before you can add or register SSH keys to Decision Central, you must generate an SSH key on your system.

Procedure

  1. Open a terminal on your system.
  2. Run the ssh-keygen command to create the SSH key as shown in the following example, where <user_login> is your user name.

    ssh-keygen -t rsa -b 4096 -C "<user_login>"
    Copy to Clipboard
    Note

    The SSH key formats supported by Decision Central keystore are ssh-rsa, ssh-dss, ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, and ecdsa-sha2-nistp521.

  3. When prompted, press the Enter key and accept the default key file location as shown in the following example, where <user_login> is your user name.

    Enter a file in which to save the key (/home/<user_login>/.ssh/id_rsa): [Press enter]
    Copy to Clipboard
  4. At the command prompt, enter and confirm the passphrase.

    Enter passphrase (empty for no passphrase): [Type a passphrase]
    Enter same passphrase again: [Type passphrase again]
    Copy to Clipboard
  5. Start the ssh-agent.

    eval "$(ssh-agent -s)"
    Agent pid <any-number-here>
    Copy to Clipboard
  6. Add the new SSH private key to the ssh-agent. If you have used a different key name, replace id_rsa in code.

    ssh-add ~/.ssh/id_rsa
    Copy to Clipboard

11.4. Registering your SSH public key with the SSH keystore

You must register your newly created SSH public key with the Decision Central keystore.

Procedure

  1. Open a terminal on your system.
  2. Run the cat command as shown in the following example, where id_rsa is your key name.

    cat ~/.ssh/id_rsa.pub
    Copy to Clipboard
  3. Copy the contents of your SSH public key.
  4. Log in to Decision Central.
  5. Select Admin SSH Keys.
  6. From the SSH Keys page, click Add SSH Keys.
  7. In the Add SSH Key window, enter a name in the Name field and copy the contents of the SSH public key to the Keys field.

    Note

    The Name and the Key fields are mandatory.

  8. Click Add SSH Key to register the key.

11.5. Deleting an SSH key

You can delete an SSH key from Decision Central by from the SSH Keys page.

Procedure

  1. Log in to Decision Central.
  2. Select Admin SSH Keys.
  3. All of the SSH keys are listed on the SSH Keys page.
  4. To delete an SSH key, click the delete icon (trash can).
  5. Click the Delete SSH Key to confirm the deletion.
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat