Sharing SSH keys among cluster nodes
Secure Shell (SSH) keys are used to allow secure connections between hosts in an IBM® Cloud Private cluster.
Before you install an IBM Cloud Private cluster, you configure authentication between configuration nodes. You can generate an SSH key pair on your boot node and share that key with the other cluster nodes. To share the key with the cluster nodes, you must have the access to an account with root access for each node in your cluster.
To configure authentication without sharing SSH keys, configure password authentication for cluster nodes. See Configuring password authentication for cluster nodes.
- Log in to the boot node with an account with root access.
- Generate an SSH key:
ssh-keygen -b 4096 -f ~/.ssh/id_rsa -N ""
Add the key to a master, worker, proxy, management or Vulnerability Advisor (VA) node in the cluster.
From the boot node, add the SSH public key to the node.
ssh-copy-id -i ~/.ssh/id_rsa.pub <user>@<node_ip_address>
<user>is the user name for the node, and
<node_ip_address>is the IP address of that node.
- Log in to the master, worker, proxy, management, or VA node.
- Restart the SSH service:
sudo systemctl restart sshd
Repeat the previous step for each remaining node in the cluster.