How to create and test ssh keys for IBM Cloud Private

Before to install IBM Cloud Private you need to prepares your virtual machines by follow the steps inside here, an important part of this steps is setup correctly rsa keys in all nodes.

Based on Cloud private documentation, the steps are really simple

  1. ssh-keygen -b 4096 -t rsa -f ~/.ssh/master.id_rsa -N ""
  2. cat ~/.ssh/ | sudo tee -a ~/.ssh/authorized_keys
  3. ssh-copy-id -i ~/.ssh/ root@<node_ip_address>
  4. Log in to the master, worker, or proxy node and restart sshd service
Now the next step is to test if the communication between boot and other servers is working but if you  ran the command ssh root@<node_ip_address> a password is required to login as root user, it seems someting is wrong...
This is not true because by default sshd daemon is looking for a file called id_rsa and not master.id_rsa. To test correctly the rsa key you need to run this command:
  • ssh -i ~/.ssh/master.id_rsa  root@<node_ip_address>
and  again password is asked but now the problem is related to permission because you need to change from 644 ( default ) to 400 ( only read ) 
  • chmod 400  ~/.ssh/master.id_rsa
  • chmod 400  ~/.ssh/
and finally your login is sucessful! 

I reported these missing things inside the documentation


Popular posts from this blog

Happy Easter Think2018!

New job new life same commitment

Last steps to install IBM Cloud Private v2.1