Create an SSH key for OpenShift Container Platform machine access

About this task

Issue this command to create the key:

ssh-keygen -N '' -f /root/.ssh/<key_name> -q <<< y > /dev/null

Where <key_name> is the name of the key. This name should be non-standard (something other than id_rsa) to avoid existing key destruction and to prevent OCP access from other SSH connections.

For example, issue this command:

ssh-keygen -N '' -f /root/.ssh/ssh-azure.key -q <<< y > /dev/null

The output should be similar to:

[root@shahram-bastion1 ocp-tools]# ls -la /root/.ssh/
total 40
drwxr-xr-x. 2 root root  131 Jun  4 11:08 .
dr-xr-x---. 4 root root  179 Jun  4 11:03 ..
-rw-r--r--. 1 root root 9872 Jun  4 09:40 authorized_keys
-rw-r--r--  1 root root 9872 Jun  4 09:40 authorized_keys2
-rw-------  1 root root 2622 Jun  4 09:40 id_rsa
-rw-r--r--  1 root root  588 Jun  4 09:40 id_rsa.pub
-rw-------  1 root root 2622 Jun  4 11:08 ssh-azure.key
-rw-r--r--  1 root root  588 Jun  4 11:08 ssh-azure.key.pub