Setting up a custom SSH key on an existing cluster

As a storage administrator, with Cephadm, you can use an SSH key to securely authenticate with remote hosts. The SSH key is stored in the monitor to connect to remote hosts.

Before you begin

Before you begin, make sure that you have the following prerequisites in place:
  • A running IBM Storage Ceph cluster.
  • An Ansible administration node.
  • Root-level access to the Ansible administration node.
  • The cephadm-ansible package is installed on the node.

About this task

When the cluster is bootstrapped, this SSH key is generated automatically and no additional configuration is necessary. However, you can generate a new SSH key with the ceph cephadm generate-key command.

Procedure

  1. Navigate to the /usr/share/cephadm-ansible/ directory.
    For example,
    [root@admin ~]# cd /usr/share/cephadm-ansible
  2. Generate a new SSH key.
    ceph cephadm generate-key
    For example,
    [ceph-admin@admin cephadm-ansible]$ ceph cephadm generate-key
  3. Retrieve the public portion of the SSH key.
    ceph cephadm get-pub-key
    For example,
    [ceph-admin@admin cephadm-ansible]$ ceph cephadm get-pub-key
  4. Delete the currently stored SSH key.
    ceph cephadm clear-key
    For example,
    [ceph-admin@admin cephadm-ansible]$ceph cephadm clear-key
  5. Restart the mgr daemon to reload the configuration.
    ceph mgr fail
    For example,
    [ceph-admin@admin cephadm-ansible]$ ceph mgr fail